Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changeset tooling #39

Merged
merged 12 commits into from
Oct 7, 2024
Merged

Add changeset tooling #39

merged 12 commits into from
Oct 7, 2024

Conversation

stigi
Copy link
Member

@stigi stigi commented Oct 2, 2024

Change description

This PR adds tooling around managing change sets, by employing https://github.com/changesets/changesets

The source of truth for the project version now relies in package.json and is propagated via a script to all other places (Readme.md, swift sources).

I also imported the last changeset from the current version 2.0.0 as a baseline and added pending changesets for work that was done in #38 and that will go out in a major release.

A few things went into this to make it work:

  • Added NPM configuration and the @changeset dependencies
  • Initialized the changeset config with the default values
  • Added a wrapper around yarn changeset that also calls the update-version.ts script to update the version accross the repo.
  • Cocoapods is fine with loading the version directly via JSON import from package.json

Test Plan

Check out this branch, create an example changeset via yarn changeset or yarn changeset add. Bump the version via yarn changeset version. The version should be updated in package.json, Readme.md as well MagicBellClient.swift.

Also take a look at #42 which was created by the workflow that's part of this PR.

Type of Change

  • Bug fix
  • Feature
  • Enhancement

@stigi stigi requested a review from smeijer October 2, 2024 22:35
@stigi stigi marked this pull request as ready for review October 2, 2024 22:36
This will update all other occurences of the version number
@stigi
Copy link
Member Author

stigi commented Oct 7, 2024

@smeijer heads up that I did a small, but significant, change in 153640a

The workflow now invokes yarn changeset version instead of calling the JS function directly (see action code). This makes sure that the version numbers are correctly replaced everywhere.

@stigi stigi merged commit 0506e7c into main Oct 7, 2024
2 checks passed
@stigi stigi deleted the ullrich/add-changesets branch October 7, 2024 10:54
@stigi stigi self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants