Skip to content

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

Draft
vedant713 wants to merge 1 commit intonodejs:mainfrom
vedant713:patch-4
Draft

fix: avoid false DEP0155 warning for "./*" exports on Windows (#58650)#58684
vedant713 wants to merge 1 commit intonodejs:mainfrom
vedant713:patch-4

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?

@AcidRaZor
Copy link

@vedant713 Did you find time to add tests yet? This would be useful for the wider community and has been sitting here for a while now

@guybedford
Copy link
Contributor

This is clearly not the right fix unfortunately. I will do some further investigation here.

@guybedford
Copy link
Contributor

I tried to replicate this today but was entirely unable to - #58650 (comment). If an updated replication is available please let me know.

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

5 participants