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

lib, tools: remove duplicate requires #54987

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

Blocked by #54892


Updates the eslint rule to check if a require in a function is already defined at the top-level.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 17, 2024
@RedYetiDev RedYetiDev added the tools Issues and PRs related to the tools directory. label Sep 17, 2024
@@ -48,7 +48,6 @@ function resolveMainPath(main) {
} catch (err) {
if (defaultType === 'module' && err?.code === 'ENOENT') {
const { decorateErrorWithCommonJSHints } = require('internal/modules/esm/resolve');
const { getCWDURL } = require('internal/util');
Copy link
Member Author

Choose a reason for hiding this comment

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

Review note: #54942

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.06%. Comparing base (7014e50) to head (d7aee31).
Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54987      +/-   ##
==========================================
- Coverage   88.06%   88.06%   -0.01%     
==========================================
  Files         652      652              
  Lines      183545   183523      -22     
  Branches    35854    35854              
==========================================
- Hits       161648   161617      -31     
- Misses      15146    15149       +3     
- Partials     6751     6757       +6     
Files with missing lines Coverage Δ
lib/events.js 98.43% <100.00%> (-0.01%) ⬇️
lib/internal/abort_controller.js 97.88% <100.00%> (-0.03%) ⬇️
...ernal/bootstrap/switches/does_own_process_state.js 96.52% <100.00%> (+0.63%) ⬆️
lib/internal/main/worker_thread.js 95.43% <100.00%> (ø)
lib/internal/modules/cjs/loader.js 96.18% <100.00%> (-0.01%) ⬇️
lib/internal/modules/esm/loader.js 97.77% <100.00%> (+<0.01%) ⬆️
lib/internal/modules/esm/resolve.js 96.63% <ø> (-0.01%) ⬇️
lib/internal/modules/run_main.js 97.26% <ø> (-0.02%) ⬇️
lib/internal/process/pre_execution.js 93.52% <100.00%> (-0.44%) ⬇️
lib/internal/process/warning.js 94.76% <100.00%> (+1.21%) ⬆️

... and 20 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants