Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b08c4c

Browse filesBrowse files
authored
lib: runtime deprecate punycode
PR-URL: #47202 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 74b9cf2 commit 4b08c4c
Copy full SHA for 4b08c4c

File tree

Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
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.
Collapse file

‎lib/punycode.js‎

Copy file name to clipboardExpand all lines: lib/punycode.js
+6-9Lines changed: 6 additions & 9 deletions
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
Collapse file

‎test/message/core_line_numbers.out‎

Copy file name to clipboardExpand all lines: test/message/core_line_numbers.out
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.