chore: use changesets to support an automatic release process - #3448
Conversation
ff414c7 to
5da9438
Compare
5da9438 to
e52fc27
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces Changesets-based versioning/changelog management and a GitHub Actions release workflow for the JointJS monorepo, aiming to move release decisions (bump type + changelog entry) to PR time and automate package publishing from master.
Changes:
- Add Changesets tooling/configuration and a release pipeline (
select-mode→versionPR →publish). - Start publishing per-package changelogs by adding
CHANGELOG.mdfiles and including them in packagefileslists. - Update contribution/docs/templates and PR CI to require a changeset for releasable changes.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds Changesets and related dependencies to the workspace lockfile. |
| package.json | Adds @changesets/cli as a root devDependency. |
| CONTRIBUTING.md | Documents the Changesets workflow and contributor requirements. |
| CLAUDE.md | Adds repo-level guidance to follow the Changeset format rules. |
| .github/pull_request_template.md | Adds a PR checklist item for changesets. |
| .github/workflows/test-pr.yml | Adds a CI step to enforce presence of a changeset for releasable changes. |
| .github/workflows/release.yml | Introduces a Changesets-driven release workflow for master pushes. |
| .changeset/README.md | Adds local documentation for the .changeset/ folder and format rules. |
| .changeset/config.json | Adds Changesets configuration (linked packages, changed file patterns, etc.). |
| .changeset/clear-maps-begin.md | Adds an initial empty changeset to force the first “version mode” run behavior. |
| packages/joint-core/package.json | Includes CHANGELOG.md in the published file set. |
| packages/joint-core/CHANGELOG.md | Adds the initial per-package changelog content for @joint/core. |
| packages/joint-react/package.json | Includes CHANGELOG.md in the published file set. |
| packages/joint-react/CLAUDE.md | Adds @joint/react-specific Changesets guidance and reflows text. |
| packages/joint-react/CHANGELOG.md | Adds the initial per-package changelog content for @joint/react. |
| packages/joint-layout-directed-graph/package.json | Adjusts version metadata and includes CHANGELOG.md in the published file set. |
| packages/joint-layout-directed-graph/CHANGELOG.md | Adds the initial per-package changelog content for @joint/layout-directed-graph. |
| packages/joint-layout-msagl/package.json | Adjusts version metadata and includes CHANGELOG.md in the published file set. |
| packages/joint-layout-msagl/CHANGELOG.md | Adds the initial per-package changelog content for @joint/layout-msagl. |
| packages/joint-eslint-config/package.json | Adjusts package version metadata. |
| packages/joint-decorators/package.json | Adjusts package version metadata, dependency range, and includes CHANGELOG.md in the published file set. |
| packages/joint-cli/package.json | Includes CHANGELOG.md in the published file set. |
| packages/joint-vitest-plugin-mock-svg/package.json | Includes CHANGELOG.md in the published file set. |
| packages/joint-shapes-general/package.json | Marks the package as private. |
| packages/joint-shapes-general-tools/package.json | Marks the package as private. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated no new comments.
Suppressed comments (6)
packages/joint-react/CLAUDE.md:33
- The Jest CLI flag in this example uses
--testPathPatterns, which isn’t a valid Jest option (Jest uses--testPathPattern).
# Run a single test file
yarn jest --testPathPatterns="use-elements"
packages/joint-cli/package.json:13
filesnow includes./CHANGELOG.md, but this file doesn’t exist in the package directory, so it won’t actually be included in the published tarball. Either add the changelog file (even a placeholder) or remove this entry until the file is introduced.
"files": [
"dist",
"./CHANGELOG.md"
],
packages/joint-decorators/package.json:39
filesnow includes./CHANGELOG.md, but there is noCHANGELOG.mdfile in this package directory. If the intention is “every package keeps its own CHANGELOG.md” (per CONTRIBUTING), add it here so it’s included in publishes.
"files": [
"build/",
"src/",
"./LICENSE",
"./SECURITY.md",
"./CHANGELOG.md"
],
packages/joint-vitest-plugin-mock-svg/package.json:47
filesnow includes./CHANGELOG.md, but this package doesn’t currently have aCHANGELOG.mdfile, so it won’t be published. Add the file (even an initial placeholder) or drop it fromfilesuntil it exists.
"files": [
"dist/",
"mocks/",
"./LICENSE",
"./README.md",
"./SECURITY.md",
"./CHANGELOG.md"
],
.changeset/clear-maps-begin.md:6
- This “empty changeset” file contains trailing whitespace/blank body content. Keeping it to the minimal empty-changeset form avoids accidental non-empty summaries and reduces noisy diffs.
---
---
CLAUDE.md:47
- The Jest CLI flag in this example uses
--testPathPatterns, which isn’t a valid Jest option (Jest uses--testPathPattern). As written, copying this command will fail.
For joint-react Jest tests:
```bash
cd packages/joint-react
yarn jest --testPathPatterns="ComponentName"
</details>
Description
A simpler version of #3445. Needs #3452 to work.
Use changesets for deferred versioning and changelog creation.
NOTE: Tags/Releases become per-package (
@joint/core@4.4.0) instead ofv4.3.1.Motivation and Context
This will allow us to streamline our release process by asking PR contributors to make versioning and changelog decisions at PR time (when they have the most context about their changes) instead of at release time.
A changeset is a file inside
.changesets/folder (one per PR), which records two things:Example:
Setup TODO
Before the Changesets release pipeline can run, these steps need to be completed:
What to expect on the first run
The empty changeset currently in .changeset/ means the first push to master goes into version mode and opens a "Version Packages" PR whose only content is the deletion of that file — no version bumps. Merge it; select-mode then reports none (every version matches npm, which is exactly what the version/private fixes bought you) and nothing publishes. Real releases start with the next PR that carries a real changeset.