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 <[email protected]>
Reviewed-By: Zijian Liu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig committed Jan 30, 2021
1 parent 71cb829 commit d0a92e2
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 @@ -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(
Expand All @@ -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'
);
}

Expand Down

0 comments on commit d0a92e2

Please sign in to comment.