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 d3d76c3

Browse filesBrowse files
aduh95targos
authored andcommitted
punycode: add pending deprecation
PR-URL: #46719 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 1c6a92b commit d3d76c3
Copy full SHA for d3d76c3

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎lib/punycode.js‎

Copy file name to clipboardExpand all lines: lib/punycode.js
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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+
}
12+
313
/** Highest positive signed 32-bit float value */
414
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
515

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.