Skip to content

Commit 4b08c4c

Browse files
authored
lib: runtime deprecate punycode
PR-URL: #47202 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 74b9cf2 commit 4b08c4c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

doc/api/deprecations.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ The [`require.extensions`][] property is deprecated.
872872

873873
<!-- YAML
874874
changes:
875+
- version: REPLACEME
876+
pr-url: https://github.com/nodejs/node/pull/47202
877+
description: Runtime deprecation.
875878
- version: v16.6.0
876879
pr-url: https://github.com/nodejs/node/pull/38444
877880
description: Added support for `--pending-deprecation`.
@@ -880,7 +883,7 @@ changes:
880883
description: Documentation-only deprecation.
881884
-->
882885

883-
Type: Documentation-only (supports [`--pending-deprecation`][])
886+
Type: Runtime
884887

885888
The [`punycode`][] module is deprecated. Please use a userland alternative
886889
instead.

lib/punycode.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
'use strict';
22

3-
const { getOptionValue } = require('internal/options');
4-
if (getOptionValue('--pending-deprecation')){
5-
process.emitWarning(
6-
'The `punycode` module is deprecated. Please use a userland ' +
7-
'alternative instead.',
8-
'DeprecationWarning',
9-
'DEP0040',
10-
);
11-
}
3+
process.emitWarning(
4+
'The `punycode` module is deprecated. Please use a userland ' +
5+
'alternative instead.',
6+
'DeprecationWarning',
7+
'DEP0040',
8+
);
129

1310
/** Highest positive signed 32-bit float value */
1411
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1

test/message/core_line_numbers.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
node:punycode:52
1+
node:punycode:49
22
throw new RangeError(errors[type]);
33
^
44

55
RangeError: Invalid input
6-
at error (node:punycode:52:8)
6+
at error (node:punycode:49:8)
77
at Object.decode (node:punycode:*:*)
88
at Object.<anonymous> (*test*message*core_line_numbers.js:*:*)
99

0 commit comments

Comments
 (0)