chore: release with changesets - #219
Merged
Merged
Conversation
Replaces `standard-version` with `changesets`, the same setup as `less-loader`: - `.changeset/config.json` with the changelog generator `less-loader` uses, which links the pull request and the author of every entry and lets a changeset name them explicitly with `pr:` and `author:` - `.github/workflows/release.yml`, which on a push to `main` opens a release pull request collecting the changesets and publishes to npm through OIDC once it is merged - `version` and `release` scripts for the action to call The changesets for the changes already on `main` that have not been released are included, so the first release pull request is not empty. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
=======================================
Coverage 95.36% 95.36%
=======================================
Files 9 9
Lines 949 949
Branches 387 387
=======================================
Hits 905 905
Misses 40 40
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Replaces
standard-versionwithchangesets, matching the setup inless-loader.What is added
.changeset/config.json- points at the local changelog generator withrepo: webpack/schema-utils,baseBranch: main,access: public..changeset/changelog-generator.mjs- the generatorless-loaderuses, copied as is. It links thepull request and the author of every changelog entry, and lets a changeset name them explicitly with
pr:,commit:andauthor:lines in its summary rather than relying on the commit the changesetwas added in.
.changeset/README.md- the@changesets/cliboilerplate..github/workflows/release.yml- on a push tomainit opens achore(release): new releasepullrequest collecting the pending changesets, and publishes to npm once that pull request is merged.
Guarded by
if: github.repository == 'webpack/schema-utils',concurrencyper ref, and publishingthrough OIDC (
id-token: write, emptyNPM_TOKEN) exactly asless-loaderdoes.versionandreleasescripts for the action to call -changeset versionandnpm run build && changeset publish.standard-versionis dropped from the dev dependencies.CHANGELOG.mdpreamble no longer points atstandard-version. Existing entries are untouched;changesetsappends above them.Changesets for what is already on
main#217 merged without a changeset, so three are included to describe it and to keep the first release
pull request from being empty:
patchRangeErrorfor an array of optionsminorprocess.env.SKIP_VALIDATIONis read when the module is loadedminornpx changeset statusresolves these to a minor bump, so the first release would be4.4.0.The two
minorentries are behaviour changes rather than additions - if you would rather release themas
major, it is a one word edit in each changeset file.Verification
npx changeset statusresolves the pending changesets correctly.npx changeset versionwas run locally to exercise the whole pipeline: the config resolves the localgenerator, the ESM generator loads, and the changesets parse. It stops at the GitHub enrichment with
Bad credentialsbecause this environment has noGITHUB_TOKEN- which the workflow provides - andit escapes without touching any file, so nothing here is a product of that run.
npm run lint,npm run build:typeswith cleandeclarations,npm run securityandcommitlintall pass, as does the test suite (442 tests, 332 snapshots).
Not changed
commitlintand its CI step are left in place.less-loaderhas nocommitlint, so dropping it wouldbe the closer match, but it is independent of how releases are cut - happy to remove it in a follow up
if you want the setups identical.
🤖 Generated with Claude Code
https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
Generated by Claude Code