From 63c8371aad8641ecdc349ec51b00fd5a3a65825a Mon Sep 17 00:00:00 2001 From: Kuray Date: Sat, 15 Aug 2026 19:53:07 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20packaging=20hygiene=20=E2=80=94=20add=20?= =?UTF-8?q?types/exports=20map=20and=20files=20whitelist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package had no types field or exports map, and the published tarball shipped .husky hooks, TypeScript sources, tsconfig and lint dotfiles. types + exports now point at the published build/dist output with the types condition first, and a files whitelist trims the tarball to build/dist. Existing react/react-native peer dependencies were already present and are kept as-is. Version bumped to 0.1.1; no source changes. --- package.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2ab0367..12c1e60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-toggle-button", - "version": "0.1.0", + "version": "0.1.1", "description": "Cool and easy to use react native toggle button", "main": "./build/dist/ToggleButton.js", "repository": "git@github.com:WrathChaos/react-native-toggle-button.git", @@ -53,5 +53,17 @@ "husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier", "husky:commitlint": "npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'", "husky:prettier": "npx husky add .husky/pre-commit 'npm run prettier'" - } + }, + "types": "./build/dist/ToggleButton.d.ts", + "exports": { + ".": { + "types": "./build/dist/ToggleButton.d.ts", + "default": "./build/dist/ToggleButton.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "build/dist", + "!build/dist/tsconfig.tsbuildinfo" + ] }