Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esm: update loaders warning #49633

Merged
merged 7 commits into from
Sep 19, 2023

Conversation

GeoffreyBooth
Copy link
Member

@GeoffreyBooth GeoffreyBooth commented Sep 13, 2023

Following up #49597, this PR edits the warning when --experimental-loader / --loader is used to tell people to use --import / register() instead, which has no warning. The separate warning about globalPreload remains.

@GeoffreyBooth GeoffreyBooth added experimental Issues and PRs related to experimental features. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders labels Sep 13, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 13, 2023
@aduh95
Copy link
Contributor

aduh95 commented Sep 13, 2023

Can we keep the warning for use of --loader? This one is not RC IIUC, so it should still have a warning.

@GeoffreyBooth
Copy link
Member Author

GeoffreyBooth commented Sep 14, 2023

Can we keep the warning for use of --loader? This one is not RC IIUC, so it should still have a warning.

It turns out the previous warning was only for --loader / --experimental-loader, not for register. So people already using the new --import / register flow aren’t seeing any warnings. I updated this to change the warning to push people in that direction. @aduh95

./node --loader ./test/fixtures/es-module-loaders/never-settling-resolve-step/loader.mjs \
  ./test/fixtures/es-module-loaders/never-settling-resolve-step/race.cjs

(node:49878) ExperimentalWarning: `--experimental-loader` may be removed in the future;
  instead use `--import` to reference a file that calls `register()`

@GeoffreyBooth GeoffreyBooth changed the title esm: remove loaders warning esm: update loaders warning Sep 14, 2023
test/es-module/test-esm-experimental-warnings.mjs Outdated Show resolved Hide resolved
lib/internal/modules/esm/loader.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBooth GeoffreyBooth added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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 18, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Sep 18, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/49633
✔  Done loading data for nodejs/node/pull/49633
----------------------------------- PR info ------------------------------------
Title      esm: update loaders warning (#49633)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     GeoffreyBooth:remove-loaders-warning -> nodejs:main
Labels     experimental, esm, author ready, needs-ci, loaders, commit-queue-squash
Commits    7
 - esm: update loaders warning
 - Change warning to be specific to --experimental-loader
 - Update test/es-module/test-esm-experimental-warnings.mjs
 - Update test/es-module/test-esm-experimental-warnings.mjs
 - Improve warning
 - lint
 - `readableURIEncode`
Committers 1
 - Antoine du Hamel 
PR-URL: https://github.com/nodejs/node/pull/49633
Reviewed-By: Jacob Smith 
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: James M Snell 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/49633
Reviewed-By: Jacob Smith 
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: James M Snell 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - esm: update loaders warning
   ⚠  - Change warning to be specific to --experimental-loader
   ⚠  - Update test/es-module/test-esm-experimental-warnings.mjs
   ⚠  - Update test/es-module/test-esm-experimental-warnings.mjs
   ⚠  - Improve warning
   ⚠  - lint
   ⚠  - `readableURIEncode`
   ℹ  This PR was created on Wed, 13 Sep 2023 04:59:11 GMT
   ✔  Approvals: 3
   ✔  - Jacob Smith (@JakobJingleheimer): https://github.com/nodejs/node/pull/49633#pullrequestreview-1623900278
   ✔  - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/49633#pullrequestreview-1625510070
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/49633#pullrequestreview-1629979006
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-09-18T16:05:36Z: https://ci.nodejs.org/job/node-test-pull-request/54041/
- Querying data for job/node-test-pull-request/54041/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/6225715618

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Nice to see the progress here. I'd love to see a short flag for --import at some point as well.

lib/internal/modules/esm/loader.js Show resolved Hide resolved
@GeoffreyBooth GeoffreyBooth added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Sep 19, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 19, 2023
@nodejs-github-bot nodejs-github-bot merged commit f91b4e2 into nodejs:main Sep 19, 2023
40 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in f91b4e2

ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
PR-URL: #49633
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
This was referenced Sep 28, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#49633
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
PR-URL: nodejs#49633
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
@targos targos added the backported-to-v18.x PRs backported to the v18.x-staging branch. label Nov 23, 2023
targos pushed a commit that referenced this pull request Nov 23, 2023
PR-URL: #49633
Backport-PR-URL: #50669
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49633
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49633
Backport-PR-URL: nodejs/node#50669
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backported-to-v18.x PRs backported to the v18.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. loaders Issues and PRs related to ES module loaders needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants