Skip to content

Commit

Permalink
docs: update documentation for independent package versioning
Browse files Browse the repository at this point in the history
- Add Package Versioning section explaining new approach
- Document breaking changes and migration requirements
- Update publishing instructions for independent versioning
- Add benefits and dependency management guidance

Co-Authored-By: anson@litprotocol.com <anson@litprotocol.com>
  • Loading branch information
devin-ai-integration[bot] and anson@litprotocol.com committed Jan 2, 2025
1 parent 76d1151 commit 4baa4af
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,44 @@ Having done this setup, this is what the development cycle looks like moving for

If changes are made to `packages/wasm` see [here](./packages/wasm/README.md) for info on building from source.

## Package Versioning

Starting from version 7.x.x, this monorepo uses independent versioning for packages. This means:
- Each package maintains its own version number
- Only modified packages have their versions incremented during releases
- Internal package dependencies use semver ranges (e.g., ^1.2.3) instead of exact versions
- Package versions are no longer synchronized across all packages

This change improves developer experience by:
- Avoiding unnecessary version bumps for unchanged packages
- Making package version history more meaningful
- Allowing packages to evolve at their own pace
- Providing clearer dependency relationships between packages

### Breaking Changes
If you're upgrading from a previous version, note that this is a breaking change in how versions are managed. You may need to update your dependency management practices to:
- Use appropriate semver ranges for internal dependencies
- Track individual package versions instead of a single SDK version
- Handle potentially different versions of related packages

## Publishing

You must have at least nodejs v18 to do this.

1. Install the latest packages with `yarn install`

2. Run `yarn bump` to bump the version

3. Build all the packages with `yarn build`
2. Build all the packages with `yarn build`

4. Run the unit tests with `yarn test:unit` & e2e node tests `yarn test:local` locally & ensure that they pass
3. Run the unit tests with `yarn test:unit` & e2e node tests `yarn test:local` locally & ensure that they pass

5. Update the docs with `yarn gen:docs --push`
4. Update the docs with `yarn gen:docs --push`

6. Finally, publish with `yarn publish:packages`
5. Publish packages with `yarn publish:packages`. This will:
- Prompt for version increments for modified packages
- Update internal dependencies automatically
- Publish only the packages that have changed

7. Commit these changes "Published version X.X.X"
6. Commit these changes with a message describing the published updates

## Testing

Expand Down

0 comments on commit 4baa4af

Please sign in to comment.