The shopify-app-js repo uses changesets to track and update the CHANGELOG.md file, as well as to publish to NPM.
-
The developer creates a branch with their change using
mainas the base branch, opens a PR to obtain the necessary feedback, makes any required updates and obtains approval from the maintainers. -
The developer merges their PR, which merges their branch into
main. This triggers themain-release.ymlworkflow. -
The
main-release.ymlworkflow will create a branch calledchangeset-release/mainand a corresponding PR calledPackages for release(or update the branch and PR if they already exist). This branch/PR contains the necessary updates to theCHANGELOG.mdfile that will be included in the release, as well as any updates (e.g., version) to thepackage.jsonfile. -
When ready to release, merging the
Packages for releasePR will updatemainwith the contents of thechangeset-release/mainbranch, and will automatically publish the package(s) to NPM.
-
Prior to the development of breaking changes (for which pre-releases are being used), the
release-candidatebranch is created frommainand put into pre-release mode using thepnpm changesetcommand (see details in the release candidates section below). -
The developer creates a branch with their change using
release-candidateas the base branch, obtains the necessary feedback, makes any required updates and obtains approval from the maintainers. -
The developer merges their PR, which merges their branch into
release-candidate. This triggers therelease-candidate.ymlworkflow. -
The
release-candidate.ymlworkflow will create a branch calledchangeset-release/release-candidateand a corresponding PR calledPackages for release-candidate (rc)(or update the branch and PR if they already exist). This branch/PR contains the necessary updates to theCHANGELOG.mdfile that will be included in the release candidate, as well as any updates (e.g., version) to thepackage.jsonfile. -
When ready to publish the release candidate, merging the
Packages for release-candidate (rc)PR will update therelease-candidatebranch with the contents of thechangeset-release/release-candidatebranch, and will automatically publish the release candidate package(s) to NPM. -
When ready to publish as the next general release, the
release-candidatebranch is taken out of pre-release mode using thepnpm changesetcommand (see details in the release candidates section below). -
Create a PR to merge the
release-candidatebranch intomainand proceed as per the general release process above
See the sections below for specific details related to the steps outlined above.
-
Check the Semantic Versioning page for info on how to version the new release: http://semver.org
-
When creating a PR, the author should run the
pnpm changesetcommand, answer the relevant questions (i.e., is it major/minor/patch, what is the change description), then add and commit the new file tht was created in the.changesetdirectory. These files are used by the workflows to construct theCHANGELOG.mdentries.Note If the change is very small and doesn't warrant a changelog entry, run
pnpm changeset --emptyand commit the resultant file in the.changesetdirectory.
-
Checkout the
changeset-release/mainbranchgit checkout changeset-release/main
-
Run the
/prepare-releaseClaude Code skill to automatically sync allversion.tsfiles and update the lock file, or do it manually:-
If releasing the
shopify-apipackage, update the version string in thepackages/apps/shopify-api/lib/version.tsfile to match the version in thepackages/apps/shopify-api/package.jsonfile. -
If releasing the Express package, update the version string in the
packages/apps/shopify-app-express/src/version.tsfile to match the version in thepackages/apps/shopify-app-express/package.jsonfile. -
If releasing the Remix package, update the version string in the
packages/apps/shopify-app-remix/src/server/version.tsfile to match the version in thepackages/apps/shopify-app-remix/package.jsonfile. -
If releasing the React Router package, update the version string in the
packages/apps/shopify-app-react-router/src/server/version.tsfile to match the version in thepackages/apps/shopify-app-react-router/package.jsonfile. -
Run
pnpm installto update the lock file
-
-
If needed, edit/remove any of the comments in the
CHANGELOG.mdfiles and commit them to thechangeset-release/mainbranch. -
Once the files in the PR reflect the desired release changes, merge the
Packages for releasePR intomain- this triggers the release.
The same changesets/action in the main-release.yml workflow will call pnpm release, which builds the packages and pushes the changed packages to npmjs.org.
After the release, there will no longer be a Packages for release PR. changesets will re-create it when a branch that contains changesets-created changelog files is merged into main.
Note
If the release contains a new API version in the shopify-api package, consider updating all references to the old API to the new API version. For example, shopify.server.ts in the Remix template
For significant API changes that could result in significant refactoring on the part of developers, consider releasing a few Release Candidate versions in advance of the final version.
Warning
These changes must be made against the
release-candidatebranch, so that the appropriate workflows can run (release-candidate.yml).
Warning
Before commencing the effort for a batch of release candidates, make sure the
release-candidatebranch an identical copy ofmain.
-
Prior to creating the first PR against the
release-candidatebranch, run thepnpm changeset pre enter rccommand and commit the resultant files from.changeset, including thepre.jsonfile. This informschangesetsthat it is in pre-release mode, and that the pre-release tag isrc. -
When creating a PR, the author should run the
pnpm changesetcommand, answer the relevant questions (i.e., is it major/minor/patch, what is the change description), and then commit the new file created in the.changesetdirectory. These files are used by the workflows to construct theCHANGELOG.mdentries for the release candidates.Note If the change is very small and doesn't warrant a changelog entry, run
pnpm changeset --emptyand commit the resultant file in the.changesetdirectory. -
When the PR is merged into the
release-candidatebranch, therelease-candidate.ymlworkflow uses thechangesets/actionto either create or update an existing PR that has the titlePackages for release-candidate (rc).
-
Checkout the
changeset-release/release-candidatebranchgit checkout changeset-release/release-candidate
-
If releasing the Express package, update the version string in the
packages/apps/shopify-app-express/src/version.tsfile to match the version in thepackages/apps/shopify-app-express/package.jsonfile. Make sure to add an-rc.Xto the version, like so:2.0.0-rc.1 -
If releasing the Remix package, update the version string in the
packages/apps/shopify-app-remix/src/server/version.tsfile to match the version in thepackages/apps/shopify-app-remix/package.jsonfile. Make sure to add an-rc.Xto the version, like so:2.0.0-rc.1 -
If releasing the React Router package, update the version string in the
packages/apps/shopify-app-react-router/src/server/version.tsfile to match the version in thepackages/apps/shopify-app-react-router/package.jsonfile. Make sure to add an-rc.Xto the version, like so:2.0.0-rc.1 -
Run
pnpm installto update the lock file -
If needed, edit/remove any of the comments in the changed
CHANGELOG.mdfiles and commit them to thechangeset-release/release-candidatebranch. -
Once the files in the PR reflect the desired release changes, merge the
Packages for release-candidate (rc)PR intorelease-candidate- this triggers the release.
The same changesets/action in the release-candidate.yml workflow will call pnpm release, which builds and pushes the release candidates to npmjs.org.
After the release, there will no longer be a Packages for release-candidate (rc) PR. changesets will re-create it when a branch that contains changesets-created changelog files is merged into release-candidate.
When a major set of changes is about to be mass released from the release-candidate branch
Warning
The next steps need to be confirmed
-
Checkout the
release-candidatebranchgit checkout release-candidate
-
Take the
release-candidatebranch out of pre-release mode by runningpnpm changeset pre exitAnd commit the changed files.
-
Create a PR to merge the
release-candidatebranch intomain. -
Once that PR is merged, follow the to perform a release outlined above.