@gjsify/resolve-npm 0.25.1 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.mjs +2 -2
- package/lib/runtime-aliases.mjs +6 -8
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ import { getDerivedAliasesSync as _getDerivedAliasesSync } from './runtime-alias
|
|
|
55
55
|
* statement (no slot policy duplicated into it), and `aliasPlugin` keeps its
|
|
56
56
|
* one-hop `skipSelf: true` contract. Composing a table is therefore an
|
|
57
57
|
* explicit, per-table decision; `ALIASES_NODE_FOR_NATIVESCRIPT` is
|
|
58
|
-
* deliberately NOT composed (see the
|
|
58
|
+
* deliberately NOT composed (see the status/open-todos.md entry on the `native` slot's
|
|
59
59
|
* double meaning for the bridge packages).
|
|
60
60
|
*
|
|
61
61
|
* Evaluated LAZILY (on property read) and cached: `getDerivedAliasesSync` walks
|
|
@@ -427,7 +427,7 @@ export const ALIASES_NODE_FOR_BROWSER = withDerivedSlotRouting(
|
|
|
427
427
|
* `native` means "the RUNTIME provides it, route to `<pkg>/globals`" — a file
|
|
428
428
|
* the bridge does not ship, so the composed value degrades to
|
|
429
429
|
* `@gjsify/empty`. Settle the bridge packages' slot declarations first (see
|
|
430
|
-
*
|
|
430
|
+
* status/open-todos.md), then compose. An import by PACKAGE NAME does route
|
|
431
431
|
* per the declared slot (plain key hit in the merged map) — which is why the
|
|
432
432
|
* bridges are ALREADY emptied on that path today, same TODO.
|
|
433
433
|
* - **`ws` / `isomorphic-ws` → `@gjsify/empty`.** NS apps use `WebSocket`
|
package/lib/runtime-aliases.mjs
CHANGED
|
@@ -139,14 +139,12 @@ function findScanRoots() {
|
|
|
139
139
|
// Workspace check: <cur>/packages/{node,web,dom,framework,infra}.
|
|
140
140
|
const packagesCandidate = resolve(cur, 'packages');
|
|
141
141
|
if (existsSync(packagesCandidate)) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
// ignore
|
|
149
|
-
}
|
|
142
|
+
// `existsSync` never throws by contract (the sibling calls above and
|
|
143
|
+
// below rely on that too); `join`/`some` over a literal list are pure.
|
|
144
|
+
const stamp = ['node', 'web', 'dom', 'framework', 'infra'].some((s) =>
|
|
145
|
+
existsSync(join(packagesCandidate, s)),
|
|
146
|
+
);
|
|
147
|
+
if (stamp) roots.push({ kind: 'workspace', dir: packagesCandidate });
|
|
150
148
|
}
|
|
151
149
|
|
|
152
150
|
// Installed check: <cur>/node_modules/@gjsify (single-flat npm layout).
|