Skip to content

Commit fe318dd

Browse files
aduh95danielleadams
authored andcommitted
punycode: add pending deprecation
PR-URL: #46719 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Paolo Insogna <[email protected]>
1 parent ad510d9 commit fe318dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/punycode.js

+10
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)