@gjsify/resolve-npm 0.24.2 → 0.26.0

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 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 STATUS.md TODO on the `native` slot's
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
- * STATUS.md `Open TODOs`), then compose. An import by PACKAGE NAME does route
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`
@@ -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
- try {
143
- const stamp = ['node', 'web', 'dom', 'framework', 'infra'].some((s) =>
144
- existsSync(join(packagesCandidate, s)),
145
- );
146
- if (stamp) roots.push({ kind: 'workspace', dir: packagesCandidate });
147
- } catch {
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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/resolve-npm",
3
- "version": "0.24.2",
3
+ "version": "0.26.0",
4
4
  "description": "Resolve NPM package aliases",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",