Skip to content

esm: move DEP0155 and DEP0166 to End-of-Life - #67488

Open
jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:eol-dep0155-dep0166
Open

jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:eol-dep0155-dep0166

Conversation

@jasnell

@jasnell jasnell commented Nov 15, 2026

Copy link
Copy Markdown
Member

Package "exports" subpaths ending in "/" now throw ERR_INVALID_MODULE_SPECIFIER instead of emitting DEP0155, matching the existing "imports" behavior and the documented resolution algorithm.

"imports" and "exports" targets containing empty segments (double, leading, or trailing slashes after the initial "./") now throw ERR_INVALID_PACKAGE_TARGET, and pattern matches containing empty segments now throw ERR_INVALID_MODULE_SPECIFIER, instead of emitting DEP0166.

The isPathMap parameter, which only served to suppress DEP0166 for trailing slash pattern resolutions, is removed.

DEP0155 has been a runtime deprecation since v17.0.0, DEP0166 since v19.0.0.

Refs: #40117
Refs: #44495

Package "exports" subpaths ending in "/" now throw
ERR_INVALID_MODULE_SPECIFIER instead of emitting DEP0155, matching
the existing "imports" behavior and the documented resolution
algorithm.

"imports" and "exports" targets containing empty segments (double,
leading, or trailing slashes after the initial "./") now throw
ERR_INVALID_PACKAGE_TARGET, and pattern matches containing empty
segments now throw ERR_INVALID_MODULE_SPECIFIER, instead of emitting
DEP0166.

The isPathMap parameter, which only served to suppress DEP0166 for
trailing slash pattern resolutions, is removed.

DEP0155 has been a runtime deprecation since v17.0.0, DEP0166 since
v19.0.0.

Refs: nodejs#40117
Refs: nodejs#44495
Assisted-by: Claude
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnell requested a review from a team November 15, 2026 16:13
@jasnell jasnell added semver-major PRs that contain breaking changes and should be released in the next major version. deprecations Issues and PRs related to deprecations. labels Nov 15, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/userland-migrations

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Nov 15, 2026
Comment thread doc/api/deprecations.md Resolved
Comment thread doc/api/deprecations.md Resolved
Co-authored-by: James M Snell <jasnell@gmail.com>
@jasnell jasnell added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Nov 15, 2026
@panva
panva requested a review from a team November 15, 2026 16:29
@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 15, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 15, 2026
@nodejs-github-bot

This comment was marked as outdated.

@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.67%. Comparing base (d105ef7) to head (037c4cb).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67488   +/-   ##
=======================================
  Coverage   90.67%   90.67%           
=======================================
  Files         799      799           
  Lines      280245   280159   -86     
  Branches    54125    54099   -26     
=======================================
- Hits       254100   254042   -58     
+ Misses      16280    16242   -38     
- Partials     9865     9875   +10     
Files with missing lines Coverage Δ
lib/internal/modules/esm/resolve.js 98.94% <100.00%> (-0.09%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot

nodejs-github-bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

@jasnell

jasnell commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

@nodejs/tsc ... will need another sign off here

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jasnell jasnell added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. deprecations Issues and PRs related to deprecations. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants