| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 78.84615% with 11 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #61456 +/- ##
==========================================
- Coverage 89.85% 89.78% -0.07%
==========================================
Files 671 673 +2
Lines 203166 203822 +656
Branches 39057 39183 +126
==========================================
+ Hits 182554 183001 +447
- Misses 12967 13139 +172
- Partials 7645 7682 +37
... and 72 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
Where does this new dep live? |
Sorry, something went wrong.
Notable changes: async_hooks: * (SEMVER-MINOR) add trackPromises option to createHook() (Joyee Cheung) #61415 build,deps: * replace cjs-module-lexer with merve (Yagiz Nizipli) #61456 deps: * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) #61167 * (SEMVER-MINOR) add tools and scripts to pull LIEF as a dependency (Joyee Cheung) #61167 events: * (SEMVER-MINOR) repurpose `events.listenerCount()` to accept EventTargets (René) #60214 fs: * (SEMVER-MINOR) add ignore option to fs.watch (Matteo Collina) #61433 http: * (SEMVER-MINOR) add http.setGlobalProxyFromEnv() (Joyee Cheung) #60953 module: * (SEMVER-MINOR) allow subpath imports that start with `#/` (Jan Martin) #60864 process: * (SEMVER-MINOR) preserve AsyncLocalStorage in queueMicrotask only when needed (Gürgün Dayıoğlu) #60913 sea: * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) #61167 sqlite: * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) #61266 * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) #61311 src: * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) #61548 stream: * (SEMVER-MINOR) add bytes() method to stream/consumers (wantaek) #60426 * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) #60907 test: * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) #61167 test_runner: * (SEMVER-MINOR) add env option to run function (Ethan Arrowood) #61367 * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) #60669 util: * (SEMVER-MINOR) add convertProcessSignalToExitCode utility (Erick Wendel) #60963 PR-URL: #61924
PR-URL: #61456 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Richard Lau <richard.lau@ibm.com>
Notable changes: async_hooks: * (SEMVER-MINOR) add `trackPromises` option to `createHook()` (Joyee Cheung) #61415 build,deps: * replace cjs-module-lexer with merve (Yagiz Nizipli) #61456 deps: * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) #61167 events: * (SEMVER-MINOR) repurpose `events.listenerCount()` to accept `EventTarget`s (René) #60214 fs: * (SEMVER-MINOR) add `ignore` option to `fs.watch` (Matteo Collina) #61433 http: * (SEMVER-MINOR) add `http.setGlobalProxyFromEnv()` (Joyee Cheung) #60953 module: * (SEMVER-MINOR) allow subpath imports that start with `#/` (Jan Martin) #60864 process: * (SEMVER-MINOR) preserve `AsyncLocalStorage` in `queueMicrotask` only when needed (Gürgün Dayıoğlu) #60913 sea: * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) #61167 sqlite: * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) #61266 * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) #61311 src: * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) #61548 stream: * (SEMVER-MINOR) add `bytes()` method to `node:stream/consumers` (wantaek) #60426 * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) #60907 test: * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) #61167 test_runner: * (SEMVER-MINOR) add `env` option to `run` function (Ethan Arrowood) #61367 * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) #60669 util: * (SEMVER-MINOR) add `convertProcessSignalToExitCode` utility (Erick Wendel) #60963 PR-URL: #61924
Notable changes: async_hooks: * (SEMVER-MINOR) add `trackPromises` option to `createHook()` (Joyee Cheung) #61415 build,deps: * replace cjs-module-lexer with merve (Yagiz Nizipli) #61456 deps: * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) #61167 events: * (SEMVER-MINOR) repurpose `events.listenerCount()` to accept `EventTarget`s (René) #60214 fs: * (SEMVER-MINOR) add `ignore` option to `fs.watch` (Matteo Collina) #61433 http: * (SEMVER-MINOR) add `http.setGlobalProxyFromEnv()` (Joyee Cheung) #60953 module: * (SEMVER-MINOR) allow subpath imports that start with `#/` (Jan Martin) #60864 process: * (SEMVER-MINOR) preserve `AsyncLocalStorage` in `queueMicrotask` only when needed (Gürgün Dayıoğlu) #60913 sea: * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) #61167 sqlite: * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) #61266 * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) #61311 src: * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) #61548 stream: * (SEMVER-MINOR) add `bytes()` method to `node:stream/consumers` (wantaek) #60426 * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) #60907 test: * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) #61167 test_runner: * (SEMVER-MINOR) add `env` option to `run` function (Ethan Arrowood) #61367 * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) #60669 util: * (SEMVER-MINOR) add `convertProcessSignalToExitCode` utility (Erick Wendel) #60963 PR-URL: #61924
Notable changes: async_hooks: * (SEMVER-MINOR) add `trackPromises` option to `createHook()` (Joyee Cheung) #61415 build,deps: * replace cjs-module-lexer with merve (Yagiz Nizipli) #61456 deps: * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) #61167 events: * (SEMVER-MINOR) repurpose `events.listenerCount()` to accept `EventTarget`s (René) #60214 fs: * (SEMVER-MINOR) add `ignore` option to `fs.watch` (Matteo Collina) #61433 http: * (SEMVER-MINOR) add `http.setGlobalProxyFromEnv()` (Joyee Cheung) #60953 module: * (SEMVER-MINOR) allow subpath imports that start with `#/` (Jan Martin) #60864 process: * (SEMVER-MINOR) preserve `AsyncLocalStorage` in `queueMicrotask` only when needed (Gürgün Dayıoğlu) #60913 sea: * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) #61167 sqlite: * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) #61266 * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) #61311 src: * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) #61548 stream: * (SEMVER-MINOR) add `bytes()` method to `node:stream/consumers` (wantaek) #60426 * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) #60907 test: * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) #61167 test_runner: * (SEMVER-MINOR) add `env` option to `run` function (Ethan Arrowood) #61367 * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) #60669 util: * (SEMVER-MINOR) add `convertProcessSignalToExitCode` utility (Erick Wendel) #60963 PR-URL: #61924
* chore: bump node in DEPS to v24.14.0 * lib: prefer call() over apply() if argument list is not array nodejs/node#60796 * build,deps: replace cjs-module-lexer with merve nodejs/node#61456 * chore: fixup patch indices * test: use fixture directories for sea tests nodejs/node#61167 * src: throw RangeError on failed ArrayBuffer BackingStore allocation nodejs/node#61480 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: bump node in DEPS to v24.14.0 * lib: prefer call() over apply() if argument list is not array nodejs/node#60796 * build,deps: replace cjs-module-lexer with merve nodejs/node#61456 * test: use fixture directories for sea tests nodejs/node#61167 * src: throw RangeError on failed ArrayBuffer BackingStore allocation * chore: fixup patch indices --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: bump node in DEPS to v24.14.0 * lib: prefer call() over apply() if argument list is not array nodejs/node#60796 * build,deps: replace cjs-module-lexer with merve nodejs/node#61456 * chore: fixup patch indices * test: use fixture directories for sea tests nodejs/node#61167 * src: throw RangeError on failed ArrayBuffer BackingStore allocation * chore: fixup crypto patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
|
I've been having odd issues with my testing setup; I don't fully understand the problem, and haven't been able to reproduce it outside of a nix build, but I've been able to bisect the issue down to 68da144. Unfortunately, I haven't been able to pare this down to a minimal reproducer, nor can I share the full project; I'm running firefox playwright tests against a project built with vite, and the breakage seems to boil down to a difference in how import * behaves in the code built by vite running in the browser, which seems pretty cursed! My import looks like this: import * as Chord from "@tonaljs/chord" My code then uses Chord.get(), which works fine prior to this change and breaks afterwards with "Chord.get is not a function". Logging the imported Chord object shed some light on the problem: [Module: null prototype] {
chord: [Function (anonymous)],
chordScales: [Function: chordScales],
default: {
chord: [Getter],
chordScales: [Getter],
default: [Getter],
degrees: [Getter],
deprecate: [Getter],
detect: [Getter],
extended: [Getter],
get: [Getter],
getChord: [Getter],
reduced: [Getter],
steps: [Getter],
tokenize: [Getter],
transpose: [Getter]
},
degrees: [Function: degrees],
deprecate: [Function: deprecate],
detect: [Function: detect],
extended: [Function: extended],
'module.exports': {
chord: [Getter],
chordScales: [Getter],
default: [Getter],
degrees: [Getter],
deprecate: [Getter],
detect: [Getter],
extended: [Getter],
get: [Getter],
getChord: [Getter],
reduced: [Getter],
steps: [Getter],
tokenize: [Getter],
transpose: [Getter]
}
}
so somehow module.exports isn't exposed directly anymore? If anyone has any idea how this might be happening, it would be much appreciated! |
Sorry, something went wrong.
|
@lheckemann please open an issue to github.com/nodejs/merve |
Sorry, something went wrong.
Sorry, something went wrong.
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: nodejs#63323 Refs: nodejs#61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: #63323 Refs: #61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> PR-URL: #63885 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Anna Henningsen <anna@addaleax.net>
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: #63323 Refs: #61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> PR-URL: #63885 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Anna Henningsen <anna@addaleax.net>
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: #63323 Refs: #61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> PR-URL: #63885 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Anna Henningsen <anna@addaleax.net>
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: #63323 Refs: #61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> PR-URL: #63885 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Anna Henningsen <anna@addaleax.net>
CreateString() and Parse() in node_cjs_lexer.cc unconditionally called ToLocalChecked() on the results of String::NewFromOneByte(), String::NewFromUtf8() and Set::Add(). If string or handle allocation fails or an exception is pending on the isolate, these return an empty MaybeLocal and ToLocalChecked() aborts the process with "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal". Since Parse() is on the hot path of every ESM import of a CJS module (cjsPreparseModuleExports), propagate the failure as a regular pending JavaScript exception instead so callers can recover. Fixes: #63323 Refs: #61456 Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com> PR-URL: #63885 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Anna Henningsen <anna@addaleax.net>
| Back | FazBrowse Home | New Git URL |
Initially started a couple of years ago, the new cjs module lexer is 25% faster for cold importing cjs files. This change introduces a new dependency and removes the old one.
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1784/console
confidence improvement accuracy (*) esm/detect-esm-syntax.js n=10000 type='with-package-json' *** 1.47 % ±0.40% esm/detect-esm-syntax.js n=10000 type='without-package-json' *** 0.64 % ±0.35% esm/esm-legacyMainResolve.js resolvedFile='node_modules/non-exist' packageConfigMain='./index.js' packageJsonUrl='node_modules/test/package.json' n=10000 * 0.95 % ±0.92% esm/esm-legacyMainResolve.js resolvedFile='node_modules/non-exist' packageConfigMain='' packageJsonUrl='node_modules/test/package.json' n=10000 -0.06 % ±0.95% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.js' packageConfigMain='./index.js' packageJsonUrl='node_modules/test/package.json' n=10000 -0.72 % ±1.02% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.js' packageConfigMain='' packageJsonUrl='node_modules/test/package.json' n=10000 0.33 % ±0.62% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.json' packageConfigMain='./index.js' packageJsonUrl='node_modules/test/package.json' n=10000 0.38 % ±0.98% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.json' packageConfigMain='' packageJsonUrl='node_modules/test/package.json' n=10000 ** 0.84 % ±0.61% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.node' packageConfigMain='./index.js' packageJsonUrl='node_modules/test/package.json' n=10000 0.66 % ±1.04% esm/esm-legacyMainResolve.js resolvedFile='node_modules/test/index.node' packageConfigMain='' packageJsonUrl='node_modules/test/package.json' n=10000 0.21 % ±0.92% esm/esm-loader-defaultResolve.js specifier='./relative-existing.js' n=1000 -1.93 % ±5.48% esm/esm-loader-defaultResolve.js specifier='./relative-nonexistent.js' n=1000 -0.48 % ±1.94% esm/esm-loader-defaultResolve.js specifier='node:os' n=1000 -8.43 % ±9.28% esm/esm-loader-defaultResolve.js specifier='node:prefixed-nonexistent' n=1000 -8.48 % ±10.15% esm/esm-loader-defaultResolve.js specifier='unprefixed-existing' n=1000 0.56 % ±3.21% esm/esm-loader-defaultResolve.js specifier='unprefixed-nonexistent' n=1000 -0.08 % ±1.73% esm/esm-loader-import.js specifier='./relative-existing.js' n=1000 * 5.62 % ±5.09% esm/esm-loader-import.js specifier='./relative-nonexistent.js' n=1000 1.53 % ±2.90% esm/esm-loader-import.js specifier='data:text/javascript,{i}' n=1000 1.47 % ±2.73% esm/esm-loader-import.js specifier='node:os' n=1000 0.43 % ±7.59% esm/esm-loader-import.js specifier='node:prefixed-nonexistent' n=1000 2.29 % ±3.67% esm/import-cjs.js type='cold' *** 26.83 % ±0.58% esm/import-cjs.js type='warm' *** 11.95 % ±0.14% esm/import-esm-reload.js n=1000 count=1 0.08 % ±1.04% esm/import-esm-reload.js n=1000 count=100 * 0.99 % ±0.92% esm/import-meta.js valuesToRead='dirname-and-filename' n=1000 ** 1.11 % ±0.75% esm/import-meta.js valuesToRead='dirname' n=1000 0.50 % ±0.67% esm/import-meta.js valuesToRead='filename' n=1000 ** 1.17 % ±0.76% esm/import-meta.js valuesToRead='url' n=1000 -0.57 % ±0.77% esm/require-esm.js n=1000 exports='default' type='access' 0.77 % ±1.21% esm/require-esm.js n=1000 exports='default' type='all' 1.31 % ±1.75% esm/require-esm.js n=1000 exports='default' type='load' 0.06 % ±1.96% esm/require-esm.js n=1000 exports='named' type='access' 0.79 % ±1.05% esm/require-esm.js n=1000 exports='named' type='all' -0.54 % ±1.98% esm/require-esm.js n=1000 exports='named' type='load' -0.90 % ±2.32%