Skip to content

Commit d3d76c3

Browse 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

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎lib/punycode.js‎

Lines 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
constmaxInt=2147483647;// aka. 0x7FFFFFFF or 2^31-1
515

0 commit comments

Comments
 (0)