From d0a92e2c32b07bf5e9df4c9651951666f3080b8d Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 30 Jan 2021 09:51:58 -0500 Subject: [PATCH] esm: update to correct deprecation code https://github.com/nodejs/node/pull/36918 landed with references to DEP0150, which is already used for a different deprecation. This commit updates the code to use DEP0151. PR-URL: https://github.com/nodejs/node/pull/37147 Refs: https://github.com/nodejs/node/pull/36918 Reviewed-By: Antoine du Hamel Reviewed-By: Zijian Liu Reviewed-By: James M Snell --- lib/internal/modules/esm/resolve.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index d3867a07b1336b..043e31dc2b66f0 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -107,7 +107,7 @@ function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) { basePath}.\n Automatic extension resolution of the "main" field is` + 'deprecated for ES modules.', 'DeprecationWarning', - 'DEP0150' + 'DEP0151' ); else process.emitWarning( @@ -116,7 +116,7 @@ function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) { StringPrototypeSlice(path, pkgPath.length)}", imported from ${basePath }.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', - 'DEP0150' + 'DEP0151' ); }