-
Notifications
You must be signed in to change notification settings - Fork 43
feat: introduce changesets for package publishing #3539
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
dnechay
commented
Sep 3, 2025
33e286a to
656fef4
Compare
portuu3
previously approved these changes
Sep 4, 2025
Collaborator
Author
|
Let's hold the merge till we have all the pending items released |
Dzeranov
previously approved these changes
Sep 4, 2025
Contributor
Dzeranov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
flopez7
previously approved these changes
Sep 5, 2025
656fef4 to
2875d36
Compare
Collaborator
Author
|
Made a rebase from develop and added changesets for SDK updates mentioned in release PR, so we can test the whole publishing flow |
flopez7
approved these changes
Sep 5, 2025
This was referenced Sep 5, 2025
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue tracking
#3424
Context behind the change
What's in
eslintandprettierper app/lib, so we have cleaner config files for these tools, ability to refactor them separately and can have some root-level scripts that are not affected by root-level lint/prettier. Also removed globaljestconfig because it's not used (note:.gitignorechanges in apps related to it because.ignoreconfig of tools relies on it). Resulting configs are the same except forgcvapp that has a small change in prettier related totrailingCommayarnversion to latest stable in order to have some latest pieces that are necessary for publishing process (--jsonflag inyarn npm publish+ fixedpre-version; some other items you can find in their changelog).localto.gitignore, so developers can have their.localfolder with any stuff for local tests. Also addedpackage.tgzto avoid potential commit of packed packagesnpmPublishAccesstopublicby default since we publish our packages with thatprepacklifecycle hook to packages, so they are built automatically whenpublishis triggered. Also updatedbuildcommand to havecleanincluded to avoid potential garbage when doing builds on local (you can still rely on incremental TS builds if build bytsc, not viapackage.jsonscripts)changesetsfor version management + new GitHub Action to publish packages and create tags.Drill down into the new publish process
The whole idea as same as in original issue, only version management relies on
changesetstooling to simplify process for us.Warning
We rely on
changesetsonly to easily track changes and properly set new versions. We still do publishing relying onyarn workspaceswe have and not on some fancy tooling provided bychangesetsonly because under the hood it runsnpm publishinstead ofyarn npm publishand because of that.yarnrcis not respected + it causes some other issues with published packages (e.g. like mentioned in this issue)As part of a new process, engineers will have to create
changesetfile as part of their PR in case they have some changes for publishable packages. Before somebody opens a PR - they should runyarn changesetcommand in their branch from the repo root, select packages with changes and what version part (major, minor, patch) expected for bump according to their changes. This will generate a changeset file in.changesetfolder that should be part of PR and also reviewed and merged todevelop.Let's loot at an example
I. Work on packages changes w/o worrying about exact version number, only about semver "weight"
patchversion change forsdk, then merges PR todevelop. Nothing happens at this pointminorchange forloggerpackage and merges PR todevelop. Nothing happens at this pointsdkandloggerwithpatch, merges PR todevelop. Nothing happens at this pointII. Pre-leases: do actual versions update
When we are ready to release, engineer that facilitates the release will need to open a new PR from
developto do a version bump. To do that - runyarn changeset versionfrom the project root, commit changes and open a PR. Then we review that new versions are correct and merge it todevelopNote
In our example we will get a
patchversion change forsdkbecause all changes from last version arepatch(i.e.1.2.3->1.2.4); For logger - it's going to be aminorversion bump (i.e.1.2.3->1.3.0), becausepatchcan be a part ofminorversion, but not vice-versa and all changes go in a batch for next release.III. Publish packages with proper versions
There is a GitHub action that will automatically publish all packages that have new versions. It's triggered by pushed on
mainbranch, so in order to release packages - just mergedevelopintomainwith new proper versions set up.This action will also create git tags for published packages, such as
@human-protocol/logger@1.1.0.Important
Since we rely on
yarn workspacesto publish packages and have proper package versions inpackage.json-yarnwill resolveworksapce:links for us correctly while doing publishing in topological order, e.g.corewill be published first, thensdkHow has this been tested?
yarn changesetto get package changes trackedyarn changeset versionto make sure versions updated correctlypublishcommand from GitHub Action to make sure packages are built, packed and can be publishedyarn packw/ and w/oSKIP_PREPACKto make sureprepackscript works andSKIP_PREPACKis respectedRelease plan
develop- new github action will be in place)Potential risks; What to monitor; Rollback plan
mainfor it, so some things might be failing and we will have to fix them separatelyWhat's next
alpha/betaversions with tagnextinstead oflatestfrom the specific branch you provide in input argumentscorepackage build using Git LFS, in order to speed up builds in CI/CD systems