From 2de4e156979818fbbc504d16685fb0c33ada3da3 Mon Sep 17 00:00:00 2001 From: Kuray Date: Sat, 15 Aug 2026 19:41:41 +0300 Subject: [PATCH] fix(packaging): add react/react-native peerDependencies, types, exports 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 --- package.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 71fcbce..46270af 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,20 @@ { "name": "react-native-poll", - "version": "1.0.0", + "version": "1.0.1", "description": "Voting and poll library for React Native with fully customizable options", "main": "./build/dist/RNPoll.js", + "types": "./build/dist/RNPoll.d.ts", + "exports": { + ".": { + "types": "./build/dist/RNPoll.d.ts", + "default": "./build/dist/RNPoll.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "build/dist", + "README.md" + ], "repository": "git@github.com:WrathChaos/react-native-poll-starter.git", "author": "FreakyCoder ", "license": "MIT", @@ -25,7 +37,9 @@ "rn" ], "peerDependencies": { - "@freakycoder/react-native-bounceable": ">= 1.0.3" + "@freakycoder/react-native-bounceable": ">= 1.0.3", + "react": ">=17.0.0", + "react-native": ">=0.64.0" }, "devDependencies": { "@commitlint/cli": "^15.0.0",