Skip to content

Commit

Permalink
fix(release): support forwarding the --access flag to npm publish (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored Sep 4, 2024
1 parent 10b9051 commit 1108ebf
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 8 deletions.
46 changes: 46 additions & 0 deletions docs/generated/cli/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ nx release publish

| Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--access` | `public`, `restricted` | Overrides the access level of the published package. Unscoped packages cannot be set to restricted. See the npm publish documentation for more information. |
| `--all` | boolean | [deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. (Default: `true`) |
| `--exclude` | string | Exclude certain projects from being processed |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
Expand All @@ -130,3 +131,48 @@ nx release publish
| `--tag` | string | The distribution tag to apply to the published package |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |

### plan

Create a version plan file to specify the desired semver bump for one or more projects or groups, as well as the relevant changelog entry

```shell
nx release plan [bump]
```

## Options

| Option | Type | Description |
| --------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `--base` | string | Base of the current branch (usually main) |
| `--bump` | `major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, `prerelease` | Semver keyword to use for the selected release group. |
| `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
| `--message` | string | Custom message to use for the changelog entry |
| `--onlyTouched` | boolean | Only include projects that have been affected by the current changes (Default: `true`) |
| `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
| `--version` | boolean | Show version number |

### plan:check

Ensure that all touched projects have an applicable version plan created for them

```shell
nx release plan:check
```

## Options

| Option | Type | Description |
| --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `--base` | string | Base of the current branch (usually main) |
| `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
| `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
| `--version` | boolean | Show version number |
5 changes: 5 additions & 0 deletions docs/generated/packages/js/executors/release-publish.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"type": "string",
"description": "The distribution tag to apply to the published package."
},
"access": {
"type": "string",
"enum": ["public", "restricted"],
"description": "Overrides the access level of the published package. Unscoped packages cannot be set to restricted. See the npm publish documentation for more information."
},
"dryRun": {
"type": "boolean",
"description": "Whether to run the command without actually publishing the package to the registry."
Expand Down
Loading

0 comments on commit 1108ebf

Please sign in to comment.