Skip to content

Commit 8b06446

Browse files
authored
chore(config): add exclude-paths for all packages and make docs type hidden (#4572)
1 parent 41bf134 commit 8b06446

4 files changed

Lines changed: 97 additions & 6 deletions

File tree

.claude/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ type(scope): description
185185

186186
**Breaking**: `feat(eds-core-react)!: remove deprecated prop`
187187

188+
**Scope and release-please interaction**: Release-please detects packages from file paths — you don't always need a package scope. Using a package scope with a visible type forces a bump regardless of which files changed. For non-publishable changes (config, Storybook, tests, README, docs), use hidden types: `chore`, `build`, `ci`, `docs`, or `test`.
189+
188190
See `documentation/how-to/CONVENTIONAL_COMMITS.md` for full guidelines.
189191

190192
## Git Workflow

.github/release-please-config.json

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,82 @@
3636
"packages/eds-data-grid-react": {
3737
"release-type": "node",
3838
"package-name": "@equinor/eds-data-grid-react",
39-
"component": "eds-data-grid-react"
39+
"component": "eds-data-grid-react",
40+
"exclude-paths": [
41+
".storybook",
42+
"src/tests",
43+
"src/stories",
44+
"src/EdsDataGrid.stories.tsx",
45+
"jest.config.ts",
46+
"jest.setup.ts",
47+
"rollup.config.js",
48+
"tsconfig.json",
49+
"tsconfig.build.json",
50+
"tsconfig.test.json",
51+
"README.md"
52+
]
4053
},
4154
"packages/eds-icons": {
4255
"release-type": "node",
4356
"package-name": "@equinor/eds-icons",
44-
"component": "eds-icons"
57+
"component": "eds-icons",
58+
"exclude-paths": [
59+
"rollup.config.js",
60+
"tsconfig.json",
61+
"README.md"
62+
]
4563
},
4664
"packages/eds-lab-react": {
4765
"release-type": "node",
4866
"package-name": "@equinor/eds-lab-react",
49-
"component": "eds-lab-react"
67+
"component": "eds-lab-react",
68+
"exclude-paths": [
69+
".storybook",
70+
"stories",
71+
"src/stories",
72+
"babel.config.cjs",
73+
"jest.config.cjs",
74+
"jest.setup.ts",
75+
"rollup.config.js",
76+
"tsconfig.json",
77+
"tsconfig.build.json",
78+
"tsconfig.test.json",
79+
"Dockerfile.storybook",
80+
"nginx.conf",
81+
"README.md"
82+
]
5083
},
5184
"packages/eds-tokens": {
5285
"release-type": "node",
5386
"package-name": "@equinor/eds-tokens",
54-
"component": "eds-tokens"
87+
"component": "eds-tokens",
88+
"exclude-paths": [
89+
"tokens",
90+
"build-generate-variables",
91+
".vscode",
92+
".gitignore",
93+
"rollup.config.js",
94+
"tsconfig.json",
95+
"vite.generate-variables.config.ts",
96+
"palette-config.json",
97+
"token-config.json",
98+
"tokens.json",
99+
"README.md",
100+
"CLAUDE.md"
101+
]
55102
},
56103
"packages/eds-utils": {
57104
"release-type": "node",
58105
"package-name": "@equinor/eds-utils",
59-
"component": "eds-utils"
106+
"component": "eds-utils",
107+
"exclude-paths": [
108+
"rollup.config.js",
109+
"tsconfig.json",
110+
"tsconfig.build.json",
111+
"vitest.config.ts",
112+
"vitest.setup.ts",
113+
"README.md"
114+
]
60115
}
61116
},
62117
"separate-pull-requests": false,
@@ -71,7 +126,8 @@
71126
},
72127
{
73128
"type": "docs",
74-
"section": "📝 Changed"
129+
"section": "📝 Changed",
130+
"hidden": true
75131
},
76132
{
77133
"type": "perf",

.github/release-please-config.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ The `eds-core-react` package uses a **dual release strategy** to support both st
9797
- `prerelease-type: "beta"`: Adds `-beta.X` suffix to versions
9898
- `changelog-path`: Uses separate changelog for beta releases
9999

100+
### Exclude Paths
101+
102+
All packages use `exclude-paths` to prevent non-publishable files from triggering version bumps. This includes config files, test files, Storybook, documentation, and build tooling.
103+
104+
**Important limitation:** `exclude-paths` only filters file-path-based detection. If a commit has a **scope that matches a package's `component` name** (e.g. `feat(eds-core-react): ...`), it will trigger a release for that package regardless of `exclude-paths`. To avoid this, use non-release-triggering types (`chore`, `build`, `ci`, `test`) for commits that only touch excluded files. See `documentation/how-to/CONVENTIONAL_COMMITS.md` for guidance.
105+
100106
## Pull Request Configuration
101107

102108
### Combined Releases

documentation/how-to/CONVENTIONAL_COMMITS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,33 @@ refactor(eds-tokens, eds-icons): standardize naming conventions
115115
`FEAT(eds-core-react): add button` (uppercase type)
116116
`feat(eds-core-react) add button` (missing colon)
117117

118+
## Scope and Release-Please Interaction
119+
120+
**Important:** The commit scope directly affects which packages get version bumps via release-please. If a commit scope matches a package's `component` name (e.g. `eds-core-react`), it will trigger a release for that package **regardless of which files were changed** — even if the files are in `exclude-paths`.
121+
122+
### When to avoid package scopes
123+
124+
Release-please detects which packages are affected based on **file paths** — you don't always need a package scope. For example, a commit touching `packages/eds-tokens/src/color.ts` will automatically be associated with `eds-tokens`. Omitting the scope avoids accidentally forcing a bump via scope-matching.
125+
126+
### When to use a scope
127+
128+
- **Package scope** (`eds-core-react`, `eds-tokens`, etc.): Only when the commit message alone doesn't make the package clear, or for changelog readability. Be aware this forces a bump regardless of `exclude-paths`.
129+
- **Infrastructure scope** (`config`, `github`, `build`, `deps`): For changes that don't belong to a specific package.
130+
- **No scope**: Perfectly fine for most commits — release-please will figure it out from the file paths.
131+
132+
### Avoiding unnecessary version bumps
133+
134+
For commits that only touch **non-publishable files** (config, docs, Storybook, tests), use a hidden type:
135+
136+
| Scenario | Recommended | Avoid |
137+
| --- | --- | --- |
138+
| Storybook-only changes | `chore: ...` or `build(config): ...` | `feat(eds-core-react): ...` |
139+
| Config file updates | `chore(config): ...` or `build: ...` | `feat(eds-core-react): ...` |
140+
| Test-only changes | `test: ...` | `feat(eds-core-react): ...` |
141+
| README/docs in packages | `docs: ...` or `chore: ...` | `feat(eds-core-react): ...` |
142+
143+
The types `chore`, `ci`, `build`, `docs`, and `test` are hidden in release-please and will not trigger version bumps.
144+
118145
## Emojis (Optional)
119146

120147
Emojis are supported and can be placed after the colon:

0 commit comments

Comments
 (0)