Skip to content

fix: avoid false DEP0155 warning for "./*" exports on Windows (#58650) #58684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vedant713
Copy link

@vedant713 vedant713 commented Jun 12, 2025

  • The logic for emitting the DEP0155 warning now checks that the export key is exactly "./" before displaying the warning.
  • Pattern mappings such as "./*" and valid subpath exports are no longer affected.

Fixes #58650

…ows Ensure DEP0155 deprecation warning is only emitted for exact "./" export keys, not for "./*" or other subpath patterns. This avoids false positives when using valid pattern exports in package.json, aligning behavior with Node.js documentation.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@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 Jun 12, 2025
@JakobJingleheimer
Copy link
Member

Thanks! Could you please include a test-case so we can avoid a regression?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEP0155 false deprecation warning for "./*" exports on Windows in valid packages
3 participants