From 5653aa65568e43b0770936d4de529d6577d99601 Mon Sep 17 00:00:00 2001 From: Justin D Mathew Date: Mon, 6 Jan 2025 15:18:22 -0800 Subject: [PATCH] chore: Updated versioning strategy and `changesets` config (#295) * Add fixed versioning * Adding versioning docs * bump bare example version --- .changeset/config.json | 3 ++- CONTRIBUTING.md | 20 +++++++++++++++++--- examples/bare/package.json | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index d254ecbe..0e5efd28 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,10 +7,11 @@ } ], "commit": false, - "fixed": [], + "fixed": [["react-native-ama/*"]], "linked": [], "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", + "privatePackages": { "version": true, "tag": true }, "ignore": [] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5dda3487..eb4dd966 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,22 @@ $ yarn test ``` +### Versioning + +We loosely follow [Semantic Versioning](https://semver.org/) and use the `changesets` tool to manage our versioning. That means: + +Given a version number MAJOR.MINOR.PATCH, increment the: + +MAJOR version when there is a fundamental and incompatible API changes +MINOR version when you add functionality in a backward compatible manner or when a minor breaking changes is added +PATCH version when you make backward compatible bug fixes + +#### One Major and Minor version for all packages + +We keep all our @react-native-ama/\* packages synced to the same version (One True Version). This means that if you make a change to one package that requires a new version, all packages will be bumped to the same version. We do this to reduce the number of dependent issues a consumer may have and prevent miss-matching package versions. + +Here are more details on using and adding changesets: + ### Using changesets Our official release path is to use automation to perform the actual publishing of our packages. The steps are to: @@ -29,9 +45,7 @@ Our official release path is to use automation to perform the actual publishing 2. On merge of a PR our automation system opens a "Version Packages" PR. 3. On merging the "Version Packages" PR, the automation system publishes the packages. -Here are more details: - -### Add a changeset +#### Add a changeset When you would like to add a changeset (which creates a file indicating the type of change), in your branch/PR issue this command: diff --git a/examples/bare/package.json b/examples/bare/package.json index 0acabd57..176c55c6 100644 --- a/examples/bare/package.json +++ b/examples/bare/package.json @@ -1,6 +1,6 @@ { "name": "amaexample", - "version": "0.0.2", + "version": "1.0.1", "private": true, "scripts": { "android": "react-native run-android",