Skip to content

Commit

Permalink
esm: update to correct deprecation code
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
cjihrig authored and targos committed Sep 4, 2021
1 parent 7378b84 commit 9db3304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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'
);
}

Expand Down

0 comments on commit 9db3304

Please sign in to comment.