Closed ahmedelgabri closed 5 months ago
Thanks! Let's hope this doesn't explode something for someone somewhere. Given that it touches package config, it probably will🥹
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 8240372216: | 0.0% |
Covered Lines: | 647 |
Relevant Lines: | 648 |
:tada: This PR is included in version 10.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This will avoid breaking older tools that try to read
package.json
files from packages using package name instead of absolute path.Because when
exports
is set, accessing files that's not specified in theexports
property is not allowed by node and it will throw aERR_PACKAGE_PATH_NOT_EXPORTED
error (rightly so).This easily reproducible in the
node
repl.This will throw
This will not throw
Something similar has been mentioned in this great article https://blog.isquaredsoftware.com/2023/08/esm-modernization-lessons/#issue-history by @markerikson (sorry for the ping, feel free to ignore) when he worked on modernizing
@reduxjs/toolkit
(which depends onimmer
and this is how I found the issue)Similar issues in the wild on GitHub for
Package subpath './package.json' is not defined by "exports"
https://github.com/search?q=%22Package+subpath+%27.%2Fpackage.json%27+is+not+defined+by+%22exports%22%22&type=issues