This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 0fd1144
fix(app-shell): explicit extensions on every relative specifier, so plain Node can load the published entry (#5383)
* fix(app-shell): explicit extensions on every relative specifier, so plain Node can load the entry (#5357)
Node's ESM resolver does not extension-search relative specifiers and `tsc`
never rewrites them, so an extensionless `./Foo` in the source stayed
extensionless in `dist` and `import('@object-ui/app-shell')` under plain Node
died with ERR_MODULE_NOT_FOUND on the package's own first re-export. Every
consumer this repository exercises goes through a bundler, which is why it was
green.
1271 relative specifiers now carry the extension they emit as (1227 `.js`,
44 `/index.js`). Every one was identified by the TypeScript PARSER and resolved
against the FILESYSTEM: the suffix follows whichever candidate file exists,
never the shape of the string. Three strings that parse as imports live in
prose comments and were left alone.
The parser was used rather than the gate's own regex because the two disagree:
`withoutCommentedCode` strips block comments with a pattern that is not
line-comment aware, so a back-ticked `@objectstack/*` inside a `//` line opens
a block comment it runs to the next close, swallowing two live `import` lines
in DraftChangesPanel.tsx. Parser 1271, gate regex 1270, and the one the gate
cannot see is real code. Filed separately; not fixed here.
`@object-ui/app-shell` was the last name in SPECIFIER_DEBT, so deleting it
empties the map: the specifier leg stops being a ratchet with grandfathered
names and becomes a hard requirement.
The entry still does not evaluate under plain Node, for a different reason that
the specifier error was masking: it statically imports @object-ui/plugin-dashboard,
whose module-scope react-grid-layout stylesheet Node cannot load at all. That is
LOAD_DEBT's class, not this one, and it is recorded there beside the package it
comes from.
Two consumers outside the package needed the same convention applied:
`check-i18n-call-site-keys.mjs` resolved `./i18n.js` to a path with no file
behind it and reported the whole metadata-admin table as an unregistered
translator, and one source-text pin in @object-ui/i18n spelled the old
specifier.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
* fix(console-starter): the alias-closure walker resolves an emitted `.js` specifier to its source (#5357)
`resolveModule()` probed candidate extensions but had no notion that `./Foo.js`
is how a package whose build preserves specifiers has to spell `Foo.tsx`. So
every converted package became partially unwalkable: the walk followed the
package entry, then failed on each `./X.js` re-export inside it and stopped.
The relative branch of the walk drops an unresolvable specifier with NO record
— `if (resolved) walk(resolved); continue;` — so `closure.unresolvable` could
never see this class and stayed empty. The only assertion that could catch it
was the `filesWalked` floor, and only once enough of the graph had gone.
Measured with the walker's own logic:
origin/main, as shipped 890 files walked, 236 relative specifiers dropped
this branch, as shipped 401 files walked, 275 dropped (below the 500 floor)
either tree, repaired 1242 files walked, 0 dropped
So this was landing green since objectui#4538 and continued through the six
packages of objectui#5214; app-shell converting is what finally crossed the
floor. The floor did its job — two PRs late, because the direct symptom was
being swallowed.
The lookup is a pure FALLBACK after every existing candidate has failed, so a
package that genuinely ships a `.js` beside its TypeScript still resolves to
that file, and any specifier that already resolved returns the same answer.
Repaired, both trees walk an identical 1242 files and reach the same 29
packages with 0 missing alias entries — the alias table was already complete,
so the truncated walk was not hiding a second defect.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a20b81d commit 0fd1144
282 files changed
Lines changed: 1380 additions & 1290 deletions
File tree
- .changeset
- examples/console-starter/test
- packages
- app-shell/src
- chrome
- components
- console
- ai
- auth
- home
- marketplace
- organizations
- manage
- context
- environment
- hooks
- layout
- observability
- preview
- providers
- services
- skeletons
- utils
- views
- metadata-admin
- datasource
- external
- inspectors
- previews
- simulator
- studio-design
- i18n/src/__tests__
- scripts
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments