-
Notifications
You must be signed in to change notification settings - Fork 293
Integrate changesets into monorepo #680
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
Conversation
odcheung
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.
overall looks good. just 1 question on the dependency publish workflow (but not blocking)
| # Patch version numbers for local dependencies | ||
| local_deps=$(jq -r '.dependencies // {} | to_entries | .[] | select(.value == "*") | .key' package.json) | ||
| if [ -n "$local_deps" ]; then | ||
| for dep in $local_deps; do | ||
| latest_version=$(npm view $dep version) | ||
| jq --arg dep "$dep" --arg version "$latest_version" \ | ||
| '.dependencies[$dep] = $version' package.json > tmp.json && mv tmp.json package.json | ||
| done | ||
| fi |
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.
say you updated common-sdk, i see that this will increment legacy-sdk's version, but will it publish legacy-sdk as well?
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.
Only packages that have one ore more changesets will be updated. If you update common-sdk and sdd a changeset for common-sdk only common-sdk will get updated
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.
Only packages that have one ore more changesets will be updated
Right now updating the packages in the monorepo is either update all of them at once or update none. This is not very efficient and annoying because we get lots of new versions without any changes.
This also allows us to publish the legacy-sdk packages using the same process as the new sdks.
Furthermore we don't really have proper changelogs for the libraries. This enforces PRs to contain a changeset (which will be built into a changelog and determines which packages should be published)