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 <rtrott@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
  • Loading branch information
aduh95 authored and danielleadams committed Apr 5, 2023
1 parent ad510d9 commit fe318dd
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 fe318dd

Please sign in to comment.