fix(packaging): react/react-native peerDependencies, types/exports map, files whitelist - #17
Open
kuraydev wants to merge 1 commit into
Open
fix(packaging): react/react-native peerDependencies, types/exports map, files whitelist#17kuraydev wants to merge 1 commit into
kuraydev wants to merge 1 commit into
Conversation
…ts map, and files whitelist - Add react (>=17.0.0) and react-native (>=0.64.0) to peerDependencies alongside the existing @freakycoder/react-native-bounceable peer, which stays because it is imported by lib/RNPoll.tsx. - Add an explicit "types" field pointing at build/dist/RNPoll.d.ts, matching the published tarball layout. - Add an "exports" map with a "types" condition and a "./package.json" subpath so modern bundlers and TypeScript moduleResolution "bundler"/ "node16" resolve the package correctly. - Add a "files" whitelist (build/dist, README) so the published tarball no longer ships .idea/, .husky/, dotfiles, and raw lib/ sources. - Bump version to 1.0.1. No source changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 pass (same pattern as react-native-bouncy-checkbox #822). No source changes.
What was wrong
peerDependencieslisted only@freakycoder/react-native-bounceable; react/react-native were implicit.typesfield and noexportsmap, so TypeScriptmoduleResolution: "bundler"/"node16"and modern bundlers could not resolve the package cleanly.fileswhitelist: the published tarball ships.idea/,.husky/, dotfiles,tsconfig.json, and rawlib/sources.Fixes
react (>=17.0.0)andreact-native (>=0.64.0)topeerDependencies.@freakycoder/react-native-bounceableas a peer dependency: it IS actually imported (lib/components/RNPollItem.tsx), so it is not a bogus entry."types": "./build/dist/RNPoll.d.ts"and anexportsmap matching the published tarball layout (verified vianpm pack react-native-poll@latest):.→ types./build/dist/RNPoll.d.ts, default./build/dist/RNPoll.js, plus./package.json."files": ["build/dist", "README.md"](this repo has no LICENSE file; thelicensefield says MIT — worth adding a LICENSE file separately).Publish after npm account migration.
🤖 Generated with Claude Code