| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 56b2148 commit 21362cc
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,16 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - | ||
| 3 | - process.emitWarning( | ||
| 4 | - 'The `punycode` module is deprecated. Please use a userland ' + | ||
| 5 | - 'alternative instead.', | ||
| 6 | - 'DeprecationWarning', | ||
| 7 | - 'DEP0040', | ||
| 8 | - ); | ||
| 2 | + const { | ||
| 3 | + isInsideNodeModules, | ||
| 4 | + } = internalBinding('util'); | ||
| 5 | + | ||
| 6 | + if (!isInsideNodeModules(100, true)) { | ||
| 7 | + process.emitWarning( | ||
| 8 | + 'The `punycode` module is deprecated. Please use a userland ' + | ||
| 9 | + 'alternative instead.', | ||
| 10 | + 'DeprecationWarning', | ||
| 11 | + 'DEP0040', | ||
| 12 | + ); | ||
| 13 | + } | ||
| 9 | 14 | ||
| 10 | 15 | /** Highest positive signed 32-bit float value */ | |
| 11 | 16 | const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,10 @@ | |||
| 1 | - node:punycode:49 | ||
| 1 | + node:punycode:54 | ||
| 2 | 2 | throw new RangeError(errors[type]); | |
| 3 | 3 | ^ | |
| 4 | 4 | ||
| 5 | 5 | RangeError: Invalid input | |
| 6 | - at error (node:punycode:49:8) | ||
| 7 | - at Object.decode (node:punycode:242:5) | ||
| 6 | + at error (node:punycode:54:8) | ||
| 7 | + at Object.decode (node:punycode:247:5) | ||
| 8 | 8 | at Object.<anonymous> (*core_line_numbers.js:13:10) | |
| 9 | 9 | ||
| 10 | 10 | Node.js * | |
| Back | FazBrowse Home | New Git URL |
0 commit comments