Skip to content

esm: fix cache collision on JSON files using file: URL - #49887

Merged
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
aduh95:json-cache-collision
Sep 29, 2023
Merged

esm: fix cache collision on JSON files using file: URL#49887
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
aduh95:json-cache-collision

Conversation

@aduh95

Copy link
Copy Markdown
Contributor

Fixes: #49724

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Sep 26, 2023

@GeoffreyBoothGeoffreyBooth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to create the fixtures dynamically rather than adding files to test/fixtures/es-modules?

Comment threadlib/internal/modules/esm/translators.js
@aduh95

Copy link
Copy Markdown
ContributorAuthor

Why do we need to create the fixtures dynamically rather than adding files to test/fixtures/es-modules?

The goal of the test is to ensure that the ESM loader is able to return 2 modules from the same path. We wouldn't want to modify a fixtures, otherwise it could pollute the git status.

Comment threadtest/es-module/test-esm-json.mjs Outdated
@aduh95aduh95 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 Sep 27, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@JakobJingleheimerJakobJingleheimer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Comment threadlib/internal/modules/esm/translators.js Outdated
Co-authored-by: Jordan Harband <ljharb@gmail.com>
@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 28, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 28, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@atlowChemiatlowChemi added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Sep 29, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 29, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 7f0e36a into nodejs:mainSep 29, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 7f0e36a

@aduh95
aduh95 deleted the json-cache-collision branch September 29, 2023 08:49
aduh95 added a commit to aduh95/node that referenced this pull request Oct 14, 2023
PR-URL: nodejs#49887Fixes: nodejs#49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
PR-URL: nodejs#49887Fixes: nodejs#49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #49887Fixes: #49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
@targostargos mentioned this pull request Nov 12, 2023
targos pushed a commit that referenced this pull request Nov 23, 2023
PR-URL: #49887
Backport-PR-URL: #50669Fixes: #49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
@targostargos mentioned this pull request Nov 28, 2023
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#49887Fixes: nodejs#49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49887
Backport-PR-URL: nodejs/node#50669Fixes: nodejs/node#49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49887
Backport-PR-URL: nodejs/node#50669Fixes: nodejs/node#49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.esmIssues and PRs related to the ECMAScript Modules implementation.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loader-returned sources always-cached when imported with assert { type: 'json' }

9 participants

@aduh95@nodejs-github-bot@ljharb@GeoffreyBooth@anonrig@JakobJingleheimer@atlowChemi@LiviaMedeiros@targos