Skip to content

Commit 12f118d

Browse files
committed
merge
2 parents fb589be + b81f49d commit 12f118d

File tree

442 files changed

+8890
-775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

442 files changed

+8890
-775
lines changed

.changeset/README.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# 🚢 Release Workflow with Changesets
2+
3+
This document describes how we use [Changesets](https://github.com/changesets/changesets) in our daily development workflow to manage versions, changelogs, and releases in this monorepo.
4+
5+
---
6+
7+
## 📖 What are Changesets?
8+
9+
A **changeset** is a small Markdown file committed alongside your code changes. It records:
10+
11+
- Which packages are affected
12+
- What type of version bump they require (`patch`, `minor`, `major`)
13+
- A short description that will appear in the changelog
14+
15+
By collecting these small pieces of information, we can automatically generate:
16+
17+
- Version bumps in `package.json`
18+
- Updated `CHANGELOG.md` entries
19+
- Release PRs and npm publishes
20+
- [GitHub Releases](https://github.com/db-ux-design-system/core-web/releases)
21+
22+
---
23+
24+
## 🛠 Workflow
25+
26+
### 1. After making a change → add a changeset
27+
28+
Run:
29+
30+
```bash
31+
npx changeset
32+
```
33+
34+
You’ll be prompted to:
35+
36+
- Select affected packages
37+
- Choose the bump/release type (patch, minor, major)
38+
- Provide a short summary for the changelog
39+
40+
This creates a file like `.changeset/abcd123.md`.
41+
👉 Commit this file as part of your PR.
42+
43+
### 2. Open a Pull Request
44+
45+
- Every PR that changes published code must include a changeset file.
46+
- CI will verify the existence of at least one changeset when necessary.
47+
48+
### 3. Release PRs
49+
50+
When PRs are merged into `main` branch, the Release workflow will:
51+
52+
- Collect pending changesets
53+
- Open (or update) a Release PR called “Version Packages”
54+
- Run `changeset version` to bump versions and update changelogs
55+
56+
This PR should be reviewed like any other:
57+
58+
- Check the versions are correct
59+
- Review the generated changelogs
60+
61+
Once everything looks good, merge the Release PR.
62+
63+
### 4. Publishing
64+
65+
After the Release PR is merged into `main` branch:
66+
67+
- CI will build the packages (`./build-outputs/`)
68+
- Publish new versions to npm with the tag `latest`
69+
- Create a [GitHub Release](https://github.com/db-ux-design-system/core-web/releases)
70+
71+
You don’t have to run anything manually, it’s handled by CI.
72+
73+
---
74+
75+
## ✅ Best Practices
76+
77+
- **Always add a changeset**
78+
79+
If your code change affects published packages, create a changeset.
80+
81+
No changeset → no version bump → no release.
82+
83+
- **Choose the correct bump type**
84+
- patch: bugfix, no API or HTML changes
85+
- minor: new features, changes in inner component markup or behavior, backwards-compatible
86+
- major: breaking changes (e.g. removed props, changed APIs)
87+
88+
- **Write user-friendly summaries**
89+
90+
The text you provide will be copied into the `CHANGELOG.md`. Keep it concise and helpful.
91+
92+
- **One changeset per PR**
93+
94+
Usually you only need one. If a PR touches multiple packages with different bump types, a single changeset can cover them all.
95+
96+
- **Baseline snapshots**
97+
98+
ARIA snapshots by Playwright help detect markup changes. If they change, prefer minor instead of patch.
99+
And please mention those HTML changes within the `CHANGELOG.md` or of necessary (like bigger changes) in a [migration guide](https://github.com/db-ux-design-system/core-web/tree/main/docs/migration).
100+
101+
- **Avoid manual version bumps**
102+
103+
Never edit `package.json` `version` field by hand. Changesets handles this automatically.
104+
105+
---
106+
107+
## 🚧 Pre-Releases
108+
109+
We handle pre-releases without changesets.
110+
Instead, create a new [GitHub release](https://github.com/db-ux-design-system/core-web/releases/new)
111+
with a tag like `1.2.3-next0` and the CI will pick it up and publish it to npm with the tag `next`.
112+
113+
114+
---
115+
116+
117+
## 🔑 Cheatsheet
118+
119+
```bash
120+
# Initialize Changesets (only once per repo)
121+
npx changeset init
122+
123+
# Create a new changeset
124+
npx changeset
125+
126+
# Show pending releases
127+
npx changeset status --verbose
128+
129+
# Apply version bumps and changelogs
130+
npx changeset version
131+
132+
# Pre-release mode
133+
npx changeset pre enter next # enter prerelease
134+
npx changeset pre exit # exit prerelease
135+
```
136+
137+
---
138+
139+
## 📂 File Overview
140+
141+
- `.changeset/` → contains pending changesets (`.md` files)
142+
- `package.json` → versions are updated automatically in this file
143+
- `CHANGELOG.md` → updated by changeset version
144+
- `.github/workflows/changesets-release-pr.yml` → automation for Release PRs & publishing
145+
- `.github/workflows/pull-request-snapshot-diff.yml` → validates changes in PNG/YML snapshots and enforces at least a MINOR bump
146+
- `scripts/github/publish-npm.js` → custom publish script (packs & publishes built outputs)

.changeset/config.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": "@changesets/changelog-git",
4+
"commit": false,
5+
"fixed": [
6+
[
7+
"@db-ux/core-foundations",
8+
"@db-ux/core-components",
9+
"@db-ux/react-core-components",
10+
"@db-ux/ngx-core-components",
11+
"@db-ux/v-core-components",
12+
"@db-ux/wc-core-components",
13+
"@db-ux/core-stylelint",
14+
"@db-ux/core-migration"
15+
]
16+
],
17+
"ignore": ["scripts"],
18+
"linked": [],
19+
"access": "public",
20+
"baseBranch": "main",
21+
"updateInternalDependencies": "patch"
22+
}

.config/.jscpd.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@
6161
"showcases/shared/*.json",
6262
"showcases/vue-showcase/src/components/form/Form.vue"
6363
],
64+
"ignorePattern": ["<option value=\"test5\">Test5</option>"],
6465
"absolute": true
6566
}

.config/.lintstagedrc.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ export default {
99
// And elsewhere we don't, compare to https://github.com/stylelint/stylelint/pull/8009
1010
'*.{css,scss}': 'stylelint --fix --allow-empty-input --no-validate',
1111
'*.{js,ts,tsx,jsx,mjs,cjs}': 'xo --fix',
12-
// ensure that security vulnerabilities are fixed before committing
13-
'package-lock.json': 'npm audit fix --omit=dev'
12+
// ensure that security vulnerabilities are fixed before committing - we need to skip `dev` for the moment as there are some unsolveable conflicts
13+
'package-lock.json': 'npm audit fix --omit=dev',
14+
// ensure that lock file is up to date
15+
'**/package.json': [
16+
() => 'npm install --package-lock-only --ignore-scripts',
17+
'npx npm-package-json-lint'
18+
],
1419
};

.config/.markdown-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ MD026:
3232
MD029: false # Ordered list item prefix
3333
MD030: false
3434
MD033:
35-
allowed_elements: [br]
35+
allowed_elements: [br, details, summary]
3636
MD036: false # Emphasis used instead of a heading
3737
MD041: false # h1 first line is not working in this monorepo
3838
MD049: false # emphasis-style Emphasis style should be consistent

.github/actions/cancel-workflow/action.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)