@@ -99,21 +99,23 @@ jobs:
99
99
100
100
You can set any or all of the following input parameters using ` with ` :
101
101
102
- | Name | Type | Default | Description |
103
- | ------------ | ---------------------- | -------------------------------- | ----------------------------------------------------------------------------- |
104
- | ` token ` | string | ** required** | Authentication token to use with the configured registry. |
105
- | ` registry ` | string | ` https://registry.npmjs.org/ ` \* | Registry URL to use. |
106
- | ` package ` | string | Current working directory | Path to a package directory, a ` package.json ` , or a packed ` .tgz ` to publish |
107
- | ` tag ` | string | ` latest ` \* | [ Distribution tag] [ npm-tag ] to publish to. |
108
- | ` access ` | ` public ` , ` restricted ` | [ npm defaults] [ npm-access ] \* | Whether the package should be publicly visible or restricted. |
109
- | ` provenance ` | boolean | ` false ` \* | Run ` npm publish ` with the ` --provenance ` flag to add provenance statements. |
110
- | ` strategy ` | ` all ` , ` upgrade ` | ` all ` | Use ` all ` to publish all unique versions, ` upgrade ` for only semver upgrades. |
111
- | ` dry-run ` | boolean | ` false ` | Run ` npm publish ` with the ` --dry-run ` flag to prevent publication. |
112
-
113
- \* Default values for these options may be specified using ` publishConfig ` in ` package.json ` .
102
+ | Name | Type | Default | Description |
103
+ | --------------- | ---------------------- | ----------------------------- | -------------------------------------------------------------------------------- |
104
+ | ` token ` | string | ** required** | Authentication token to use with the configured registry. |
105
+ | ` registry ` ¹ | string | ` https://registry.npmjs.org/ ` | Registry URL to use. |
106
+ | ` package ` | string | Current working directory | Path to a package directory, a ` package.json ` , or a packed ` .tgz ` to publish. |
107
+ | ` tag ` ¹ | string | ` latest ` | [ Distribution tag] [ npm-tag ] to publish to. |
108
+ | ` access ` ¹ | ` public ` , ` restricted ` | [ npm defaults] [ npm-access ] | Whether the package should be publicly visible or restricted. |
109
+ | ` provenance ` ¹ ² | boolean | ` false ` | Run ` npm publish ` with the ` --provenance ` flag to add [ provenance] [ ] statements. |
110
+ | ` strategy ` | ` all ` , ` upgrade ` | ` all ` | Use ` all ` to publish all unique versions, ` upgrade ` for only semver upgrades. |
111
+ | ` dry-run ` | boolean | ` false ` | Run ` npm publish ` with the ` --dry-run ` flag to prevent publication. |
112
+
113
+ 1 . May be specified using ` publishConfig ` in ` package.json ` .
114
+ 2 . Provenance requires npm ` >=9.5.0 ` .
114
115
115
116
[ npm-tag ] : https://docs.npmjs.com/cli/v9/commands/npm-publish#tag
116
117
[ npm-access ] : https://docs.npmjs.com/cli/v9/commands/npm-publish#access
118
+ [ provenance ] : https://docs.npmjs.com/generating-provenance-statements
117
119
118
120
### Output
119
121
@@ -172,20 +174,21 @@ As shown in the example above, you should pass an options object to the `npmPubl
172
174
import type { Options } from "@jsdevtools/npm-publish";
173
175
` ` `
174
176
175
- | Name | Type | Default | Description |
176
- | -------------------- | ---------------------- | -------------------------------- | ----------------------------------------------------------------------------- |
177
- | `token` | string | **required** | Authentication token to use with the configured registry. |
178
- | `registry` | string, `URL` | `https://registry.npmjs.org/` \* | Registry URL to use. |
179
- | `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish |
180
- | `tag` | string | `latest` \* | [Distribution tag][npm-tag] to publish to. |
181
- | `access` | `public`, `restricted` | [npm defaults][npm-access] \* | Whether the package should be publicly visible or restricted. |
182
- | `provenance` | boolean | `false` \* | Run `npm publish` with the `--provenance` flag to add provenance statements. |
183
- | `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
184
- | `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
185
- | `logger` | object | `undefined` | Logging interface with `debug`, `info`, and `error` log methods. |
186
- | `temporaryDirectory` | string | `os.tmpdir()` | Temporary directory to hold a generated `.npmrc` file |
187
-
188
- \* Default values for these options may be specified using `publishConfig` in `package.json`.
177
+ | Name | Type | Default | Description |
178
+ | -------------------- | ---------------------- | ----------------------------- | -------------------------------------------------------------------------------- |
179
+ | `token` | string | **required** | Authentication token to use with the configured registry. |
180
+ | `registry`¹ | string, `URL` | `https://registry.npmjs.org/` | Registry URL to use. |
181
+ | `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish. |
182
+ | `tag`¹ | string | `latest` | [Distribution tag][npm-tag] to publish to. |
183
+ | `access`¹ | `public`, `restricted` | [npm defaults][npm-access] | Whether the package should be publicly visible or restricted. |
184
+ | `provenance`¹ ² | boolean | `false` | Run `npm publish` with the `--provenance` flag to add [provenance][] statements. |
185
+ | `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
186
+ | `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
187
+ | `logger` | object | `undefined` | Logging interface with `debug`, `info`, and `error` log methods. |
188
+ | `temporaryDirectory` | string | `os.tmpdir()` | Temporary directory to hold a generated `.npmrc` file |
189
+
190
+ 1. May be specified using `publishConfig` in `package.json`.
191
+ 2. Provenance requires npm `>=9.5.0`.
189
192
190
193
# ## Output
191
194
@@ -224,7 +227,7 @@ npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE
224
227
You can customize your call with options to change the registry, package, etc.
225
228
226
229
` ` ` bash
227
- npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --registry http://example.com ./path/to/package
230
+ npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --registry http://example.com ./path/to/package
228
231
` ` `
229
232
230
233
# ## Options
@@ -266,7 +269,7 @@ Options:
266
269
--debug Print debug logs.
267
270
268
271
-v, --version Print the version number.
269
- -h --help Show usage text.
272
+ -h, --help Show usage text.
270
273
271
274
Examples:
272
275
0 commit comments