Skip to content

Commit 1667258

Browse files
committed
docs(changeset): say "import by name", which is the sentence that is true
`import { class as klass } from './views'` parses, and so does a namespace import plus property access. Only the bare named form is a syntax error, so "no consumer could import" is one word short of correct. Prose only, and it matters because of where this sentence lands: the changeset's first line becomes the published CHANGELOG entry and the PR title becomes the squash commit subject, both permanent and both user-facing. A reader who knows the aliased import works would read the old wording as wrong. No source file changes, so no measurement moves. Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2366735 commit 1667258

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.changeset/17410-generate-reserved-word-barrel-refusal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@objectstack/cli": minor
33
---
44

5-
feat(cli)!: `os generate` refuses a name whose barrel alias no consumer could import (#17410)
5+
feat(cli)!: `os generate` refuses a name whose barrel alias no consumer could import by name (#17410)
66

77
`os generate view class` exited **0** and wrote `export { default as class } from './class.view';`. That line parses — an ES module export clause admits a reserved word as a `ModuleExportName` — so both landed layers admitted it, each correctly by its own terms: the #16726 charset gate because every character of `class` is a lowercase letter, and the #16541 parse check because the bytes really are parseable TypeScript. The import side is not: `import { class } from './views'` needs an `ImportedBinding`, and a reserved word is not one. So the command reported success and produced a barrel entry nothing can name, with the failure deferred into the author's own file where it reads as their mistake.
88

0 commit comments

Comments
 (0)