esm: do not call `getSource` when format is `commonjs` by fasttime · Pull Request #50465 · nodejs/node

@nodejs-github-bot added esm

Issues and PRs related to the ECMAScript Modules implementation.

needs-ci

PRs that need a full CI run.

labels

Oct 29, 2023

@fasttime fasttime marked this pull request as ready for review

October 29, 2023 10:27

aduh95

@aduh95 aduh95 added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

request-ci

Add this label to start a Jenkins CI on a PR.

labels

Nov 8, 2023

This was referenced

Nov 9, 2023

@aduh95 aduh95 added the commit-queue-squash

Add this label to instruct the Commit Queue to squash all the PR commits into the first one.

label

Nov 29, 2023

RafaelGSS pushed a commit that referenced this pull request

Nov 29, 2023
Ensure that `defaultLoad` does not uselessly access the file system to
get the source of modules that are known to be in CommonJS format.

This allows CommonJS imports to resolve in the current phase of the
event loop.

Refs: eslint/eslint#17683
PR-URL: #50465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

UlisesGascon pushed a commit that referenced this pull request

Dec 11, 2023
Ensure that `defaultLoad` does not uselessly access the file system to
get the source of modules that are known to be in CommonJS format.

This allows CommonJS imports to resolve in the current phase of the
event loop.

Refs: eslint/eslint#17683
PR-URL: #50465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

UlisesGascon pushed a commit that referenced this pull request

Dec 13, 2023
Ensure that `defaultLoad` does not uselessly access the file system to
get the source of modules that are known to be in CommonJS format.

This allows CommonJS imports to resolve in the current phase of the
event loop.

Refs: eslint/eslint#17683
PR-URL: #50465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

UlisesGascon pushed a commit that referenced this pull request

Dec 15, 2023
Ensure that `defaultLoad` does not uselessly access the file system to
get the source of modules that are known to be in CommonJS format.

This allows CommonJS imports to resolve in the current phase of the
event loop.

Refs: eslint/eslint#17683
PR-URL: #50465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

UlisesGascon pushed a commit that referenced this pull request

Dec 19, 2023
Ensure that `defaultLoad` does not uselessly access the file system to
get the source of modules that are known to be in CommonJS format.

This allows CommonJS imports to resolve in the current phase of the
event loop.

Refs: eslint/eslint#17683
PR-URL: #50465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

codebytere added a commit to electron/electron that referenced this pull request

Jan 10, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 10, 2024

zcbenz pushed a commit to electron/electron that referenced this pull request

Jan 12, 2024

zcbenz pushed a commit to electron/electron that referenced this pull request

Jan 12, 2024

zcbenz pushed a commit to electron/electron that referenced this pull request

Jan 12, 2024

zcbenz pushed a commit to electron/electron that referenced this pull request

Jan 12, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 15, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 15, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 15, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 15, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 16, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 16, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 18, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 18, 2024

jkleinsc pushed a commit to electron/electron that referenced this pull request

Jan 18, 2024

jkleinsc pushed a commit to electron/electron that referenced this pull request

Jan 18, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 18, 2024

codebytere added a commit to electron/electron that referenced this pull request

Jan 18, 2024

jkleinsc pushed a commit to electron/electron that referenced this pull request

Jan 18, 2024
* chore: bump node in DEPS to v20.11.0

* module: bootstrap module loaders in shadow realm

nodejs/node#48655

* src: add commit hash shorthand in zlib version

nodejs/node#50158

* v8,tools: expose necessary V8 defines

nodejs/node#50820

* esm: do not call getSource when format is commonjs

nodejs/node#50465

* esm: fallback to readFileSync when source is nullish

nodejs/node#50825

* vm: allow dynamic import with a referrer realm

nodejs/node#50360

* test: skip test-diagnostics-channel-memory-leak.js

nodejs/node#50327

* esm: do not call getSource when format is commonjs

nodejs/node#50465

* lib: fix assert throwing different error messages in ESM and CJS

nodejs/node#50634

* src: fix compatility with upcoming V8 12.1 APIs

nodejs/node#50709

* deps: update base64 to 0.5.1

nodejs/node#50629

* src: avoid silent coercion to signed/unsigned int

nodejs/node#50663

* src: fix compatility with upcoming V8 12.1 APIs

nodejs/node#50709

* chore: fix patch indices

* chore: update patches

* test: disable TLS cipher test

This can't be enabled owing to BoringSSL incompatibilities.

nodejs/node#50186

* fix: check for Buffer and global definition in shadow realm

nodejs/node#51239

* test: disable parallel/test-shadow-realm-custom-loader

Incompatible with our asar logic, resulting in the following failure:

> Failed to CompileAndCall electron script: electron/js2c/asar_bundle

* chore: remove deleted parallel/test-crypto-modp1-error test

* test: make test-node-output-v8-warning generic

nodejs/node#50421

* chore: fixup ModuleWrap patch

* test: match wpt/streams/transferable/transform-stream-members.any.js to upstream

* fix: sandbox is not enabled on arm

* chore: disable v8 sandbox on ia32/arm

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>