@nubjs/nub-win32-x64 0.0.14 → 0.0.16
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/bin/nub.exe +0 -0
- package/package.json +1 -1
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/preload-async-hooks.mjs +5 -6
- package/runtime/preload.cjs +10 -6
- package/runtime/preload.mjs +22 -11
- package/runtime/transform-core.mjs +183 -521
- package/runtime/version.mjs +1 -1
- package/runtime/worker-polyfill.mjs +15 -2
- package/runtime/node_modules/@oxc-parser/binding-win32-x64-msvc/README.md +0 -3
- package/runtime/node_modules/@oxc-parser/binding-win32-x64-msvc/package.json +0 -39
- package/runtime/node_modules/@oxc-parser/binding-win32-x64-msvc/parser.win32-x64-msvc.node +0 -0
- package/runtime/node_modules/@oxc-project/types/LICENSE +0 -22
- package/runtime/node_modules/@oxc-project/types/README.md +0 -3
- package/runtime/node_modules/@oxc-project/types/package.json +0 -26
- package/runtime/node_modules/@oxc-project/types/types.d.ts +0 -1912
- package/runtime/node_modules/@oxc-transform/binding-win32-x64-msvc/README.md +0 -3
- package/runtime/node_modules/@oxc-transform/binding-win32-x64-msvc/package.json +0 -41
- package/runtime/node_modules/@oxc-transform/binding-win32-x64-msvc/transform.win32-x64-msvc.node +0 -0
- package/runtime/node_modules/get-tsconfig/LICENSE +0 -21
- package/runtime/node_modules/get-tsconfig/README.md +0 -268
- package/runtime/node_modules/get-tsconfig/dist/index.cjs +0 -7
- package/runtime/node_modules/get-tsconfig/dist/index.d.cts +0 -2116
- package/runtime/node_modules/get-tsconfig/dist/index.d.mts +0 -2116
- package/runtime/node_modules/get-tsconfig/dist/index.mjs +0 -7
- package/runtime/node_modules/get-tsconfig/package.json +0 -46
- package/runtime/node_modules/oxc-parser/LICENSE +0 -22
- package/runtime/node_modules/oxc-parser/README.md +0 -167
- package/runtime/node_modules/oxc-parser/package.json +0 -153
- package/runtime/node_modules/oxc-parser/src-js/bindings.js +0 -601
- package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +0 -105
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +0 -5862
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +0 -6403
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +0 -6154
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +0 -6723
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +0 -13875
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +0 -191
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +0 -5810
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +0 -220
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +0 -177
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +0 -387
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +0 -2455
- package/runtime/node_modules/oxc-parser/src-js/index.d.ts +0 -312
- package/runtime/node_modules/oxc-parser/src-js/index.js +0 -108
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +0 -301
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +0 -255
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +0 -11
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +0 -162
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +0 -365
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +0 -52
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +0 -127
- package/runtime/node_modules/oxc-parser/src-js/visit/index.js +0 -41
- package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +0 -405
- package/runtime/node_modules/oxc-parser/src-js/wasm.js +0 -13
- package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +0 -21
- package/runtime/node_modules/oxc-parser/src-js/wrap.js +0 -57
- package/runtime/node_modules/oxc-transform/LICENSE +0 -22
- package/runtime/node_modules/oxc-transform/README.md +0 -84
- package/runtime/node_modules/oxc-transform/browser.js +0 -1
- package/runtime/node_modules/oxc-transform/index.d.ts +0 -658
- package/runtime/node_modules/oxc-transform/index.js +0 -598
- package/runtime/node_modules/oxc-transform/package.json +0 -114
- package/runtime/node_modules/oxc-transform/webcontainer-fallback.cjs +0 -21
- package/runtime/node_modules/resolve-pkg-maps/LICENSE +0 -21
- package/runtime/node_modules/resolve-pkg-maps/README.md +0 -216
- package/runtime/node_modules/resolve-pkg-maps/dist/index.cjs +0 -1
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.cts +0 -11
- package/runtime/node_modules/resolve-pkg-maps/dist/index.d.mts +0 -11
- package/runtime/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
- package/runtime/node_modules/resolve-pkg-maps/package.json +0 -42
package/bin/nub.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
21
|
TRANSPILE_EXTS, DATA_EXTS,
|
|
22
|
-
extname, resolveSpec, loadTranspile, loadData,
|
|
22
|
+
extname, resolveSpec, loadTranspile, loadData,
|
|
23
23
|
} from "./transform-core.mjs";
|
|
24
24
|
|
|
25
25
|
// Node calls this once per worker when the main thread invokes
|
|
@@ -38,11 +38,10 @@ export async function resolve(specifier, context, nextResolve) {
|
|
|
38
38
|
export async function load(url, context, nextLoad) {
|
|
39
39
|
const ext = extname(url);
|
|
40
40
|
if (TRANSPILE_EXTS.has(ext)) {
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
await ensureParser();
|
|
41
|
+
// Module-format + decorator detection inside loadTranspile is a synchronous
|
|
42
|
+
// native call (nub's addon), available on every supported Node — no parser
|
|
43
|
+
// warm-up needed (the old `await ensureParser()` for the ESM-only oxc-parser
|
|
44
|
+
// is gone with the package).
|
|
46
45
|
return loadTranspile(url, ext);
|
|
47
46
|
}
|
|
48
47
|
if (ext in DATA_EXTS) return loadData(url, ext);
|
package/runtime/preload.cjs
CHANGED
|
@@ -102,14 +102,18 @@ if (!requireEsmDisabled) {
|
|
|
102
102
|
// ── Hook registration (fast tier: sync, in-thread) ────────────────
|
|
103
103
|
// Same realm as user code; covers `import` and (Node 24+) `require`.
|
|
104
104
|
// registerHooks' require RESOLUTION is incomplete on 22.15–24, so also install
|
|
105
|
-
// the main-thread CJS resolve shim
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
|
|
105
|
+
// the main-thread CJS resolve shim (its _resolveFilename half, always on). We do
|
|
106
|
+
// NOT install the classic require.extensions transpile shim on the fast tier: the
|
|
107
|
+
// sync registerHooks LOAD hook already transpiles require()'d `.ts` (CJS content,
|
|
108
|
+
// tsconfig paths, .tsx, extensionless — all verified), and native require(esm)
|
|
109
|
+
// (>= 22.12, always present at the 22.15+ fast floor) loads ES-module `.ts`. The
|
|
110
|
+
// classic require.extensions['.ts'] hook would SHADOW that native require(esm) and
|
|
111
|
+
// throw a bogus ERR_REQUIRE_ESM on every ESM `.ts` entry on 22.15–22.17 (where
|
|
112
|
+
// process.features.typescript is still false) — so it must stay off here. On
|
|
113
|
+
// 22.18+/24+ this was already the behavior (native-TS → false); now it's uniform.
|
|
110
114
|
const { resolve, load } = common.makeHooks(core, watchReporting);
|
|
111
115
|
module_.registerHooks({ resolve, load });
|
|
112
|
-
common.installCjsRequireHooks(core,
|
|
116
|
+
common.installCjsRequireHooks(core, false);
|
|
113
117
|
|
|
114
118
|
// ── Sync polyfills + lazy ESM-side-effect polyfills ───────────────
|
|
115
119
|
installSyncPolyfills(__preloadedPolyfills);
|
package/runtime/preload.mjs
CHANGED
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
//
|
|
10
10
|
// THIS file stays the compat path: on 18.19–22.14, `module.registerHooks` does not
|
|
11
11
|
// exist and `require(esm)` is unreliable, so hooks run async in a dedicated loader
|
|
12
|
-
// worker via `module.register
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
12
|
+
// worker via `module.register`. That async machinery is why the compat tier keeps
|
|
13
|
+
// `--import` — its top-level `await` is accepted here (an `--import` ESM module may
|
|
14
|
+
// be async), and the < 22.15 floor has no equivalent sync surface. (Module-format
|
|
15
|
+
// + decorator detection no longer needs a preloaded JS parser: it is a synchronous
|
|
16
|
+
// native addon call, so there is nothing to `await`-warm-up before hooks run.)
|
|
16
17
|
//
|
|
17
18
|
// Resolution + transpile primitives come from runtime/transform-core.mjs; the
|
|
18
19
|
// non-tier-specific wiring (watch IPC, the CJS require() shim, clobbered-polyfill
|
|
@@ -56,19 +57,29 @@ common.installWatchReporting(core);
|
|
|
56
57
|
if (__isFastTier) {
|
|
57
58
|
// Defensive only — the Rust path uses preload.cjs for 22.15+. If reached, the
|
|
58
59
|
// sync registerHooks API is available; register synchronously to stay correct.
|
|
60
|
+
// Match preload.cjs: NO classic require.extensions shim on the fast tier — the
|
|
61
|
+
// sync registerHooks load hook + native require(esm) cover require()'d `.ts`
|
|
62
|
+
// (incl. ES modules); the classic shim would shadow require(esm) and throw a
|
|
63
|
+
// bogus ERR_REQUIRE_ESM on 22.15–22.17.
|
|
59
64
|
const { resolve, load } = common.makeHooks(core, process.env.WATCH_REPORT_DEPENDENCIES === "1");
|
|
60
65
|
module.registerHooks({ resolve, load });
|
|
61
|
-
common.installCjsRequireHooks(core,
|
|
66
|
+
common.installCjsRequireHooks(core, false);
|
|
62
67
|
} else if (__isCompatTier) {
|
|
63
68
|
// Compat path: ESM `import` hooks run in a dedicated loader worker thread.
|
|
64
69
|
module.register("./preload-async-hooks.mjs", import.meta.url);
|
|
65
|
-
// The main-thread
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
await core.ensureParser();
|
|
70
|
+
// (The main-thread require() shim's module-format + decorator detection is a
|
|
71
|
+
// synchronous native addon call now — no parser warm-up; the old
|
|
72
|
+
// `await core.ensureParser()` for the ESM-only oxc-parser is gone.)
|
|
69
73
|
// module.register() is ESM-loader-only; augment CommonJS require() on the main
|
|
70
|
-
// thread too. The compat tier
|
|
71
|
-
//
|
|
74
|
+
// thread too. The compat tier has no sync registerHooks, so require()'d `.ts`
|
|
75
|
+
// MUST be transpiled by the classic require.extensions shim — hence it always
|
|
76
|
+
// installs (true). KNOWN LIMITATION: on the require(esm)-capable slice of the
|
|
77
|
+
// compat tier (22.12–22.14) an explicit `require('./esm-module.ts')` still
|
|
78
|
+
// surfaces ERR_REQUIRE_ESM, because the classic shim shadows native require(esm)
|
|
79
|
+
// and can't delegate to it from inside `_compile`. ESM `.ts` ENTRIES and `import`
|
|
80
|
+
// of ESM `.ts` both work (they ride the ESM loader); only require()-of-ESM-`.ts`
|
|
81
|
+
// is affected — an uncommon pattern. Below 22.12 the error is fully correct
|
|
82
|
+
// (no require(esm) at all). Fast tier (22.15+) has none of this — see preload.cjs.
|
|
72
83
|
common.installCjsRequireHooks(core, !__hasNativeTs);
|
|
73
84
|
} else {
|
|
74
85
|
process.stderr.write(
|