Skip to content

fix(pkg): expose ./package.json through the exports map - #15

Merged
deniscuciuc merged 1 commit into
mainfrom
fix/exports-package-json
Sep 10, 2026
Merged

deniscuciuc merged 1 commit into
mainfrom
fix/exports-package-json

Conversation

@deniscuciuc

Copy link
Copy Markdown
Owner

The exports map added in the 1.1.0 entry-point split did not list ./package.json, so tooling that reads a dependency's package.json — a common pattern — failed with ERR_PACKAGE_PATH_NOT_EXPORTED.

Found while verifying the published tarballs, not in the source tree: the source resolves fine, and only an installed package goes through the exports map. Most modern packages list this entry for exactly this reason.

Verified by packing a tarball and installing it: both require("<pkg>/package.json") and the main entry now resolve.

Tooling that reads a dependency's package.json — a common pattern — failed with
ERR_PACKAGE_PATH_NOT_EXPORTED, because the exports map added in the 1.1.0
entry-point split did not list it. Verified against a packed tarball, not just
the source tree.
@deniscuciuc
deniscuciuc merged commit 4cc4642 into main Sep 10, 2026
4 checks passed
@deniscuciuc
deniscuciuc deleted the fix/exports-package-json branch September 10, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant