From 9db33043683eb8875b6a8e4378dbd93bc3bf0f65 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 308eacd306bc28..1a634189090570 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -78,7 +78,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( @@ -87,7 +87,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' ); }