You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"comment": "getPackageInfos should only get repo and CLI options once. Also clarify in types and logic that changeFilePrompt can't be specified at package level.",
Copy file name to clipboardexpand all lines: docs/overview/configuration.md
+23-12
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ There are two types of configurations:
13
13
1. repository config
14
14
2. package config
15
15
16
-
## Configuration files
16
+
## Repository config
17
17
18
18
`beachball` uses [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig) to read its configuration, so you can specify configuration in several ways (in addition to CLI arguments).
19
19
@@ -22,37 +22,48 @@ There are two types of configurations:
22
22
-`.beachballrc.json`
23
23
-`beachball.config.js` (CJS or ESM depending on your project setup; explicit `.cjs` or `.mjs` is also supported)
24
24
25
-
### `beachball.config.js`
25
+
It's most common to use a JavaScript file for the repo-level config, since it's the most flexible and allows comments. Usually this file is at the repo root.
26
26
27
-
In many cases, you'll want to use a JavaScript config file, since this is the most flexible and allows comments. The example below uses JSDoc type annotations to enable intellisense in some editors (these are optional).
27
+
The `beachball.config.js` example below uses JSDoc type annotations to enable intellisense in some editors (these are optional).
28
28
29
29
```js
30
30
// @ts-check
31
31
/**@type{import('beachball').BeachallConfig}*/
32
32
constconfig= {
33
-
key: value,
34
-
key2: value2
35
-
key3: value3
33
+
disallowedChangeTypes: ['major'],
34
+
changehint:'Run "yarn change" to generate a change file',
35
+
groupChanges:true,
36
36
};
37
37
module.exports= config;
38
38
```
39
39
40
-
Config files can be placed in either the root of a repo and/or within individual packages (package config overrides the repo config where applicable). For example:
40
+
## Package config
41
+
42
+
Package-level configuration is currently only supported under the `beachball` key in `package.json`.
43
+
44
+
For example, suppose the repo config above is at `beachball.config.js` at the repo root, and there are these other files:
41
45
42
46
```
43
47
packages/
44
48
foo/
45
-
src/
46
49
package.json
47
-
beachball.config.js
48
50
bar/
49
-
src/
50
51
package.json
51
-
package.json
52
52
beachball.config.js
53
+
package.json
53
54
```
54
55
55
-
It's also common to have a repo-level `beachball.config.js` and any individual package overrides (if they're simple) in the `"beachball"` key in the package's `package.json`.
56
+
To change the `disallowedChangeTypes` for package `foo`, you could add the following to `packages/foo/package.json`:
0 commit comments