File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3441,6 +3441,10 @@ Node-API callbacks.
3441
3441
3442
3442
<!-- YAML
3443
3443
changes:
3444
+ - version:
3445
+ - REPLACEME
3446
+ pr-url: https://github.com/nodejs/node/pull/55017
3447
+ description: Application deprecation.
3444
3448
- version:
3445
3449
- v19.9.0
3446
3450
- v18.17.0
@@ -3453,7 +3457,7 @@ changes:
3453
3457
description: Documentation-only deprecation.
3454
3458
-->
3455
3459
3456
- Type: Documentation-only (supports [ ` --pending-deprecation ` ] [ ] )
3460
+ Type: Application (non- ` node_modules ` code only )
3457
3461
3458
3462
[ ` url.parse() ` ] [ ] behavior is not standardized and prone to errors that
3459
3463
have security implications. Use the [ WHATWG URL API] [ ] instead. CVEs are not
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const {
45
45
46
46
// This ensures setURLConstructor() is called before the native
47
47
// URL::ToObject() method is used.
48
- const { spliceOne } = require ( 'internal/util' ) ;
48
+ const { isInsideNodeModules , spliceOne } = require ( 'internal/util' ) ;
49
49
50
50
// WHATWG URL implementation provided by internal/url
51
51
const {
@@ -63,8 +63,6 @@ const {
63
63
64
64
const bindingUrl = internalBinding ( 'url' ) ;
65
65
66
- const { getOptionValue } = require ( 'internal/options' ) ;
67
-
68
66
// Original url.parse() API
69
67
70
68
function Url ( ) {
@@ -125,7 +123,7 @@ const {
125
123
let urlParseWarned = false ;
126
124
127
125
function urlParse ( url , parseQueryString , slashesDenoteHost ) {
128
- if ( ! urlParseWarned && getOptionValue ( '--pending-deprecation' ) ) {
126
+ if ( ! urlParseWarned && ! isInsideNodeModules ( ) ) {
129
127
urlParseWarned = true ;
130
128
process . emitWarning (
131
129
'`url.parse()` behavior is not standardized and prone to ' +
You can’t perform that action at this time.
0 commit comments