From c385044633b1788c6b9d0301ef47ac5c7332025e Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 21 Mar 2023 15:26:12 -0400 Subject: [PATCH] lib: runtime deprecate punycode --- doc/api/deprecations.md | 5 ++++- lib/punycode.js | 15 ++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 95f53d05768589..127ff704f2a150 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -872,6 +872,9 @@ The [`require.extensions`][] property is deprecated. -Type: Documentation-only (supports [`--pending-deprecation`][]) +Type: Runtime The [`punycode`][] module is deprecated. Please use a userland alternative instead. diff --git a/lib/punycode.js b/lib/punycode.js index d99588c7aec8f4..7dfe552a5c9efa 100644 --- a/lib/punycode.js +++ b/lib/punycode.js @@ -1,14 +1,11 @@ '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', - ); -} +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