Skip to content

Commit 181719d

Browse files
cjihrigtargos
authored andcommittedFeb 2, 2021
esm: update to correct deprecation code
#36918 landed with references to DEP0150, which is already used for a different deprecation. This commit updates the code to use DEP0151. PR-URL: #37147 Refs: #36918 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ae42658 commit 181719d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/internal/modules/esm/resolve.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
107107
basePath}.\n Automatic extension resolution of the "main" field is` +
108108
'deprecated for ES modules.',
109109
'DeprecationWarning',
110-
'DEP0150'
110+
'DEP0151'
111111
);
112112
else
113113
process.emitWarning(
@@ -116,7 +116,7 @@ function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
116116
StringPrototypeSlice(path, pkgPath.length)}", imported from ${basePath
117117
}.\nDefault "index" lookups for the main are deprecated for ES modules.`,
118118
'DeprecationWarning',
119-
'DEP0150'
119+
'DEP0151'
120120
);
121121
}
122122

0 commit comments

Comments
 (0)