-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unpublish): add workspace/dry-run support
PR-URL: #3251 Credit: @wraithgar Close: #3251 Reviewed-by: @ruyadorno, @isaacs
- Loading branch information
Showing
9 changed files
with
269 additions
and
98 deletions.
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
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
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 |
---|---|---|
|
@@ -6,7 +6,8 @@ | |
*/ | ||
'use strict' | ||
exports[`test/lib/publish.js TAP shows usage with wrong set of arguments > should print usage 1`] = ` | ||
npm publish | ||
Error: | ||
Usage: npm publish | ||
Publish a package | ||
|
@@ -18,13 +19,16 @@ Options: | |
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] | ||
[-ws|--workspaces] | ||
Run "npm help publish" for more info | ||
Run "npm help publish" for more info { | ||
"code": "EUSAGE", | ||
} | ||
` | ||
|
||
exports[`test/lib/publish.js TAP workspaces all workspaces > should output all publishes 1`] = ` | ||
Array [ | ||
"+ [email protected]", | ||
"+ [email protected]", | ||
"+ [email protected]", | ||
] | ||
` | ||
|
||
|
@@ -54,6 +58,12 @@ Array [ | |
}, | ||
"version": "1.2.3-n", | ||
}, | ||
Object { | ||
"_id": "[email protected]", | ||
"name": "workspace-n", | ||
"readme": "ERROR: No README data found!", | ||
"version": "1.2.3-n", | ||
}, | ||
] | ||
` | ||
|
||
|
@@ -66,6 +76,9 @@ Array [ | |
}, | ||
"workspace-b": { | ||
"id": "[email protected]" | ||
}, | ||
"workspace-n": { | ||
"id": "[email protected]" | ||
} | ||
} | ||
), | ||
|
@@ -98,6 +111,12 @@ Array [ | |
}, | ||
"version": "1.2.3-n", | ||
}, | ||
Object { | ||
"_id": "[email protected]", | ||
"name": "workspace-n", | ||
"readme": "ERROR: No README data found!", | ||
"version": "1.2.3-n", | ||
}, | ||
] | ||
` | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* IMPORTANT | ||
* This snapshot file is auto-generated, but designed for humans. | ||
* It should be checked into source control and tracked carefully. | ||
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. | ||
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/lib/unpublish.js TAP workspaces all workspaces --force > should output all workspaces 1`] = ` | ||
- workspace-a- workspace-b- workspace-n | ||
` | ||
|
||
exports[`test/lib/unpublish.js TAP workspaces one workspace --force > should output one workspaces 1`] = ` | ||
- workspace-a | ||
` |
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
Oops, something went wrong.