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
Copy file name to clipboardexpand all lines: docs/concepts/groups.md
+14-12
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,12 @@ For cases where it's necessary to bump packages together, `beachball` also provi
28
28
29
29
Groups can be added to the [configuration file](../overview/configuration). See the [`VersionGroupOptions` source](https://github.com/microsoft/beachball/blob/master/src/types/ChangelogOptions.ts) for full details.
|`include`|`string \| string[] \| true`|minimatch pattern(s) for package paths to include in this group. Patterns are relative to the repo root and must use forward slashes. If `true`, include all packages except those matching `exclude`.|
35
-
|`exclude`|`string \| string[]`|minimatch pattern(s) for package paths to include in this group. Patterns are relative to the repo root and must use forward slashes. Currently this must use **negated patterns only** (will be fixed in the next major version).|
36
-
|`disallowedChangeTypes`|`ChangeType[] \| null`| Disallow these change types for the group. |
|`include`|`string \| string[] \| true`|glob pattern(s) for package paths to include (see [notes on globs][1]). If `true`, include all packages except those matching `exclude`. |
35
+
|`exclude`|`string \| string[]`|glob pattern(s) for package paths to exclude (see [notes on globs][1]). |
36
+
|`disallowedChangeTypes`|`ChangeType[] \| null`| Disallow these change types for the group. |
37
37
38
38
Example:
39
39
@@ -58,12 +58,12 @@ If you only want to publish or record changes for certain packages, you should u
58
58
59
59
To show changes for multiple packages in one change file, use the `changelog.groups` option. See the [`ChangelogGroupOptions` source](https://github.com/microsoft/beachball/blob/master/src/types/ChangelogOptions.ts) for full details.
|`masterPackageName`|`string`| The main package which a group of changes bubbles up to. |
64
-
|`include`|`string \| string[] \| true`|minimatch pattern(s) for package paths to include in this group. Patterns are relative to the repo root and must use forward slashes. If `true`, include all packages except those matching `exclude`.|
65
-
|`exclude`|`string \| string[]`|minimatch pattern(s) for package paths to exclude from this group. Patterns are relative to the repo root and must use forward slashes. Currently this must use **negated patterns only** (will be fixed in the next major version).|
66
-
|`changelogPath`|`string`| Put the grouped changelog file under this directory. Can be relative to the root, or absolute. |
|`masterPackageName`|`string`| The main package which a group of changes bubbles up to. |
64
+
|`include`|`string \| string[] \| true`|glob pattern(s) for package paths to include (see [notes on globs][1]). If `true`, include all packages except those matching `exclude`. |
65
+
|`exclude`|`string \| string[]`|glob pattern(s) for package paths to exclude (see [notes on globs][1]). |
66
+
|`changelogPath`|`string`| Put the grouped changelog file under this directory. Can be relative to the root, or absolute. |
67
67
68
68
In this example, changelogs for all packages under `packages/*` (except `packages/baz`) are written to a `CHANGELOG.md` at the repo root (`.`), with `foo` as the master package. (To replace `foo`'s usual changelog with a grouped one, you'd specify `changelogPath` as the path to `foo` instead, e.g. `packages/foo`.)
|`bumpDeps`|`boolean`|`true`| repo | bump dependent packages during publish (if B is bumped, and A depends on B, also bump A) |
79
-
|`changeFilePrompt`|[`ChangeFilePromptOptions`][1]|| repo | customize the prompt for change files (can be used to add custom fields) |
80
-
|`changehint`|`string`|| repo | hint message for when change files are not detected but required |
81
-
|`changeDir`|`string`|`change`| repo | directory where change files are stored (relative to repo root) |
82
-
|`changelog`|[`ChangelogOptions`][2]|| repo | changelog rendering and grouping options |
83
-
|`defaultNpmTag`|`string`|`'latest'`| repo, package | the default dist-tag used for NPM publish |
84
-
|`disallowedChangeTypes`|`string[]`|| repo, package | what change types are disallowed |
85
-
|`fetch`|`boolean`|`true`| repo | fetch from remote before doing diff comparisons |
86
-
|`generateChangelog`|`boolean \| 'md' \| 'json'`|`true`| repo | whether to generate `CHANGELOG.md/json` (`'md'` or `'json'` to generate only that type) |
87
-
|`gitTags`|`boolean`|`true`| repo, package | whether to create git tags for published packages (eg: foo_v1.0.1) |
88
-
|`groups`|[`VersionGroupOptions[]`][3]|| repo | bump these packages together ([see details][3]) |
89
-
|`groupChanges`|`boolean`|`false`| repo | write multiple changes to a single changefile |
90
-
|`hooks`|[`HooksOptions`][4]|| repo | hooks for custom pre/post publish actions |
91
-
|`ignorePatterns`|`string[]`|| repo | ignore changes in these files (minimatch patterns with forward slashes; negations not supported)|
92
-
|`package`|`string`|| repo | specifies which package the command relates to (overrides change detection based on `git diff`) |
93
-
|`prereleasePrefix`|`string`|| repo | prerelease prefix for packages that are specified to receive a prerelease bump |
94
-
|`publish`|`boolean`|`true`| repo | whether to publish to npm registry |
95
-
|`push`|`boolean`|`true`| repo | whether to push to the remote git branch |
96
-
|`registry`|`string`|| repo | target NPM registry to publish |
97
-
|`retries`|`number`|`3`| repo | number of retries for a package publish before failing |
98
-
|`scope`|`string[]`|| repo | only consider package paths matching these patterns ([see details](#scoping)) |
99
-
|`shouldPublish`|`false \| undefined`|| package | manually disable publishing of a package by beachball (does not work to force publishing) |
100
-
|`tag`|`string`|`'latest'`| repo, package | dist-tag for npm when published |
101
-
|`transform`|[`TransformOptions`][4]|| repo | transformations for change files |
74
+
| Option | Type | Default | Applies to | Description |
|`bumpDeps`|`boolean`|`true`| repo | bump dependent packages during publish (if B is bumped, and A depends on B, also bump A) |
79
+
|`changeFilePrompt`|[`ChangeFilePromptOptions`][1]|| repo | customize the prompt for change files (can be used to add custom fields) |
80
+
|`changehint`|`string`|| repo | hint message for when change files are not detected but required |
81
+
|`changeDir`|`string`|`change`| repo | directory where change files are stored (relative to repo root) |
82
+
|`changelog`|[`ChangelogOptions`][2]|| repo | changelog rendering and grouping options |
83
+
|`defaultNpmTag`|`string`|`'latest'`| repo, package | the default dist-tag used for NPM publish |
84
+
|`disallowedChangeTypes`|`string[]`|| repo, package | what change types are disallowed |
85
+
|`fetch`|`boolean`|`true`| repo | fetch from remote before doing diff comparisons |
86
+
|`generateChangelog`|`boolean \| 'md' \| 'json'`|`true`| repo | whether to generate `CHANGELOG.md/json` (`'md'` or `'json'` to generate only that type) |
87
+
|`gitTags`|`boolean`|`true`| repo, package | whether to create git tags for published packages (eg: foo_v1.0.1) |
88
+
|`groups`|[`VersionGroupOptions[]`][3]|| repo | bump these packages together ([see details][3]) |
89
+
|`groupChanges`|`boolean`|`false`| repo | write multiple changes to a single changefile |
90
+
|`hooks`|[`HooksOptions`][4]|| repo | hooks for custom pre/post publish actions |
91
+
|`ignorePatterns`|`string[]`|| repo | ignore changes in files matching these glob patterns ([see notes][6]) |
92
+
|`package`|`string`|| repo | specifies which package the command relates to (overrides change detection based on `git diff`) |
93
+
|`prereleasePrefix`|`string`|| repo | prerelease prefix for packages that are specified to receive a prerelease bump |
94
+
|`publish`|`boolean`|`true`| repo | whether to publish to npm registry |
95
+
|`push`|`boolean`|`true`| repo | whether to push to the remote git branch |
96
+
|`registry`|`string`|| repo | target NPM registry to publish |
97
+
|`retries`|`number`|`3`| repo | number of retries for a package publish before failing |
98
+
|`scope`|`string[]`|| repo | only consider package paths matching these patterns ([see details](#scoping)) |
99
+
|`shouldPublish`|`false \| undefined`|| package | manually disable publishing of a package by beachball (does not work to force publishing) |
100
+
|`tag`|`string`|`'latest'`| repo, package | dist-tag for npm when published |
101
+
|`transform`|[`TransformOptions`][4]|| repo | transformations for change files |
Glob matching is implemented using [`minimatch`](https://www.npmjs.com/package/minimatch), which supports most glob syntax.
113
+
114
+
All glob patterns are relative to the repo or monorepo root and must use **forward slashes only**.
115
+
116
+
Unless otherwise noted (such as for `scope`), using gitignore-style negated patterns to modify previous matches is not supported.
108
117
109
118
### Scoping
110
119
111
120
The `scope` option allows limiting which packages are considered. You can set it in the config file if it should always apply, or on the command line for a specific operation.
112
121
113
-
This option takes a list of patterns which are matched against package paths. Patterns are relative to the monorepo root and must use forward slashes. Negations are supported.
122
+
This option takes a list of patterns which are matched against package paths. Patterns are relative to the monorepo root and must use forward slashes. Negations are supported, similar to how gitignore works.
114
123
115
124
Example: with this config, `beachball` will only consider packages under `packages/foo` (excluding `packages/foo/bar`).
0 commit comments