Skip to content

Commit 45b397d

Browse files
authoredMay 13, 2022
Merge branch 'master' into feature/greater-package-version
2 parents e738dd8 + e59377e commit 45b397d

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed
 

‎README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,17 @@ jobs:
6363
6464
You can set any or all of the following input parameters:
6565
66-
| Name | Type | Required? | Default | Description |
67-
| ---------------------- | ------- | --------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
68-
| `token` | string | yes | | The NPM auth token to use for publishing |
69-
| `registry` | string | no | https://registry.npmjs.org/ | The NPM registry URL to use |
70-
| `package` | string | no | ./package.json | The path of your package.json file |
71-
| `tag` | string | no | "latest" | The tag to publish to. This allows people to install the package using `npm install <package-name>@<tag>`. |
72-
| `access` | string | no | "public" for non-scoped packages. "restricted" for scoped packages. | Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. |
73-
| `dry-run` | boolean | no | false | Run NPM publish with the `--dry-run` flag to prevent publication |
74-
| `check-version` | boolean | no | true | Only publish to NPM if the version number in `package.json` differs from the latest on NPM |
75-
| `greater-version-only` | boolean | no | false | Only publish to NPM if the version number in `package.json` is greater than the latest on NPM |
66+
|Name |Type |Default |Description
67+
|----------------------|-------- |----------------------------|------------------------------------
68+
|`token` |string |**required** |The NPM auth token to use for publishing
69+
|`registry` |string |https://registry.npmjs.org/ |The NPM registry URL to use
70+
|`package` |string |./package.json |The path of your package.json file
71+
|`tag` |string |"latest" |The tag to publish to. This allows people to install the package using `npm install <package-name>@<tag>`.
72+
|`access` |string |"public" for non-scoped packages. "restricted" for scoped packages.|Determines whether the published package should be publicly visible, or restricted to members of your NPM organization.
73+
|`dry-run` |boolean |false |Run NPM publish with the `--dry-run` flag to prevent publication
74+
|`check-version` |boolean |true |Only publish to NPM if the version number in `package.json` differs from the latest on NPM
75+
|`greater-version-only`|boolean |false |Only publish to NPM if the version number in `package.json` is greater than the latest on NPM |
76+
7677

7778
## Output Variables
7879

‎src/action/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ async function main(): Promise<void> {
3232

3333
if (results.type === "none") {
3434
console.log(
35-
`\n📦 ${results.package} v${results.version} is already published to NPM`
35+
`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`
3636
);
3737
}
3838
if (results.type === "lower") {
3939
console.log(
40-
`\n📦 ${results.package} v${results.version} is lower than the version published to NPM`
40+
`\n📦 ${results.package} v${results.version} is lower than the version published to ${options.registry}`
4141
);
4242
}
4343
else if (results.dryRun) {
4444
console.log(
45-
`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`
45+
`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`
4646
);
4747
}
4848
else {
4949
console.log(
50-
`\n📦 Successfully published ${results.package} v${results.version} to NPM`
50+
`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`
5151
);
5252
}
5353

‎src/cli/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export async function main(args: string[]): Promise<void> {
3535

3636
if (!options.quiet) {
3737
if (results.type === "none") {
38-
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
38+
console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
3939
}
4040
else if (results.dryRun) {
41-
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
41+
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
4242
}
4343
else {
44-
console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
44+
console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
4545
}
4646
}
4747
}

‎src/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const npm = {
109109
await ezSpawn.async(command, { cwd, stdio, env });
110110
}
111111
catch (error) {
112-
throw ono(error, `Unable to publish ${name} v${version} to NPM.`);
112+
throw ono(error, `Unable to publish ${name} v${version} to ${options.registry}.`);
113113
}
114114
},
115115
};

0 commit comments

Comments
 (0)
Failed to load comments.