From 1c2e5de07a4206a9202546d6e93bdcbb2d5a0e12 Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Wed, 21 Aug 2019 10:38:36 +0530 Subject: [PATCH] chore: configure publishing packages --- .gitignore | 2 +- README.md | 10 ++++++++++ lerna.json | 14 ++++++++++++-- package.json | 2 +- packages/bottom-tabs/package.json | 13 ++++++++++++- packages/core/package.json | 9 ++++++++- packages/drawer/package.json | 14 +++++++++++++- packages/example/package.json | 6 ++++-- packages/material-bottom-tabs/package.json | 14 +++++++++++++- packages/material-top-tabs/package.json | 14 +++++++++++++- packages/native/package.json | 10 +++++++++- packages/routers/package.json | 9 ++++++++- packages/stack/package.json | 13 ++++++++++++- yarn.lock | 2 +- 14 files changed, 117 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index f9b9819b..34fe0dbf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,8 +15,8 @@ web-build/ web-report/ npm-debug.* -yarn-error.log +*.log *.jks *.p8 *.p12 diff --git a/README.md b/README.md index bc4cd6da..ed60a80f 100644 --- a/README.md +++ b/README.md @@ -487,3 +487,13 @@ Then run the tests: ```sh yarn test ``` + +## Publishing + +To publish a new version, first we need to export a `GH_TOKEN` environment variable as mentioned [here](https://github.com/lerna/lerna/tree/master/commands/version#--create-release-type). Then run: + +```sh +lerna publish +``` + +This will automatically bump the version and publish the packages. It'll also publish the changelogs on GitHub for each package. diff --git a/lerna.json b/lerna.json index 9c6cfff0..f1f8ac72 100644 --- a/lerna.json +++ b/lerna.json @@ -1,8 +1,18 @@ { - "version": "0.0.0", "packages": [ "packages/*" ], "npmClient": "yarn", - "useWorkspaces": true + "useWorkspaces": true, + "version": "independent", + "command": { + "publish": { + "allowBranch": "master", + "conventionalCommits": true, + "createRelease": "github", + "preId": "alpha", + "preDistTag": "next", + "message": "chore: publish" + } + } } diff --git a/package.json b/package.json index 49f48f20..6f06cc4a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "jest": "^24.8.0", "lerna": "^3.16.4", "prettier": "^1.18.2", - "typescript": "^3.5.1" + "typescript": "^3.5.3" }, "resolutions": { "react": "16.8.3", diff --git a/packages/bottom-tabs/package.json b/packages/bottom-tabs/package.json index 9bcacb76..2beb3e29 100644 --- a/packages/bottom-tabs/package.json +++ b/packages/bottom-tabs/package.json @@ -1,5 +1,15 @@ { "name": "@react-navigation/bottom-tabs", + "description": "Bottom tab navigator following iOS design guidelines", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "tab" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -25,7 +35,8 @@ "@types/react-native": "^0.60.2", "del-cli": "^2.0.0", "react": "16.8.3", - "react-native": "^0.59.8" + "react-native": "^0.59.8", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/packages/core/package.json b/packages/core/package.json index 77b5cbb7..abd83943 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,11 @@ { "name": "@react-navigation/core", + "description": "Core utilities for building navigators", + "keywords": [ + "react", + "react-native", + "react-navigation" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -26,7 +32,8 @@ "del-cli": "^2.0.0", "react": "^16.8.3", "react-native-testing-library": "^1.9.1", - "react-test-renderer": "^16.8.3" + "react-test-renderer": "^16.8.3", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "^16.8.3" diff --git a/packages/drawer/package.json b/packages/drawer/package.json index 03b572fa..81fffc62 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -1,5 +1,16 @@ { "name": "@react-navigation/drawer", + "description": "Drawer navigator component with animated transitions and gesturess", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "material", + "drawer" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -28,7 +39,8 @@ "react-native": "^0.59.8", "react-native-gesture-handler": "^1.3.0", "react-native-reanimated": "^1.1.0", - "react-native-screens": "^1.0.0-alpha.22" + "react-native-screens": "^1.0.0-alpha.22", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/packages/example/package.json b/packages/example/package.json index baa85b00..65ff1c3c 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,7 @@ { "name": "@react-navigation/example", - "version": "0.0.0", + "description": "Demo app to showcase various functionality of React Navigation", + "version": "5.0.0-alpha.0", "private": true, "workspaces": { "nohoist": [ @@ -40,6 +41,7 @@ "@types/react": "^16.8.23", "@types/react-native": "^0.57.65", "babel-preset-expo": "^6.0.0", - "expo-cli": "^3.0.6" + "expo-cli": "^3.0.6", + "typescript": "^3.5.3" } } diff --git a/packages/material-bottom-tabs/package.json b/packages/material-bottom-tabs/package.json index f53c401a..15c335c4 100644 --- a/packages/material-bottom-tabs/package.json +++ b/packages/material-bottom-tabs/package.json @@ -1,5 +1,16 @@ { "name": "@react-navigation/material-bottom-tabs", + "description": "Integration for bottom navigation component from react-native-paper", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "material", + "tab" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -27,7 +38,8 @@ "react": "16.8.3", "react-native": "^0.59.8", "react-native-paper": "^3.0.0-alpha.3", - "react-native-vector-icons": "^6.6.0" + "react-native-vector-icons": "^6.6.0", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/packages/material-top-tabs/package.json b/packages/material-top-tabs/package.json index 668e9408..3204a0d4 100644 --- a/packages/material-top-tabs/package.json +++ b/packages/material-top-tabs/package.json @@ -1,5 +1,16 @@ { "name": "@react-navigation/material-top-tabs", + "description": "Integration for the animated tab view component from react-native-tab-view", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "material", + "tab" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -26,7 +37,8 @@ "react": "16.8.3", "react-native": "^0.59.8", "react-native-reanimated": "^1.1.0", - "react-native-tab-view": "^2.10.0" + "react-native-tab-view": "^2.10.0", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/packages/native/package.json b/packages/native/package.json index d682c89e..299c4a23 100644 --- a/packages/native/package.json +++ b/packages/native/package.json @@ -1,5 +1,12 @@ { "name": "@react-navigation/native", + "description": "React Native integration for React Navigation", + "keywords": [ + "react-native", + "react-navigation", + "ios", + "android" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -23,7 +30,8 @@ "@types/react-native": "^0.60.2", "del-cli": "^2.0.0", "react": "16.8.3", - "react-native": "^0.59.8" + "react-native": "^0.59.8", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/packages/routers/package.json b/packages/routers/package.json index 3d7eefa0..fea15893 100644 --- a/packages/routers/package.json +++ b/packages/routers/package.json @@ -1,5 +1,11 @@ { "name": "@react-navigation/routers", + "description": "Routers to help build custom navigators", + "keywords": [ + "react", + "react-native", + "react-navigation" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -20,7 +26,8 @@ }, "devDependencies": { "@react-native-community/bob": "^0.7.0", - "del-cli": "^2.0.0" + "del-cli": "^2.0.0", + "typescript": "^3.5.3" }, "@react-native-community/bob": { "source": "src", diff --git a/packages/stack/package.json b/packages/stack/package.json index 2d934be5..357fb497 100644 --- a/packages/stack/package.json +++ b/packages/stack/package.json @@ -1,5 +1,15 @@ { "name": "@react-navigation/stack", + "description": "Stack navigator component for iOS and Android with animated transitions and gestures", + "keywords": [ + "react-native-component", + "react-component", + "react-native", + "react-navigation", + "ios", + "android", + "stack" + ], "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", @@ -29,7 +39,8 @@ "react-native": "^0.59.8", "react-native-gesture-handler": "^1.3.0", "react-native-reanimated": "^1.1.0", - "react-native-screens": "^1.0.0-alpha.22" + "react-native-screens": "^1.0.0-alpha.22", + "typescript": "^3.5.3" }, "peerDependencies": { "react": "*", diff --git a/yarn.lock b/yarn.lock index ca23f016..90fe947a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15391,7 +15391,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.5.1: +typescript@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==