-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(publish): skip private workspaces
Allow users to publish all workspaces with `npm publish --ws` while also skipping any workspace that might have been intentionally marked as private, using `"private": true` in its package.json file. Fixes: npm#3268
- Loading branch information
Showing
3 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,40 @@ | |
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/lib/publish.js TAP private workspaces colorless > should output all publishes 1`] = ` | ||
Array [ | ||
"+ @npmcli/[email protected]", | ||
] | ||
` | ||
|
||
exports[`test/lib/publish.js TAP private workspaces colorless > should publish all non-private workspaces 1`] = ` | ||
Array [ | ||
Object { | ||
"_id": "@npmcli/[email protected]", | ||
"name": "@npmcli/b", | ||
"readme": "ERROR: No README data found!", | ||
"version": "1.0.0", | ||
}, | ||
] | ||
` | ||
|
||
exports[`test/lib/publish.js TAP private workspaces with color > should output all publishes 1`] = ` | ||
Array [ | ||
"+ @npmcli/[email protected]", | ||
] | ||
` | ||
|
||
exports[`test/lib/publish.js TAP private workspaces with color > should publish all non-private workspaces 1`] = ` | ||
Array [ | ||
Object { | ||
"_id": "@npmcli/[email protected]", | ||
"name": "@npmcli/b", | ||
"readme": "ERROR: No README data found!", | ||
"version": "1.0.0", | ||
}, | ||
] | ||
` | ||
|
||
exports[`test/lib/publish.js TAP shows usage with wrong set of arguments > should print usage 1`] = ` | ||
Error: | ||
Usage: npm publish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters