Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $ beachball publish -r http://localhost:4873 -t beta

### Overriding concurrency

In large monorepos, the process of fetching versions for sync or before publishing can be time-consuming due to the high number of packages. To optimize performance, you can override the concurrency for npm read operations by setting `options.npmReadConcurrency` (default: 5). You can also increase concurrency for hook calls and publish operations via `options.concurrency` (default: 1; respects topological order).
In large monorepos, the process of fetching versions for sync or before publishing can be time-consuming due to the high number of packages. To optimize performance, you can override the concurrency for fetching from the registry by setting `options.npmReadConcurrency` (default: 10). You can also increase concurrency for hook calls and publish operations via `options.concurrency` (default: 1; respects topological order).

### API surface

Expand Down
7 changes: 7 additions & 0 deletions change/beachball-8ce3ac35-66d1-4c51-bea7-13ae809e50e7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Fetch package info directly from the registry, not with npm CLI. This should be a significant performance improvement when publishing or syncing many packages. The default `npmReadConcurrency` has been increased to 10 since this is a lighter-weight operation.",
"packageName": "beachball",
"email": "elcraig@microsoft.com",
"dependentChangeType": "patch"
}
54 changes: 28 additions & 26 deletions docs/overview/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,32 +74,34 @@ For the latest full list of supported options, see `RepoOptions` [in this file](
<!-- prettier-ignore -->
| Option | Type | Default | Applies to | Description |
| ------ | ---- | ------- | ---------- | ----------- |
| `access` | `'public'` or `'restricted'` | `'restricted'` | repo | publish access level for scoped package names (e.g. `@foo/bar`) |
| `branch` | `string` | [see notes][5] | repo | target branch; [see notes][5] |
| `bumpDeps` | `boolean` | `true` | repo | bump dependent packages during publish (if B is bumped, and A depends on B, also bump A) |
| `changeFilePrompt` | [`ChangeFilePromptOptions`][1] | | repo | customize the prompt for change files (can be used to add custom fields) |
| `changehint` | `string` | | repo | hint message for when change files are not detected but required |
| `changeDir` | `string` | `change` | repo | directory where change files are stored (relative to repo root) |
| `changelog` | [`ChangelogOptions`][2] | | repo | changelog rendering and grouping options |
| `defaultNpmTag` | `string` | `'latest'` | repo, package | the default dist-tag used for NPM publish |
| `disallowedChangeTypes` | `string[]` | | repo, package | what change types are disallowed |
| `fetch` | `boolean` | `true` | repo | fetch from remote before doing diff comparisons |
| `generateChangelog` | `boolean \| 'md' \| 'json'` | `true` | repo | whether to generate `CHANGELOG.md/json` (`'md'` or `'json'` to generate only that type) |
| `gitTags` | `boolean` | `true` | repo, package | whether to create git tags for published packages (eg: foo_v1.0.1) |
| `groups` | [`VersionGroupOptions[]`][3] | | repo | bump these packages together ([see details][3]) |
| `groupChanges` | `boolean` | `false` | repo | write multiple changes to a single changefile |
| `hooks` | [`HooksOptions`][4] | | repo | hooks for custom pre/post publish actions |
| `ignorePatterns` | `string[]` | | repo | ignore changes in files matching these glob patterns ([see notes][6]) |
| `package` | `string` | | repo | specifies which package the command relates to (overrides change detection based on `git diff`) |
| `prereleasePrefix` | `string` | | repo | prerelease prefix, e.g. "beta"; note that if this is specified, packages with change type major/minor/patch will be bumped as prerelease instead |
| `publish` | `boolean` | `true` | repo | whether to publish to npm registry |
| `push` | `boolean` | `true` | repo | whether to push to the remote git branch |
| `registry` | `string` | | repo | target NPM registry to publish |
| `retries` | `number` | `3` | repo | number of retries for a package publish before failing |
| `scope` | `string[]` | | repo | only consider package paths matching these patterns ([see details](#scoping)) |
| `shouldPublish` | `false \| undefined` | | package | manually disable publishing of a package by beachball (does not work to force publishing) |
| `tag` | `string` | `'latest'` | repo, package | dist-tag for npm when published |
| `transform` | [`TransformOptions`][4] | | repo | transformations for change files |
| `access` | `'public'` or `'restricted'` | `'restricted'` | repo | Publish access level for scoped package names (e.g. `@foo/bar`) |
| `branch` | `string` | [see notes][5] | repo | Target branch; [see notes][5] |
| `bumpDeps` | `boolean` | `true` | repo | Bump dependent packages during publish (if B is bumped, and A depends on B, also bump A) |
| `changeFilePrompt` | [`ChangeFilePromptOptions`][1] | | repo | Customize the prompt for change files (can be used to add custom fields) |
| `changehint` | `string` | | repo | Hint message for when change files are not detected but required |
| `changeDir` | `string` | `change` | repo | Directory where change files are stored (relative to repo root) |
| `changelog` | [`ChangelogOptions`][2] | | repo | Changelog rendering and grouping options |
| `concurrency` | `number` | 1 | repo | Maximum concurrency for write operations, such as npm publish and hook calls, respecting topological order (see also `npmReadConcurrency`) |
| `defaultNpmTag` | `string` | `'latest'` | repo, package | The default `dist-tag` used for NPM publish |
| `disallowedChangeTypes` | `string[]` | | repo, package | What change types are disallowed |
| `fetch` | `boolean` | `true` | repo | Fetch from remote before doing diff comparisons |
| `generateChangelog` | `boolean \| 'md' \| 'json'` | `true` | repo | Whether to generate `CHANGELOG.md/json` (`'md'` or `'json'` to generate only that type) |
| `gitTags` | `boolean` | `true` | repo, package | Whether to create git tags for published packages (eg: `foo_v1.0.1`) |
| `groups` | [`VersionGroupOptions[]`][3] | | repo | Bump these packages together ([see details][3]) |
| `groupChanges` | `boolean` | `false` | repo | Write multiple changes to a single change file |
| `hooks` | [`HooksOptions`][4] | | repo | Hooks for custom pre/post publish actions |
| `ignorePatterns` | `string[]` | | repo | Ignore changes in files matching these glob patterns ([see notes][6]) |
| `npmReadConcurrency` | number | 10 | repo | Maximum concurrency for fetching package versions from the registry (see `concurrency` for write operations) |
| `package` | `string` | | repo | Specifies which package the command relates to (overrides change detection based on `git diff`) |
| `prereleasePrefix` | `string` | | repo | Prerelease prefix, e.g. `"beta"`. Note that if this is specified, packages with change type major/minor/patch will be bumped as prerelease instead. |
| `publish` | `boolean` | `true` | repo | Whether to publish to npm registry |
| `push` | `boolean` | `true` | repo | Whether to push to the remote git branch |
| `registry` | `string` | | repo | Publish to this npm registry |
| `retries` | `number` | `3` | repo | Number of retries for a package publish before failing |
| `scope` | `string[]` | | repo | Only consider package paths matching these patterns ([see details](#scoping)) |
| `shouldPublish` | `false \| undefined` | | package | Manually disable publishing of a package by beachball (does not work to force publishing) |
| `tag` | `string` | `'latest'` | repo, package | `dist-tag` for npm when published |
| `transform` | [`TransformOptions`][4] | | repo | Transformations for change files |

[1]: https://github.com/microsoft/beachball/blob/main/src/types/ChangeFilePrompt.ts
[2]: https://github.com/microsoft/beachball/blob/main/src/types/ChangelogOptions.ts
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"cosmiconfig": "^9.0.0",
"execa": "^5.0.0",
"minimatch": "^3.0.4",
"npm-registry-fetch": "^14.0.0",
"p-graph": "^1.1.2",
"p-limit": "^3.0.2",
"prompts": "^2.4.2",
Expand All @@ -66,6 +67,7 @@
"@jest/globals": "^29.0.0",
"@types/minimatch": "^5.0.0",
"@types/node": "^14.0.0",
"@types/npm-registry-fetch": "^8.0.9",
"@types/prompts": "^2.4.2",
"@types/semver": "^7.3.13",
"@types/tmp": "^0.2.3",
Expand Down
Loading