chore(release): migrate from Lerna to Changesets#585
Open
petermuessig wants to merge 1 commit into
Open
Conversation
Replace Lerna with Changesets for versioning and publishing: - Add .changeset/ config + README pointing at UI5/typescript; ignore the private test-packages so changeset publish skips them automatically - Add scripts/auto-changeset.mjs to derive changesets from conventional commits (scope -> packages, type -> bump, subject -> summary) - Rewrite .github/workflows/release.yml to use changesets/action@v1.8.0: opens/updates a 'Version Packages' PR on main, then publishes on merge with npm OIDC trusted publishing + provenance, falling back to NPM_BOOTSTRAP_TOKEN when OIDC isn't configured - Add .github/workflows/changeset.yml as a PR gate that fails when no changeset is present (counts .changesets so empty changesets pass) - Replace root release:* lerna scripts with changeset / version-packages / release-publish; build is now explicit per workspace because the test-packages have no build script - Remove lerna and lerna.json; add @changesets/cli + @changesets/changelog-github devDependencies - Rewrite CONTRIBUTING.md to document the new flow end-to-end while preserving the existing Legal / DCO / AI-generated-code sections
8c4c24b to
273d63a
Compare
Contributor
Author
|
@codeworrior @akudev - here is the change to get rid of the local release steps and make this part of GH actions by using changesets - I can also explain to you how this new release flow will work. |
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
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.
Summary
Replaces Lerna with Changesets for versioning and publishing. The release flow now mirrors what's in use in
ui5-community/ui5-ecosystem-showcase: contributors add a.changeset/*.mdto their PR, merging tomainopens/updates aVersion PackagesPR, and merging that PR publishes to npm.What changed
@ui5/openui5-snapshot-testand@ui5/typed-json-model.changeset/auto-<sha>.mdfiles from conventional commits (scope -> packages, type -> bump). Idempotent; hand-written changesets always winchangesets/action@v1.8.0with npm OIDC trusted publishing + provenance, fallback toNPM_BOOTSTRAP_TOKEN.changesetsrather than.releasesso empty changesets passlerna, added@changesets/cli+@changesets/changelog-github. Replacedrelease:*scripts withchangeset/version-packages/release-publish/changeset:auto/changeset:empty.buildis now explicit per workspace (the test-packages have nobuildscript)lerna.jsonyarn.lockNew contributor flow
New release flow (no local lerna, no push-to-main, no npm creds)
main.Version PackagesPR (versions bumped, CHANGELOGs regenerated, lockfile refreshed).Verification
yarn install— ok, lockfile updated cleanlyyarn build— both@ui5/dts-generatorand@ui5/ts-interface-generatorcompile (incl. api-extractor)yarn changeset status— exit 0 (no pending changesets, expected)yarn changeset version—No unreleased changesets found, exiting(expected)node scripts/auto-changeset.mjs --dry-run --verbose— range resolved against lastchore(release): publishcommit, 0 commits sinceyarn format:validate— cleanNot in this PR (intentional)
pnpmmigration is a logical follow-up (the showcase uses pnpm;pnpm install --lockfile-onlyis a cleaner fit for theversion-packagesstep than yarn classic), but it's a separate diff worth reviewing on its own.Package "@ui5/openui5-snapshot-test" must depend on the current version of "@ui5/dts-generator"warnings fromchangeset statusare harmless under yarn classic'slink:syntax. They go away with the pnpm migration.Required follow-up before merging
secrets.NPM_BOOTSTRAP_TOKENis configured onUI5/typescript(or that npm OIDC trusted publishing is set up for@ui5/dts-generatorand@ui5/ts-interface-generator).mainwill open an emptyVersion PackagesPR — that's expected.