Skip to content

repl: deprecate repl.builtinModules #57508

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

Conversation

dario-piotrowicz
Copy link
Member

Fixes #57504

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Mar 16, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/57504/deprecate-repl-builtinmodules branch 7 times, most recently from 39271fa to f38edf8 Compare March 16, 2025 22:45
Copy link
Member

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

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

Amazing, thanks! If CI is happy, I'm happy as well.

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 16, 2025
@aduh95
Copy link
Contributor

aduh95 commented Mar 16, 2025

Can you please open a PR that first doc-deprecates the API? Hum actually, I'm not sure whether --pending-deprecation changes would be semver-major, so that might be fine EDIT2: just checked, we have precedents for landing as semver-patch pending deprecations

@aduh95 aduh95 removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 16, 2025
@dario-piotrowicz

This comment was marked as outdated.

@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 Mar 17, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 17, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (1123585) to head (e9fd52f).
Report is 61 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57508   +/-   ##
=======================================
  Coverage   90.22%   90.23%           
=======================================
  Files         630      630           
  Lines      185055   185063    +8     
  Branches    36216    36221    +5     
=======================================
+ Hits       166975   166989   +14     
- Misses      11042    11043    +1     
+ Partials     7038     7031    -7     
Files with missing lines Coverage Δ
lib/repl.js 94.91% <100.00%> (+0.02%) ⬆️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

I would actually like to keep this around and just fix the issue. The reason is that we expose underscored modules in Module one and those should never be used.

The current issue with the repl exposed one is that it filters node: prefixed ones out. That should not be the case.

We can also update the documentation to say "all besides underscored'.

@aduh95
Copy link
Contributor

aduh95 commented Mar 17, 2025

I would actually like to keep this around

Any particular reason for that? Do you have a use-case in mind?

@dario-piotrowicz dario-piotrowicz force-pushed the dario/57504/deprecate-repl-builtinmodules branch from 37cfc74 to e9fd52f Compare March 25, 2025 00:08
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM

I do overall agree that this should not exist on the repl, since we already have it exposed elsewhere.

I suggest to deprecate the runtime usage of the underscored modules as well in different PRs.

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 4, 2025
@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 Apr 4, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/57508
✔  Done loading data for nodejs/node/pull/57508
----------------------------------- PR info ------------------------------------
Title      repl: deprecate `repl.builtinModules` (#57508)
Author     Dario Piotrowicz  (@dario-piotrowicz)
Branch     dario-piotrowicz:dario/57504/deprecate-repl-builtinmodules -> nodejs:main
Labels     repl, author ready, needs-ci
Commits    1
 - repl: deprecate `repl.builtinModules`
Committers 1
 - Dario Piotrowicz 
PR-URL: https://github.com/nodejs/node/pull/57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 16 Mar 2025 22:36:51 GMT
   ✔  Approvals: 6
   ✔  - Juan José Arboleda (@juanarbol): https://github.com/nodejs/node/pull/57508#pullrequestreview-2688852607
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/57508#pullrequestreview-2688878116
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/57508#pullrequestreview-2688878596
   ✔  - Xuguang Mei (@meixg): https://github.com/nodejs/node/pull/57508#pullrequestreview-2689145592
   ✔  - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/57508#pullrequestreview-2712875322
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/57508#pullrequestreview-2696025170
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-03-17T00:31:48Z: https://ci.nodejs.org/job/node-test-pull-request/65794/
   ⚠  Commits were pushed after the last Full PR CI run:
   ⚠  - repl: deprecate `repl.builtinModules`
- Querying data for job/node-test-pull-request/65794/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/14261203802

@aduh95 aduh95 added request-ci Add this label to start a Jenkins CI on a PR. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Apr 4, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 4, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 5, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 5, 2025
@nodejs-github-bot nodejs-github-bot merged commit e232b4a into nodejs:main Apr 5, 2025
67 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in e232b4a

@dario-piotrowicz dario-piotrowicz deleted the dario/57504/deprecate-repl-builtinmodules branch April 5, 2025 14:11
JonasBa pushed a commit to JonasBa/node that referenced this pull request Apr 11, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: nodejs#57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 6, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
RafaelGSS pushed a commit that referenced this pull request May 14, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 16, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 17, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 17, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 17, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
aduh95 added a commit that referenced this pull request May 19, 2025
Co-authored-by: Antoine du Hamel 
PR-URL: #57508
Reviewed-By: Juan José Arboleda 
Reviewed-By: Antoine du Hamel 
Reviewed-By: James M Snell 
Reviewed-By: Xuguang Mei 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Zijian Liu 
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. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repl.builtinModules doesn't contain all node.js builtin modules
9 participants