Files
scriptc/tests/corpus/2390-dot-requires/main.cjs
Chris Tate b5f6b0dc46 Cite patterns, not target projects, across comments and hints
- Lowering rationale names the idiom; one user-facing hint reworded
- Diagnostics snapshot re-pinned to the neutral hint text
2026-07-23 01:18:50 -05:00

8 lines
426 B
JavaScript

// The bare '.' and '..' relative-specifier forms (Node's CJS resolution
// treats them exactly like './' and '../' directory imports: the target
// directory's package.json "main", else its index file) — a real CLI
// spells `from '..'` at 41 sites, and the CJS require twin is the form
// Node itself runs, so this case pins both lanes byte-for-byte.
const child = require("./sub/child.cjs");
console.log(child.report());