url: suppress warnings from url.format/url.resolve inside node_modules#62005
Open
Renegade334 wants to merge 1 commit intonodejs:mainfrom
Open
url: suppress warnings from url.format/url.resolve inside node_modules#62005Renegade334 wants to merge 1 commit intonodejs:mainfrom
Renegade334 wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Renegade334
commented
Feb 26, 2026
Comment on lines
+16
to
+23
| // No warnings from inside node_modules | ||
| common.spawnPromisified(process.execPath, [fixturePath]).then( | ||
| common.mustCall(({ code, signal, stderr }) => { | ||
| assert.strictEqual(code, 0); | ||
| assert.strictEqual(signal, null); | ||
| assert.doesNotMatch(stderr, /\[DEP0169\]/); | ||
| }) | ||
| ); |
Member
Author
There was a problem hiding this comment.
Test result in affected versions:
AssertionError [ERR_ASSERTION]: The input was expected to not match the regular expression /\[DEP0169\]/. Input:
'(node:2065574) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.\n' +
'(Use `node --trace-deprecation ...` to show where the warning was created)\n'
at /tmp/node/test/parallel/test-url-parse-deprecation.js:21:12
at /tmp/node/test/common/index.js:507:15
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '(node:2065574) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.\n' +
'(Use `node --trace-deprecation ...` to show where the warning was created)\n',
expected: /\[DEP0169\]/,
operator: 'doesNotMatch',
diff: 'simple'
}
Node.js v24.14.0
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62005 +/- ##
==========================================
- Coverage 89.72% 89.72% -0.01%
==========================================
Files 676 676
Lines 205988 205988
Branches 39490 39488 -2
==========================================
- Hits 184830 184813 -17
- Misses 13295 13303 +8
- Partials 7863 7872 +9
🚀 New features to boost your workflow:
|
legendecas
reviewed
Feb 26, 2026
| }); | ||
|
|
||
| // Warning should only happen once per process. | ||
| common.expectWarning({ |
Member
There was a problem hiding this comment.
Why is this expectation removed for direct url.parse() calls?
Member
Author
There was a problem hiding this comment.
It isn't, it's just moved into the consolidated deprecation test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #61724