Skip to content

Commit

Permalink
punycode: add pending deprecation
Browse files Browse the repository at this point in the history
PR-URL: #46719
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
  • Loading branch information
aduh95 authored and targos committed Mar 13, 2023
1 parent 1c6a92b commit d3d76c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/punycode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
'use strict';

const { getOptionValue } = require('internal/options');
if (getOptionValue('--pending-deprecation')){
process.emitWarning(
'The `punycode` module is deprecated. Please use a userland ' +
'alternative instead.',
'DeprecationWarning',
'DEP0040',
);
}

/** Highest positive signed 32-bit float value */
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1

Expand Down

0 comments on commit d3d76c3

Please sign in to comment.