You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ecf44b1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tooling): derive the prerequisite gate name by stripping the module extension, not only .mjs (#16670)
The refusal frame prints two different strings: the gate's NAME in the headline
and the PATH the reader runs. The name was derived with a `.mjs`-only strip
written when every importer was `.mjs`, so the first TypeScript importer
(`scripts/check-exported-any-returns.mts`) printed its extension in the one
message a reader is meant to quote back.
The extension comes off, and the rule is now stated rather than left as a
regex: `GATE_MODULE_EXTENSIONS` declares the two module extensions this repo's
gate corpus uses, and `gateNameOf` removes whichever one the file has. The test
that settles the direction is what the reader has to type, and it does not
point at the extension either way -- the runnable string is `command`, which
keeps the real path with its real extension, and the way a reader re-runs the
gate is its package script (`check:exported-any-returns`), which has no
extension at all.
The PATH half is deliberately unmoved: stripping it would hand the reader a
file that does not exist. Five self-test cases pin the pair on one fixture --
a `.mts` gate and a `.mjs` sibling differing only in extension -- so neither
half can drift without a red.
Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments