fix(packaging): types-first exports condition, package.json export, trim tarball - #18
Open
kuraydev wants to merge 1 commit into
Open
fix(packaging): types-first exports condition, package.json export, trim tarball#18kuraydev wants to merge 1 commit into
kuraydev wants to merge 1 commit into
Conversation
…json, trim tarball - Reorder the "exports" map so the "types" condition comes first: export conditions are order-sensitive, so with types listed after import/require, TypeScript under node16/bundler module resolution never reached the declaration files. - Add an explicit "default" fallback condition and a "./package.json" subpath export for tools that read package metadata. - Exclude src/__tests__ from the published tarball and explicitly whitelist README/LICENSE. - Bump version to 2.2.1.
kuraydev
force-pushed
the
fix/packaging-hygiene
branch
from
August 16, 2026 18:38
3ff70ab to
25c96fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packaging hygiene
Same pattern as react-native-bouncy-checkbox #822. No source changes —
package.jsononly.This repo was already in the best shape of the batch (peer deps declared,
fileswhitelist present, no bogus dependencies), but theexportsmap had a real defect.What was wrong
exportsmap thetypescondition was listed last, afterimport/require. Export conditions are order-sensitive, so TypeScript undernode16/bundlermodule resolution matchedimport/requirefirst and never reached the declaration files../package.jsonsubpath export for tooling that reads package metadata.src/__tests__/.Fixes
exportssotypescomes first; added adefaultfallback and"./package.json": "./package.json"(layout verified against thenpm packof 2.2.0).src/__tests__from the tarball; explicitly whitelisted README/LICENSE.Publish after npm account migration.