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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy