diff options
author | Gar <gar+gh@danger.computer> | 2021-10-08 04:40:03 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-11-04 00:04:22 +0300 |
commit | 8ffeb71dfb248b4a76744bd06cd4d6100f17c8ae (patch) | |
tree | b44d12a79dff3afe0c92df6f6c0219f6d91ad471 /tap-snapshots/test/lib | |
parent | 85d59191cf681eabd8827ca58f925c1063776f61 (diff) |
chore: refactor commands
This is the first phase of refactoring the internal structure of the npm
commands to set us up for future changes. This iteration changes the
function signature of `exec` for all the commands to be a async (no more
callbacks), and also groups all the commands into their own
subdirectory.
It also removes the Proxy `npm.commands` object, in favor of an
`npm.cmd` and `npm.exec` function that breaks up the two things that
proxy was doing. Namely, getting to the attributes of a given command
(`npm.cmd` now does this), and actually running the command `npm.exec`
does this.
PR-URL: https://github.com/npm/cli/pull/3959
Credit: @wraithgar
Close: #3959
Reviewed-by: @lukekarrys
Diffstat (limited to 'tap-snapshots/test/lib')
-rw-r--r-- | tap-snapshots/test/lib/commands/config.js.test.cjs (renamed from tap-snapshots/test/lib/config.js.test.cjs) | 6 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/dist-tag.js.test.cjs (renamed from tap-snapshots/test/lib/dist-tag.js.test.cjs) | 54 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/fund.js.test.cjs (renamed from tap-snapshots/test/lib/fund.js.test.cjs) | 28 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/init.js.test.cjs (renamed from tap-snapshots/test/lib/init.js.test.cjs) | 8 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/link.js.test.cjs | 45 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/ls.js.test.cjs (renamed from tap-snapshots/test/lib/ls.js.test.cjs) | 170 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/outdated.js.test.cjs (renamed from tap-snapshots/test/lib/outdated.js.test.cjs) | 84 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/owner.js.test.cjs (renamed from tap-snapshots/test/lib/owner.js.test.cjs) | 4 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/profile.js.test.cjs (renamed from tap-snapshots/test/lib/profile.js.test.cjs) | 22 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/publish.js.test.cjs (renamed from tap-snapshots/test/lib/publish.js.test.cjs) | 22 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/search.js.test.cjs (renamed from tap-snapshots/test/lib/search.js.test.cjs) | 6 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/stars.js.test.cjs (renamed from tap-snapshots/test/lib/stars.js.test.cjs) | 2 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/team.js.test.cjs | 85 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/unpublish.js.test.cjs (renamed from tap-snapshots/test/lib/unpublish.js.test.cjs) | 4 | ||||
-rw-r--r-- | tap-snapshots/test/lib/commands/view.js.test.cjs (renamed from tap-snapshots/test/lib/view.js.test.cjs) | 71 | ||||
-rw-r--r-- | tap-snapshots/test/lib/link.js.test.cjs | 45 | ||||
-rw-r--r-- | tap-snapshots/test/lib/team.js.test.cjs | 85 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/error-message.js.test.cjs | 16 |
18 files changed, 385 insertions, 372 deletions
diff --git a/tap-snapshots/test/lib/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index ee121c28a..814f6de7c 100644 --- a/tap-snapshots/test/lib/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`] = ` +exports[`test/lib/commands/config.js TAP config list --json > output matches snapshot 1`] = ` { "prefix": "{LOCALPREFIX}", "userconfig": "{HOME}/.npmrc", @@ -160,7 +160,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`] } ` -exports[`test/lib/config.js TAP config list --long > output matches snapshot 1`] = ` +exports[`test/lib/commands/config.js TAP config list --long > output matches snapshot 1`] = ` ; "default" config from default values _auth = (protected) @@ -329,7 +329,7 @@ prefix = "{LOCALPREFIX}" userconfig = "{HOME}/.npmrc" ` -exports[`test/lib/config.js TAP config list > output matches snapshot 1`] = ` +exports[`test/lib/commands/config.js TAP config list > output matches snapshot 1`] = ` ; "cli" config from command line options prefix = "{LOCALPREFIX}" diff --git a/tap-snapshots/test/lib/dist-tag.js.test.cjs b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs index f651f7b67..53f296ac0 100644 --- a/tap-snapshots/test/lib/dist-tag.js.test.cjs +++ b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/dist-tag.js TAP add missing args > should exit usage error message 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP add missing args > should exit usage error message 1`] = ` Error: Usage: npm dist-tag @@ -27,7 +27,7 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP add missing pkg name > should exit usage error message 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP add missing pkg name > should exit usage error message 1`] = ` Error: Usage: npm dist-tag @@ -49,16 +49,16 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP add new tag > should return success msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP add new tag > should return success msg 1`] = ` +c: @scoped/another@7.7.7 ` -exports[`test/lib/dist-tag.js TAP add using valid semver range as name > should return success msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP add using valid semver range as name > should return success msg 1`] = ` dist-tag add 1.0.0 to @scoped/another@7.7.7 ` -exports[`test/lib/dist-tag.js TAP borked cmd usage > should show usage error 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP borked cmd usage > should show usage error 1`] = ` Error: Usage: npm dist-tag @@ -80,7 +80,7 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP ls global > should throw basic usage 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls global > should throw basic usage 1`] = ` Error: Usage: npm dist-tag @@ -102,13 +102,13 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP ls in current package > should list available tags for current package 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls in current package > should list available tags for current package 1`] = ` a: 0.0.1 b: 0.5.0 latest: 1.0.0 ` -exports[`test/lib/dist-tag.js TAP ls on missing name in current package > should throw usage error message 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls on missing name in current package > should throw usage error message 1`] = ` Error: Usage: npm dist-tag @@ -130,43 +130,43 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP ls on missing package > should log no dist-tag found msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls on missing package > should log no dist-tag found msg 1`] = ` dist-tag ls Couldn't get dist-tag data for foo@latest ` -exports[`test/lib/dist-tag.js TAP ls on missing package > should throw error message 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls on missing package > should throw error message 1`] = ` Error: No dist-tags found for foo ` -exports[`test/lib/dist-tag.js TAP ls on named package > should list tags for the specified package 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP ls on named package > should list tags for the specified package 1`] = ` a: 0.0.2 b: 0.6.0 latest: 2.0.0 ` -exports[`test/lib/dist-tag.js TAP no args in current package > should default to listing available tags for current package 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP no args in current package > should default to listing available tags for current package 1`] = ` a: 0.0.1 b: 0.5.0 latest: 1.0.0 ` -exports[`test/lib/dist-tag.js TAP only named package arg > should default to listing tags for the specified package 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP only named package arg > should default to listing tags for the specified package 1`] = ` a: 0.0.2 b: 0.6.0 latest: 2.0.0 ` -exports[`test/lib/dist-tag.js TAP remove existing tag > should log remove info 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP remove existing tag > should log remove info 1`] = ` dist-tag del c from @scoped/another ` -exports[`test/lib/dist-tag.js TAP remove existing tag > should return success msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP remove existing tag > should return success msg 1`] = ` -c: @scoped/another@7.7.7 ` -exports[`test/lib/dist-tag.js TAP remove missing pkg name > should exit usage error message 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP remove missing pkg name > should exit usage error message 1`] = ` Error: Usage: npm dist-tag @@ -188,19 +188,19 @@ Run "npm help dist-tag" for more info { } ` -exports[`test/lib/dist-tag.js TAP remove non-existing tag > should log error msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP remove non-existing tag > should log error msg 1`] = ` dist-tag del nonexistent from @scoped/another dist-tag del nonexistent is not a dist-tag on @scoped/another ` -exports[`test/lib/dist-tag.js TAP set existing version > should log warn msg 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP set existing version > should log warn msg 1`] = ` dist-tag add b to @scoped/another@0.6.0 dist-tag add b is already set to version 0.6.0 ` -exports[`test/lib/dist-tag.js TAP workspaces no args > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces no args > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -212,7 +212,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces no args, one failing workspace sets exitCode to 1 > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces no args, one failing workspace sets exitCode to 1 > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -225,13 +225,13 @@ latest: 3.0.0 workspace-d: ` -exports[`test/lib/dist-tag.js TAP workspaces no args, one workspace > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces no args, one workspace > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces one arg -- . > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces one arg -- . > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -243,7 +243,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces one arg -- .@1, ignores version spec > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces one arg -- .@1, ignores version spec > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -255,7 +255,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces one arg -- list > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces one arg -- list > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -267,7 +267,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces two args -- list, . > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces two args -- list, . > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -279,7 +279,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces two args -- list, .@1, ignores version spec > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces two args -- list, .@1, ignores version spec > printed the expected output 1`] = ` workspace-a: latest-a: 1.0.0 latest: 1.0.0 @@ -291,7 +291,7 @@ latest-c: 3.0.0 latest: 3.0.0 ` -exports[`test/lib/dist-tag.js TAP workspaces two args -- list, @scoped/pkg, logs a warning and ignores workspaces > printed the expected output 1`] = ` +exports[`test/lib/commands/dist-tag.js TAP workspaces two args -- list, @scoped/pkg, logs a warning and ignores workspaces > printed the expected output 1`] = ` a: 0.0.1 b: 0.5.0 latest: 1.0.0 diff --git a/tap-snapshots/test/lib/fund.js.test.cjs b/tap-snapshots/test/lib/commands/fund.js.test.cjs index c078beb7d..f0df1e1c5 100644 --- a/tap-snapshots/test/lib/fund.js.test.cjs +++ b/tap-snapshots/test/lib/commands/fund.js.test.cjs @@ -5,14 +5,14 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/fund.js TAP fund a package with type and multiple sources > should print prompt select message 1`] = ` +exports[`test/lib/commands/fund.js TAP fund a package with type and multiple sources > should print prompt select message 1`] = ` 1: Foo funding available at the following URL: http://example.com/foo 2: Lorem funding available at the following URL: http://example.com/foo-lorem Run \`npm fund [<@scope>/]<pkg> --which=1\`, for example, to open the first funding URL listed in that package ` -exports[`test/lib/fund.js TAP fund colors > should print output with color info 1`] = ` +exports[`test/lib/commands/fund.js TAP fund colors > should print output with color info 1`] = ` [0mtest-fund-colors@1.0.0[0m [0m+-- [40m[37mhttp://example.com/a[39m[49m[0m [0m| \`-- a@1.0.0[0m @@ -26,7 +26,7 @@ exports[`test/lib/fund.js TAP fund colors > should print output with color info ` -exports[`test/lib/fund.js TAP fund containing multi-level nested deps with no funding > should omit dependencies with no funding declared 1`] = ` +exports[`test/lib/commands/fund.js TAP fund containing multi-level nested deps with no funding > should omit dependencies with no funding declared 1`] = ` nested-no-funding-packages@1.0.0 +-- https://example.com/lorem | \`-- lorem@1.0.0 @@ -36,54 +36,54 @@ nested-no-funding-packages@1.0.0 ` -exports[`test/lib/fund.js TAP fund in which same maintainer owns all its deps > should print stack packages together 1`] = ` +exports[`test/lib/commands/fund.js TAP fund in which same maintainer owns all its deps > should print stack packages together 1`] = ` http://example.com/donate \`-- maintainer-owns-all-deps@1.0.0, dep-foo@1.0.0, dep-sub-foo@1.0.0, dep-bar@1.0.0 ` -exports[`test/lib/fund.js TAP fund pkg missing version number > should print name only 1`] = ` +exports[`test/lib/commands/fund.js TAP fund pkg missing version number > should print name only 1`] = ` http://example.com/foo \`-- foo ` -exports[`test/lib/fund.js TAP fund using nested packages with multiple sources > should prompt with all available URLs 1`] = ` +exports[`test/lib/commands/fund.js TAP fund using nested packages with multiple sources > should prompt with all available URLs 1`] = ` 1: Funding available at the following URL: https://one.example.com 2: Funding available at the following URL: https://two.example.com Run \`npm fund [<@scope>/]<pkg> --which=1\`, for example, to open the first funding URL listed in that package ` -exports[`test/lib/fund.js TAP fund using nested packages with multiple sources, with a source number > should open the numbered URL 1`] = ` +exports[`test/lib/commands/fund.js TAP fund using nested packages with multiple sources, with a source number > should open the numbered URL 1`] = ` Funding available at the following URL: https://one.example.com ` -exports[`test/lib/fund.js TAP fund using package argument > should open funding url 1`] = ` +exports[`test/lib/commands/fund.js TAP fund using package argument > should open funding url 1`] = ` individual funding available at the following URL: http://example.com/donate ` -exports[`test/lib/fund.js TAP fund using pkg name while having conflicting versions > should open greatest version 1`] = ` +exports[`test/lib/commands/fund.js TAP fund using pkg name while having conflicting versions > should open greatest version 1`] = ` Funding available at the following URL: http://example.com/2 ` -exports[`test/lib/fund.js TAP fund using string shorthand > should open string-only url 1`] = ` +exports[`test/lib/commands/fund.js TAP fund using string shorthand > should open string-only url 1`] = ` Funding available at the following URL: https://example.com/sponsor ` -exports[`test/lib/fund.js TAP fund with no package containing funding > should print empty funding info 1`] = ` +exports[`test/lib/commands/fund.js TAP fund with no package containing funding > should print empty funding info 1`] = ` no-funding-package@0.0.0 ` -exports[`test/lib/fund.js TAP sub dep with fund info and a parent with no funding info > should nest sub dep as child of root 1`] = ` +exports[`test/lib/commands/fund.js TAP sub dep with fund info and a parent with no funding info > should nest sub dep as child of root 1`] = ` test-multiple-funding-sources@1.0.0 +-- http://example.com/b | \`-- b@1.0.0 @@ -93,7 +93,7 @@ test-multiple-funding-sources@1.0.0 ` -exports[`test/lib/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace name and its deps 1`] = ` +exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace name and its deps 1`] = ` workspaces-support@1.0.0 \`-- https://example.com/a | \`-- a@1.0.0 @@ -103,7 +103,7 @@ workspaces-support@1.0.0 ` -exports[`test/lib/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace path and its deps 1`] = ` +exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace path and its deps 1`] = ` workspaces-support@1.0.0 \`-- https://example.com/a | \`-- a@1.0.0 diff --git a/tap-snapshots/test/lib/init.js.test.cjs b/tap-snapshots/test/lib/commands/init.js.test.cjs index 3eb75be5f..3ca9d9317 100644 --- a/tap-snapshots/test/lib/init.js.test.cjs +++ b/tap-snapshots/test/lib/commands/init.js.test.cjs @@ -5,11 +5,11 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/init.js TAP npm init workspces with root > does not print helper info 1`] = ` +exports[`test/lib/commands/init.js TAP npm init workspces with root > does not print helper info 1`] = ` Array [] ` -exports[`test/lib/init.js TAP workspaces no args > should print helper info 1`] = ` +exports[`test/lib/commands/init.js TAP workspaces no args > should print helper info 1`] = ` Array [ Array [ String( @@ -28,10 +28,10 @@ Array [ ] ` -exports[`test/lib/init.js TAP workspaces no args, existing folder > should print helper info 1`] = ` +exports[`test/lib/commands/init.js TAP workspaces no args, existing folder > should print helper info 1`] = ` Array [] ` -exports[`test/lib/init.js TAP workspaces with arg but missing workspace folder > should print helper info 1`] = ` +exports[`test/lib/commands/init.js TAP workspaces with arg but missing workspace folder > should print helper info 1`] = ` Array [] ` diff --git a/tap-snapshots/test/lib/commands/link.js.test.cjs b/tap-snapshots/test/lib/commands/link.js.test.cjs new file mode 100644 index 000000000..a9a10b20a --- /dev/null +++ b/tap-snapshots/test/lib/commands/link.js.test.cjs @@ -0,0 +1,45 @@ +/* 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/commands/link.js TAP link global linked pkg to local nm when using args > should create a local symlink to global pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/bar -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/@myscope/bar +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/scoped-linked +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/a -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/a +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/link-me-too -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/link-me-too +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/test-pkg-link -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/test-pkg-link + +` + +exports[`test/lib/commands/link.js TAP link global linked pkg to local workspace using args > should create a local symlink to global pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/@myscope/bar -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/global-prefix/lib/node_modules/@myscope/bar +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/scoped-linked +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/a -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/global-prefix/lib/node_modules/a +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/link-me-too -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/link-me-too +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/test-pkg-link -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/test-pkg-link +{CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/x -> {CWD}/test/lib/commands/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/packages/x + +` + +exports[`test/lib/commands/link.js TAP link pkg already in global space > should create a local symlink to global pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-pkg-already-in-global-space/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/commands/tap-testdir-link-link-pkg-already-in-global-space/scoped-linked + +` + +exports[`test/lib/commands/link.js TAP link pkg already in global space when prefix is a symlink > should create a local symlink to global pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-pkg-already-in-global-space-when-prefix-is-a-symlink/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/commands/tap-testdir-link-link-pkg-already-in-global-space-when-prefix-is-a-symlink/scoped-linked + +` + +exports[`test/lib/commands/link.js TAP link to globalDir when in current working dir of pkg and no args > should create a global link to current pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/global-prefix/lib/node_modules/test-pkg-link -> {CWD}/test/lib/commands/tap-testdir-link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/test-pkg-link + +` + +exports[`test/lib/commands/link.js TAP link ws to globalDir when workspace specified and no args > should create a global link to current pkg 1`] = ` +{CWD}/test/lib/commands/tap-testdir-link-link-ws-to-globalDir-when-workspace-specified-and-no-args/global-prefix/lib/node_modules/a -> {CWD}/test/lib/commands/tap-testdir-link-link-ws-to-globalDir-when-workspace-specified-and-no-args/test-pkg-link/packages/a + +` diff --git a/tap-snapshots/test/lib/ls.js.test.cjs b/tap-snapshots/test/lib/commands/ls.js.test.cjs index c550f447c..105b13b5e 100644 --- a/tap-snapshots/test/lib/ls.js.test.cjs +++ b/tap-snapshots/test/lib/commands/ls.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/ls.js TAP ignore missing optional deps --json > ls --json problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ignore missing optional deps --json > ls --json problems 1`] = ` Array [ "invalid: optional-wrong@3.2.1 {project}/node_modules/optional-wrong", "missing: peer-missing@1, required by test-npm-ls-ignore-missing-optional@1.2.3", @@ -16,7 +16,7 @@ Array [ ] ` -exports[`test/lib/ls.js TAP ignore missing optional deps --parseable > ls --parseable result 1`] = ` +exports[`test/lib/commands/ls.js TAP ignore missing optional deps --parseable > ls --parseable result 1`] = ` {project} {project}/node_modules/optional-ok {project}/node_modules/optional-wrong @@ -28,7 +28,7 @@ exports[`test/lib/ls.js TAP ignore missing optional deps --parseable > ls --pars {project}/node_modules/prod-wrong ` -exports[`test/lib/ls.js TAP ignore missing optional deps human output > ls result 1`] = ` +exports[`test/lib/commands/ls.js TAP ignore missing optional deps human output > ls result 1`] = ` test-npm-ls-ignore-missing-optional@1.2.3 {project} +-- unmet optional dependency optional-missing@1 +-- optional-ok@1.2.3 @@ -45,14 +45,14 @@ test-npm-ls-ignore-missing-optional@1.2.3 {project} ` -exports[`test/lib/ls.js TAP ls --depth=0 > should output tree containing only top-level dependencies 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --depth=0 > should output tree containing only top-level dependencies 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---depth-0 +-- chai@1.0.0 \`-- foo@1.0.0 ` -exports[`test/lib/ls.js TAP ls --depth=1 > should output tree containing top-level deps and their deps only 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --depth=1 > should output tree containing top-level deps and their deps only 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---depth-1 +-- a@1.0.0 | \`-- b@1.0.0 @@ -60,7 +60,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---depth-1 ` -exports[`test/lib/ls.js TAP ls --dev > should output tree containing dev deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --dev > should output tree containing dev deps 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---dev \`-- dev-dep@1.0.0 \`-- foo@1.0.0 @@ -68,13 +68,13 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---dev ` -exports[`test/lib/ls.js TAP ls --link > should output tree containing linked deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --link > should output tree containing linked deps 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---link \`-- linked-dep@1.0.0 -> ./linked-dep ` -exports[`test/lib/ls.js TAP ls --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = ` test-npm-ls@1.0.0 | {CWD}/tap-testdir-ls-ls---long---depth-0 | @@ -91,7 +91,7 @@ test-npm-ls@1.0.0 ` -exports[`test/lib/ls.js TAP ls --long > should output tree info with descriptions 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --long > should output tree info with descriptions 1`] = ` test-npm-ls@1.0.0 | {CWD}/tap-testdir-ls-ls---long | @@ -114,7 +114,7 @@ test-npm-ls@1.0.0 ` -exports[`test/lib/ls.js TAP ls --only=development > should output tree containing only development deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --only=development > should output tree containing only development deps 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-development \`-- dev-dep@1.0.0 \`-- foo@1.0.0 @@ -122,7 +122,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-development ` -exports[`test/lib/ls.js TAP ls --only=prod > should output tree containing only prod deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --only=prod > should output tree containing only prod deps 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-prod +-- chai@1.0.0 +-- optional-dep@1.0.0 @@ -131,32 +131,32 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-prod ` -exports[`test/lib/ls.js TAP ls --parseable --depth=0 > should output tree containing only top-level dependencies 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --depth=0 > should output tree containing only top-level dependencies 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---depth-0 {CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/foo ` -exports[`test/lib/ls.js TAP ls --parseable --depth=1 > should output parseable containing top-level deps and their deps only 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --depth=1 > should output parseable containing top-level deps and their deps only 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---depth-1 {CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable---depth-1/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable --dev > should output tree containing dev deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --dev > should output tree containing dev deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---dev {CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/dev-dep {CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable---dev/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable --link > should output tree containing linked deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --link > should output tree containing linked deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---link {CWD}/tap-testdir-ls-ls---parseable---link/node_modules/linked-dep ` -exports[`test/lib/ls.js TAP ls --parseable --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---long---depth-0:test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/chai:chai@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/dev-dep:dev-dep@1.0.0 @@ -165,7 +165,7 @@ exports[`test/lib/ls.js TAP ls --parseable --long --depth=0 > should output tree {CWD}/tap-testdir-ls-ls---parseable---long---depth-0/node_modules/prod-dep:prod-dep@1.0.0 ` -exports[`test/lib/ls.js TAP ls --parseable --long > should output tree info with descriptions 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --long > should output tree info with descriptions 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---long:test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long/node_modules/chai:chai@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long/node_modules/dev-dep:dev-dep@1.0.0 @@ -177,14 +177,14 @@ exports[`test/lib/ls.js TAP ls --parseable --long > should output tree info with {CWD}/tap-testdir-ls-ls---parseable---long/node_modules/dog:dog@1.0.0 ` -exports[`test/lib/ls.js TAP ls --parseable --long missing/invalid/extraneous > should output parseable result containing EXTRANEOUS/INVALID labels 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --long missing/invalid/extraneous > should output parseable result containing EXTRANEOUS/INVALID labels 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous:test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/chai:chai@1.0.0:EXTRANEOUS {CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/foo:foo@1.0.0:INVALID {CWD}/tap-testdir-ls-ls---parseable---long-missing-invalid-extraneous/node_modules/dog:dog@1.0.0 ` -exports[`test/lib/ls.js TAP ls --parseable --long print symlink target location > should output parseable results with symlink targets 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --long print symlink target location > should output parseable results with symlink targets 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location:test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/chai:chai@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/dev-dep:dev-dep@1.0.0 @@ -197,21 +197,21 @@ exports[`test/lib/ls.js TAP ls --parseable --long print symlink target location {CWD}/tap-testdir-ls-ls---parseable---long-print-symlink-target-location/node_modules/dog:dog@1.0.0 ` -exports[`test/lib/ls.js TAP ls --parseable --long with extraneous deps > should output long parseable output with extraneous info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --long with extraneous deps > should output long parseable output with extraneous info 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps:test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/chai:chai@1.0.0:EXTRANEOUS {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/foo:foo@1.0.0 {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/dog:dog@1.0.0 ` -exports[`test/lib/ls.js TAP ls --parseable --only=development > should output tree containing only development deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --only=development > should output tree containing only development deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---only-development {CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dev-dep {CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable --only=prod > should output tree containing only prod deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --only=prod > should output tree containing only prod deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---only-prod {CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/optional-dep @@ -219,7 +219,7 @@ exports[`test/lib/ls.js TAP ls --parseable --only=prod > should output tree cont {CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable --production > should output tree containing production deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable --production > should output tree containing production deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---production {CWD}/tap-testdir-ls-ls---parseable---production/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable---production/node_modules/optional-dep @@ -227,72 +227,72 @@ exports[`test/lib/ls.js TAP ls --parseable --production > should output tree con {CWD}/tap-testdir-ls-ls---parseable---production/node_modules/prod-dep/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable cycle deps > should print tree output omitting deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable cycle deps > should print tree output omitting deduped ref 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-cycle-deps {CWD}/tap-testdir-ls-ls---parseable-cycle-deps/node_modules/a {CWD}/tap-testdir-ls-ls---parseable-cycle-deps/node_modules/b ` -exports[`test/lib/ls.js TAP ls --parseable default --depth value should be 0 > should output parseable output containing only top-level dependencies 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable default --depth value should be 0 > should output parseable output containing only top-level dependencies 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0 {CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-default---depth-value-should-be-0/node_modules/foo ` -exports[`test/lib/ls.js TAP ls --parseable empty location > should print empty result 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable empty location > should print empty result 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-empty-location ` -exports[`test/lib/ls.js TAP ls --parseable extraneous deps > should output containing problems info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable extraneous deps > should output containing problems info 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-extraneous-deps {CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable-extraneous-deps/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable from and resolved properties > should not be printed in tree output 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable from and resolved properties > should not be printed in tree output 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-from-and-resolved-properties {CWD}/tap-testdir-ls-ls---parseable-from-and-resolved-properties/node_modules/simple-output ` -exports[`test/lib/ls.js TAP ls --parseable global > should print parseable output for global deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable global > should print parseable output for global deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-global {CWD}/tap-testdir-ls-ls---parseable-global/node_modules/a {CWD}/tap-testdir-ls-ls---parseable-global/node_modules/b {CWD}/tap-testdir-ls-ls---parseable-global/node_modules/b/node_modules/c ` -exports[`test/lib/ls.js TAP ls --parseable json read problems > should print empty result 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable json read problems > should print empty result 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-json-read-problems ` -exports[`test/lib/ls.js TAP ls --parseable missing package.json > should output parseable missing name/version of top-level package 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable missing package.json > should output parseable missing name/version of top-level package 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-missing-package.json {CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/dog {CWD}/tap-testdir-ls-ls---parseable-missing-package.json/node_modules/foo ` -exports[`test/lib/ls.js TAP ls --parseable missing/invalid/extraneous > should output parseable containing top-level deps and their deps only 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable missing/invalid/extraneous > should output parseable containing top-level deps and their deps only 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous {CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable-missing-invalid-extraneous/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable no args > should output parseable representation of dependencies structure 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable no args > should output parseable representation of dependencies structure 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-no-args {CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/foo {CWD}/tap-testdir-ls-ls---parseable-no-args/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable resolved points to git ref > should output tree containing git refs 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable resolved points to git ref > should output tree containing git refs 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-resolved-points-to-git-ref {CWD}/tap-testdir-ls-ls---parseable-resolved-points-to-git-ref/node_modules/abbrev ` -exports[`test/lib/ls.js TAP ls --parseable unmet optional dep > should output parseable with empty entry for missing optional deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable unmet optional dep > should output parseable with empty entry for missing optional deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep {CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/dev-dep @@ -304,7 +304,7 @@ exports[`test/lib/ls.js TAP ls --parseable unmet optional dep > should output pa {CWD}/tap-testdir-ls-ls---parseable-unmet-optional-dep/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable unmet peer dep > should output parseable signaling missing peer dep in problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable unmet peer dep > should output parseable signaling missing peer dep in problems 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep {CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/dev-dep @@ -316,29 +316,29 @@ exports[`test/lib/ls.js TAP ls --parseable unmet peer dep > should output parsea {CWD}/tap-testdir-ls-ls---parseable-unmet-peer-dep/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable using aliases > should output tree containing aliases 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable using aliases > should output tree containing aliases 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-using-aliases {CWD}/tap-testdir-ls-ls---parseable-using-aliases/node_modules/a ` -exports[`test/lib/ls.js TAP ls --parseable with filter arg > should output parseable contaning only occurrences of filtered by package 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg > should output parseable contaning only occurrences of filtered by package 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-with-filter-arg/node_modules/chai ` -exports[`test/lib/ls.js TAP ls --parseable with filter arg nested dep > should output parseable contaning only occurrences of filtered package 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg nested dep > should output parseable contaning only occurrences of filtered package 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-with-filter-arg-nested-dep/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --parseable with missing filter arg > should output parseable output containing no dependencies info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable with missing filter arg > should output parseable output containing no dependencies info 1`] = ` ` -exports[`test/lib/ls.js TAP ls --parseable with multiple filter args > should output parseable contaning only occurrences of multiple filtered packages and their ancestors 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --parseable with multiple filter args > should output parseable contaning only occurrences of multiple filtered packages and their ancestors 1`] = ` {CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/chai {CWD}/tap-testdir-ls-ls---parseable-with-multiple-filter-args/node_modules/dog ` -exports[`test/lib/ls.js TAP ls --production > should output tree containing production deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls --production > should output tree containing production deps 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---production +-- chai@1.0.0 +-- optional-dep@1.0.0 @@ -347,13 +347,13 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---production ` -exports[`test/lib/ls.js TAP ls broken resolved field > should NOT print git refs in output tree 1`] = ` +exports[`test/lib/commands/ls.js TAP ls broken resolved field > should NOT print git refs in output tree 1`] = ` npm-broken-resolved-field-test@1.0.0 {CWD}/tap-testdir-ls-ls-broken-resolved-field \`-- a@1.0.1 ` -exports[`test/lib/ls.js TAP ls colored output > should output tree containing color info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls colored output > should output tree containing color info 1`] = ` [0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-colored-output[0m [0m+-- chai@1.0.0 [32m[40mextraneous[49m[39m[0m [0m+-- foo@1.0.0 [31m[40minvalid: "^2.0.0" from the root project[49m[39m[0m @@ -362,7 +362,7 @@ exports[`test/lib/ls.js TAP ls colored output > should output tree containing co [0m[0m ` -exports[`test/lib/ls.js TAP ls cycle deps > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls cycle deps > should print tree output containing deduped ref 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-cycle-deps \`-- a@1.0.0 \`-- b@1.0.0 @@ -370,7 +370,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-cycle-deps ` -exports[`test/lib/ls.js TAP ls cycle deps with filter args > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls cycle deps with filter args > should print tree output containing deduped ref 1`] = ` [0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-cycle-deps-with-filter-args[0m [0m\`-- [33m[40ma@1.0.0[49m[39m[0m [0m \`-- b@1.0.0[0m @@ -378,7 +378,7 @@ exports[`test/lib/ls.js TAP ls cycle deps with filter args > should print tree o [0m[0m ` -exports[`test/lib/ls.js TAP ls deduped missing dep > should output parseable signaling missing peer dep in problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ls deduped missing dep > should output parseable signaling missing peer dep in problems 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-deduped-missing-dep +-- a@1.0.0 | \`-- UNMET DEPENDENCY b@^1.0.0 @@ -386,20 +386,20 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-deduped-missing-dep ` -exports[`test/lib/ls.js TAP ls default --depth value should be 0 > should output tree containing only top-level dependencies 1`] = ` +exports[`test/lib/commands/ls.js TAP ls default --depth value should be 0 > should output tree containing only top-level dependencies 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-default---depth-value-should-be-0 +-- chai@1.0.0 \`-- foo@1.0.0 ` -exports[`test/lib/ls.js TAP ls empty location > should print empty result 1`] = ` +exports[`test/lib/commands/ls.js TAP ls empty location > should print empty result 1`] = ` {CWD}/tap-testdir-ls-ls-empty-location \`-- (empty) ` -exports[`test/lib/ls.js TAP ls extraneous deps > should output containing problems info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls extraneous deps > should output containing problems info 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-extraneous-deps +-- chai@1.0.0 extraneous \`-- foo@1.0.0 @@ -407,19 +407,19 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-extraneous-deps ` -exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should list a in top-level only 1`] = ` +exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option > should list a in top-level only 1`] = ` test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/tap-testdir-ls-ls-filter-pkg-arg-using-depth-option \`-- a@1.0.0 ` -exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should print empty results msg 1`] = ` +exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option > should print empty results msg 1`] = ` test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/tap-testdir-ls-ls-filter-pkg-arg-using-depth-option \`-- (empty) ` -exports[`test/lib/ls.js TAP ls filter pkg arg using depth option > should print expected result 1`] = ` +exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option > should print expected result 1`] = ` test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/tap-testdir-ls-ls-filter-pkg-arg-using-depth-option \`-- b@1.0.0 \`-- c@1.0.0 @@ -427,7 +427,7 @@ test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/tap-testdir-ls-ls-filter-pkg-arg- ` -exports[`test/lib/ls.js TAP ls filtering by child of missing dep > should print tree and not duplicate child of missing items 1`] = ` +exports[`test/lib/commands/ls.js TAP ls filtering by child of missing dep > should print tree and not duplicate child of missing items 1`] = ` filter-by-child-of-missing-dep@1.0.0 {CWD}/tap-testdir-ls-ls-filtering-by-child-of-missing-dep +-- b@1.0.0 extraneous | \`-- c@1.0.0 deduped @@ -437,13 +437,13 @@ filter-by-child-of-missing-dep@1.0.0 {CWD}/tap-testdir-ls-ls-filtering-by-child- ` -exports[`test/lib/ls.js TAP ls from and resolved properties > should not be printed in tree output 1`] = ` +exports[`test/lib/commands/ls.js TAP ls from and resolved properties > should not be printed in tree output 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-from-and-resolved-properties \`-- simple-output@2.1.1 ` -exports[`test/lib/ls.js TAP ls global > should print tree and not mark top-level items extraneous 1`] = ` +exports[`test/lib/commands/ls.js TAP ls global > should print tree and not mark top-level items extraneous 1`] = ` {CWD}/tap-testdir-ls-ls-global +-- a@1.0.0 \`-- b@1.0.0 @@ -451,7 +451,7 @@ exports[`test/lib/ls.js TAP ls global > should print tree and not mark top-level ` -exports[`test/lib/ls.js TAP ls invalid deduped dep > should output tree signaling mismatching peer dep in problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ls invalid deduped dep > should output tree signaling mismatching peer dep in problems 1`] = ` [0minvalid-deduped-dep@1.0.0 {CWD}/tap-testdir-ls-ls-invalid-deduped-dep[0m [0m+-- a@1.0.0[0m [0m| \`-- b@1.0.0 [90mdeduped[39m [31m[40minvalid: "^2.0.0" from the root project, "^2.0.0" from node_modules/a[49m[39m[0m @@ -459,7 +459,7 @@ exports[`test/lib/ls.js TAP ls invalid deduped dep > should output tree signalin [0m[0m ` -exports[`test/lib/ls.js TAP ls invalid peer dep > should output tree signaling mismatching peer dep in problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ls invalid peer dep > should output tree signaling mismatching peer dep in problems 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-invalid-peer-dep +-- chai@1.0.0 +-- dev-dep@1.0.0 @@ -472,20 +472,20 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-invalid-peer-dep ` -exports[`test/lib/ls.js TAP ls json read problems > should print empty result 1`] = ` +exports[`test/lib/commands/ls.js TAP ls json read problems > should print empty result 1`] = ` {CWD}/tap-testdir-ls-ls-json-read-problems \`-- (empty) ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should filter by parent folder workspace config 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should filter by parent folder workspace config 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces +-- e@1.0.0 -> ./group/e \`-- f@1.0.0 -> ./group/f ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should filter single workspace 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should filter single workspace 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces +-- a@1.0.0 -> ./a | \`-- d@1.0.0 deduped -> ./d @@ -493,7 +493,7 @@ workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspac ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should filter using workspace config 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should filter using workspace config 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces \`-- a@1.0.0 -> ./a +-- baz@1.0.0 @@ -504,7 +504,7 @@ workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspac ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should list --all workspaces properly 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should list --all workspaces properly 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces +-- a@1.0.0 -> ./a | +-- baz@1.0.0 @@ -519,7 +519,7 @@ workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspac ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should list only prod deps of workspaces 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should list only prod deps of workspaces 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces +-- a@1.0.0 -> ./a | +-- c@1.0.0 @@ -533,7 +533,7 @@ workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspac ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should list workspaces properly with default configs 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should list workspaces properly with default configs 1`] = ` [0mworkspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces[0m [0m+-- [32ma@1.0.0[39m -> ./a[0m [0m| +-- baz@1.0.0[0m @@ -547,13 +547,13 @@ exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should lis [0m[0m ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should not list workspaces with --no-workspaces 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should not list workspaces with --no-workspaces 1`] = ` [0mworkspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces[0m [0m\`-- (empty)[0m [0m[0m ` -exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should print all tree and filter by dep within only the ws subtree 1`] = ` +exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces > should print all tree and filter by dep within only the ws subtree 1`] = ` workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces \`-- d@1.0.0 -> ./d \`-- foo@1.1.1 @@ -561,7 +561,7 @@ workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspac ` -exports[`test/lib/ls.js TAP ls missing package.json > should output tree missing name/version of top-level package 1`] = ` +exports[`test/lib/commands/ls.js TAP ls missing package.json > should output tree missing name/version of top-level package 1`] = ` {CWD}/tap-testdir-ls-ls-missing-package.json +-- chai@1.0.0 extraneous +-- dog@1.0.0 extraneous @@ -570,7 +570,7 @@ exports[`test/lib/ls.js TAP ls missing package.json > should output tree missing ` -exports[`test/lib/ls.js TAP ls missing/invalid/extraneous > should output tree containing missing, invalid, extraneous labels 1`] = ` +exports[`test/lib/commands/ls.js TAP ls missing/invalid/extraneous > should output tree containing missing, invalid, extraneous labels 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous +-- chai@1.0.0 extraneous +-- foo@1.0.0 invalid: "^2.0.0" from the root project @@ -579,7 +579,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-missing-invalid-extraneous ` -exports[`test/lib/ls.js TAP ls no args > should output tree representation of dependencies structure 1`] = ` +exports[`test/lib/commands/ls.js TAP ls no args > should output tree representation of dependencies structure 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-no-args +-- chai@1.0.0 \`-- foo@1.0.0 @@ -587,7 +587,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-no-args ` -exports[`test/lib/ls.js TAP ls print deduped symlinks > should output tree containing linked deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls print deduped symlinks > should output tree containing linked deps 1`] = ` print-deduped-symlinks@1.0.0 {CWD}/tap-testdir-ls-ls-print-deduped-symlinks +-- a@1.0.0 | \`-- b@1.0.0 deduped -> ./b @@ -595,13 +595,13 @@ print-deduped-symlinks@1.0.0 {CWD}/tap-testdir-ls-ls-print-deduped-symlinks ` -exports[`test/lib/ls.js TAP ls resolved points to git ref > should output tree containing git refs 1`] = ` +exports[`test/lib/commands/ls.js TAP ls resolved points to git ref > should output tree containing git refs 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-resolved-points-to-git-ref \`-- abbrev@1.1.1 (git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c) ` -exports[`test/lib/ls.js TAP ls unmet optional dep > should output tree with empty entry for missing optional deps 1`] = ` +exports[`test/lib/commands/ls.js TAP ls unmet optional dep > should output tree with empty entry for missing optional deps 1`] = ` [0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-unmet-optional-dep[0m [0m+-- chai@1.0.0[0m [0m+-- dev-dep@1.0.0[0m @@ -615,19 +615,19 @@ exports[`test/lib/ls.js TAP ls unmet optional dep > should output tree with empt [0m[0m ` -exports[`test/lib/ls.js TAP ls unmet peer dep > should output tree signaling missing peer dep in problems 1`] = ` +exports[`test/lib/commands/ls.js TAP ls unmet peer dep > should output tree signaling missing peer dep in problems 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-unmet-peer-dep \`-- UNMET DEPENDENCY peer-dep@* ` -exports[`test/lib/ls.js TAP ls using aliases > should output tree containing aliases 1`] = ` +exports[`test/lib/commands/ls.js TAP ls using aliases > should output tree containing aliases 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-using-aliases \`-- a@npm:b@1.0.0 ` -exports[`test/lib/ls.js TAP ls with args and dedupe entries > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with args and dedupe entries > should print tree output containing deduped ref 1`] = ` [0mdedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-args-and-dedupe-entries[0m [0m+-- @npmcli/a@1.0.0[0m [0m| \`-- [33m[40m@npmcli/b@1.1.2[49m[39m [90mdeduped[39m[0m @@ -637,7 +637,7 @@ exports[`test/lib/ls.js TAP ls with args and dedupe entries > should print tree [0m[0m ` -exports[`test/lib/ls.js TAP ls with args and different order of items > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with args and different order of items > should print tree output containing deduped ref 1`] = ` dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-args-and-different-order-of-items +-- @npmcli/a@1.0.0 | \`-- @npmcli/c@1.0.0 deduped @@ -647,32 +647,32 @@ dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-args-and-different-order-of-it ` -exports[`test/lib/ls.js TAP ls with dot filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with dot filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-dot-filter-arg \`-- (empty) ` -exports[`test/lib/ls.js TAP ls with filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = ` [0mtest-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-filter-arg[0m [0m\`-- [33m[40mchai@1.0.0[49m[39m[0m [0m[0m ` -exports[`test/lib/ls.js TAP ls with filter arg nested dep > should output tree contaning only occurrences of filtered package and its ancestors 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with filter arg nested dep > should output tree contaning only occurrences of filtered package and its ancestors 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-filter-arg-nested-dep \`-- foo@1.0.0 \`-- dog@1.0.0 ` -exports[`test/lib/ls.js TAP ls with missing filter arg > should output tree containing no dependencies info 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with missing filter arg > should output tree containing no dependencies info 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-missing-filter-arg \`-- (empty) ` -exports[`test/lib/ls.js TAP ls with multiple filter args > should output tree contaning only occurrences of multiple filtered packages and their ancestors 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with multiple filter args > should output tree contaning only occurrences of multiple filtered packages and their ancestors 1`] = ` test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-multiple-filter-args +-- chai@1.0.0 \`-- foo@1.0.0 @@ -680,7 +680,7 @@ test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls-with-multiple-filter-args ` -exports[`test/lib/ls.js TAP ls with no args dedupe entries > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with no args dedupe entries > should print tree output containing deduped ref 1`] = ` dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-no-args-dedupe-entries +-- @npmcli/a@1.0.0 | \`-- @npmcli/b@1.1.2 deduped @@ -690,7 +690,7 @@ dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-no-args-dedupe-entries ` -exports[`test/lib/ls.js TAP ls with no args dedupe entries and not displaying all > should print tree output containing deduped ref 1`] = ` +exports[`test/lib/commands/ls.js TAP ls with no args dedupe entries and not displaying all > should print tree output containing deduped ref 1`] = ` dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-no-args-dedupe-entries-and-not-displaying-all +-- @npmcli/a@1.0.0 +-- @npmcli/b@1.1.2 @@ -698,7 +698,7 @@ dedupe-entries@1.0.0 {CWD}/tap-testdir-ls-ls-with-no-args-dedupe-entries-and-not ` -exports[`test/lib/ls.js TAP show multiple invalid reasons > ls result 1`] = ` +exports[`test/lib/commands/ls.js TAP show multiple invalid reasons > ls result 1`] = ` test-npm-ls@1.0.0 {cwd}/tap-testdir-ls-show-multiple-invalid-reasons +-- cat@1.0.0 invalid: "^2.0.0" from the root project | \`-- dog@1.0.0 deduped invalid: "^1.2.3" from the root project, "^2.0.0" from node_modules/cat diff --git a/tap-snapshots/test/lib/outdated.js.test.cjs b/tap-snapshots/test/lib/commands/outdated.js.test.cjs index 15e815031..c286ad734 100644 --- a/tap-snapshots/test/lib/outdated.js.test.cjs +++ b/tap-snapshots/test/lib/commands/outdated.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/outdated.js TAP should display outdated deps outdated --all > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --all > must match snapshot 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps @@ -14,7 +14,7 @@ dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-should theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --json --long > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --json --long > must match snapshot 1`] = ` { "cat": { @@ -22,7 +22,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json - "wanted": "1.0.1", "latest": "1.0.1", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat", + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat", "type": "dependencies" }, "chai": { @@ -30,7 +30,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json - "wanted": "1.0.1", "latest": "1.0.1", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai", + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai", "type": "peerDependencies" }, "dog": { @@ -38,7 +38,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json - "wanted": "1.0.1", "latest": "2.0.0", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog", + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog", "type": "dependencies" }, "theta": { @@ -50,7 +50,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json - } ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --json > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --json > must match snapshot 1`] = ` { "cat": { @@ -58,21 +58,21 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json > "wanted": "1.0.1", "latest": "1.0.1", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat" }, "chai": { "current": "1.0.0", "wanted": "1.0.1", "latest": "1.0.1", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai" }, "dog": { "current": "1.0.1", "wanted": "1.0.1", "latest": "2.0.0", "dependent": "tap-testdir-outdated-should-display-outdated-deps", - "location": "{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog" }, "theta": { "wanted": "1.0.1", @@ -82,7 +82,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --json > } ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --long > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --long > must match snapshot 1`] = ` Package Current Wanted Latest Location Depended by Package Type Homepage cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps dependencies @@ -91,7 +91,7 @@ dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-should theta MISSING 1.0.1 1.0.1 - tap-testdir-outdated-should-display-outdated-deps dependencies ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=dev --omit=peer > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=dev --omit=peer > must match snapshot 1`] = ` [4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m [31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps @@ -99,7 +99,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=d [31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=dev > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=dev > must match snapshot 1`] = ` [4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m [31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps @@ -108,7 +108,7 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=d [31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=prod > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=prod > must match snapshot 1`] = ` [4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m [31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps @@ -116,23 +116,23 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated --omit=p [33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable --long > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --parseable --long > must match snapshot 1`] = ` -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies: -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps:peerDependencies: -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps:dependencies: +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies: +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps:peerDependencies: +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps:dependencies: :theta@1.0.1:MISSING:theta@1.0.1:tap-testdir-outdated-should-display-outdated-deps:dependencies: ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --parseable > must match snapshot 1`] = ` -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps -{CWD}/test/lib/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:tap-testdir-outdated-should-display-outdated-deps +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:tap-testdir-outdated-should-display-outdated-deps +{CWD}/test/lib/commands/tap-testdir-outdated-should-display-outdated-deps/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-should-display-outdated-deps :theta@1.0.1:MISSING:theta@1.0.1:tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated > must match snapshot 1`] = ` [4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m [31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat tap-testdir-outdated-should-display-outdated-deps @@ -141,19 +141,19 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated > must m [31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated global > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated global > must match snapshot 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat global ` -exports[`test/lib/outdated.js TAP should display outdated deps outdated specific dep > must match snapshot 1`] = ` +exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated specific dep > must match snapshot 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps ` -exports[`test/lib/outdated.js TAP workspaces > should display all dependencies 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display all dependencies 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat a@1.0.0 @@ -162,7 +162,7 @@ dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-worksp theta MISSING 1.0.1 1.0.1 - c@1.0.0 ` -exports[`test/lib/outdated.js TAP workspaces > should display json results filtered by ws 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display json results filtered by ws 1`] = ` { "cat": { @@ -170,44 +170,44 @@ exports[`test/lib/outdated.js TAP workspaces > should display json results filte "wanted": "1.0.1", "latest": "1.0.1", "dependent": "a", - "location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/cat" } } ` -exports[`test/lib/outdated.js TAP workspaces > should display missing deps when filtering by ws 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display missing deps when filtering by ws 1`] = ` Package Current Wanted Latest Location Depended by theta MISSING 1.0.1 1.0.1 - c@1.0.0 ` -exports[`test/lib/outdated.js TAP workspaces > should display nested deps when filtering by ws and using --all 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display nested deps when filtering by ws and using --all 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat a@1.0.0 chai 1.0.0 1.0.1 1.0.1 node_modules/chai foo ` -exports[`test/lib/outdated.js TAP workspaces > should display no results if ws has no deps to display 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display no results if ws has no deps to display 1`] = ` ` -exports[`test/lib/outdated.js TAP workspaces > should display only root outdated when ws disabled 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display only root outdated when ws disabled 1`] = ` ` -exports[`test/lib/outdated.js TAP workspaces > should display parseable results filtered by ws 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display parseable results filtered by ws 1`] = ` -{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a +{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a ` -exports[`test/lib/outdated.js TAP workspaces > should display results filtered by ws 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display results filtered by ws 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat a@1.0.0 ` -exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps human output 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display ws outdated deps human output 1`] = ` Package Current Wanted Latest Location Depended by cat 1.0.0 1.0.1 1.0.1 node_modules/cat a@1.0.0 @@ -215,7 +215,7 @@ dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-workspa theta MISSING 1.0.1 1.0.1 - c@1.0.0 ` -exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps json output 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display ws outdated deps json output 1`] = ` { "cat": { @@ -223,14 +223,14 @@ exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps j "wanted": "1.0.1", "latest": "1.0.1", "dependent": "a", - "location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/cat" }, "dog": { "current": "1.0.1", "wanted": "1.0.1", "latest": "2.0.0", "dependent": "tap-testdir-outdated-workspaces", - "location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/dog" + "location": "{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/dog" }, "theta": { "wanted": "1.0.1", @@ -240,14 +240,14 @@ exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps j } ` -exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps parseable output 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should display ws outdated deps parseable output 1`] = ` -{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a -{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-workspaces +{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a +{CWD}/test/lib/commands/tap-testdir-outdated-workspaces/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:tap-testdir-outdated-workspaces :theta@1.0.1:MISSING:theta@1.0.1:c ` -exports[`test/lib/outdated.js TAP workspaces > should highlight ws in dependend by section 1`] = ` +exports[`test/lib/commands/outdated.js TAP workspaces > should highlight ws in dependend by section 1`] = ` [4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m [31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat [32ma@1.0.0[39m diff --git a/tap-snapshots/test/lib/owner.js.test.cjs b/tap-snapshots/test/lib/commands/owner.js.test.cjs index 2d92b0ae5..f3d7335e4 100644 --- a/tap-snapshots/test/lib/owner.js.test.cjs +++ b/tap-snapshots/test/lib/commands/owner.js.test.cjs @@ -5,14 +5,14 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/owner.js TAP owner ls <pkg> > should output owners of <pkg> 1`] = ` +exports[`test/lib/commands/owner.js TAP owner ls <pkg> > should output owners of <pkg> 1`] = ` nlf <quitlahok@gmail.com> ruyadorno <ruyadorno@hotmail.com> darcyclarke <darcy@darcyclarke.me> isaacs <i@izs.me> ` -exports[`test/lib/owner.js TAP owner ls no args > should output owners of cwd package 1`] = ` +exports[`test/lib/commands/owner.js TAP owner ls no args > should output owners of cwd package 1`] = ` nlf <quitlahok@gmail.com> ruyadorno <ruyadorno@hotmail.com> darcyclarke <darcy@darcyclarke.me> diff --git a/tap-snapshots/test/lib/profile.js.test.cjs b/tap-snapshots/test/lib/commands/profile.js.test.cjs index 589755151..31205b7fe 100644 --- a/tap-snapshots/test/lib/profile.js.test.cjs +++ b/tap-snapshots/test/lib/commands/profile.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/profile.js TAP enable-2fa from token and set otp, retries on pending and verifies with qrcode > should output 2fa enablement success msgs 1`] = ` +exports[`test/lib/commands/profile.js TAP enable-2fa from token and set otp, retries on pending and verifies with qrcode > should output 2fa enablement success msgs 1`] = ` Scan into your authenticator app: qrcode Or enter code: @@ -16,23 +16,23 @@ You will need these to recover access to your account if you lose your authentic 789101 ` -exports[`test/lib/profile.js TAP profile get <key> --parseable > should output parseable result value 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get <key> --parseable > should output parseable result value 1`] = ` foo ` -exports[`test/lib/profile.js TAP profile get multiple args --parseable > should output parseable profile value results 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get multiple args --parseable > should output parseable profile value results 1`] = ` foo foo@github.com (verified) https://github.com/npm ` -exports[`test/lib/profile.js TAP profile get multiple args comma separated > should output all keys 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get multiple args comma separated > should output all keys 1`] = ` foo foo@github.com (verified) https://github.com/npm ` -exports[`test/lib/profile.js TAP profile get multiple args default output > should output all keys 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get multiple args default output > should output all keys 1`] = ` foo foo@github.com (verified) https://github.com/npm ` -exports[`test/lib/profile.js TAP profile get no args --parseable > should output all profile info as parseable result 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get no args --parseable > should output all profile info as parseable result 1`] = ` tfa auth-and-writes name foo email foo@github.com @@ -46,7 +46,7 @@ twitter https://twitter.com/npmjs github https://github.com/npm ` -exports[`test/lib/profile.js TAP profile get no args default output > should output table with contents 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get no args default output > should output table with contents 1`] = ` name: foo email: foo@github.com (verified) two-factor auth: auth-and-writes @@ -59,7 +59,7 @@ created: 2015-02-26T01:26:37.384Z updated: 2020-08-12T16:19:35.326Z ` -exports[`test/lib/profile.js TAP profile get no args no tfa enabled > should output expected profile values 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get no args no tfa enabled > should output expected profile values 1`] = ` name: foo email: foo@github.com (verified) two-factor auth: disabled @@ -72,7 +72,7 @@ created: 2015-02-26T01:26:37.384Z updated: 2020-08-12T16:19:35.326Z ` -exports[`test/lib/profile.js TAP profile get no args profile has cidr_whitelist item > should output table with contents 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get no args profile has cidr_whitelist item > should output table with contents 1`] = ` name: foo email: foo@github.com (verified) two-factor auth: auth-and-writes @@ -86,7 +86,7 @@ updated: 2020-08-12T16:19:35.326Z cidr_whitelist: 192.168.1.1 ` -exports[`test/lib/profile.js TAP profile get no args unverified email > should output table with contents 1`] = ` +exports[`test/lib/commands/profile.js TAP profile get no args unverified email > should output table with contents 1`] = ` name: foo email: foo@github.com(unverified) two-factor auth: auth-and-writes @@ -99,6 +99,6 @@ created: 2015-02-26T01:26:37.384Z updated: 2020-08-12T16:19:35.326Z ` -exports[`test/lib/profile.js TAP profile set <key> <value> writable key --parseable > should output parseable set key success msg 1`] = ` +exports[`test/lib/commands/profile.js TAP profile set <key> <value> writable key --parseable > should output parseable set key success msg 1`] = ` fullname Lorem Ipsum ` diff --git a/tap-snapshots/test/lib/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index 38457821a..0d0fa366b 100644 --- a/tap-snapshots/test/lib/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -5,13 +5,13 @@ * 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`] = ` +exports[`test/lib/commands/publish.js TAP private workspaces colorless > should output all publishes 1`] = ` Array [ "+ @npmcli/b@1.0.0", ] ` -exports[`test/lib/publish.js TAP private workspaces colorless > should publish all non-private workspaces 1`] = ` +exports[`test/lib/commands/publish.js TAP private workspaces colorless > should publish all non-private workspaces 1`] = ` Array [ Object { "_id": "@npmcli/b@1.0.0", @@ -22,13 +22,13 @@ Array [ ] ` -exports[`test/lib/publish.js TAP private workspaces with color > should output all publishes 1`] = ` +exports[`test/lib/commands/publish.js TAP private workspaces with color > should output all publishes 1`] = ` Array [ "+ @npmcli/b@1.0.0", ] ` -exports[`test/lib/publish.js TAP private workspaces with color > should publish all non-private workspaces 1`] = ` +exports[`test/lib/commands/publish.js TAP private workspaces with color > should publish all non-private workspaces 1`] = ` Array [ Object { "_id": "@npmcli/b@1.0.0", @@ -39,7 +39,7 @@ Array [ ] ` -exports[`test/lib/publish.js TAP shows usage with wrong set of arguments > should print usage 1`] = ` +exports[`test/lib/commands/publish.js TAP shows usage with wrong set of arguments > should print usage 1`] = ` Error: Usage: npm publish @@ -58,7 +58,7 @@ Run "npm help publish" for more info { } ` -exports[`test/lib/publish.js TAP workspaces all workspaces > should output all publishes 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces all workspaces > should output all publishes 1`] = ` Array [ "+ workspace-a@1.2.3-a", "+ workspace-b@1.2.3-n", @@ -66,7 +66,7 @@ Array [ ] ` -exports[`test/lib/publish.js TAP workspaces all workspaces > should publish all workspaces 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces all workspaces > should publish all workspaces 1`] = ` Array [ Object { "_id": "workspace-a@1.2.3-a", @@ -101,7 +101,7 @@ Array [ ] ` -exports[`test/lib/publish.js TAP workspaces json > should output all publishes as json 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces json > should output all publishes as json 1`] = ` Array [ String( { @@ -119,7 +119,7 @@ Array [ ] ` -exports[`test/lib/publish.js TAP workspaces json > should publish all workspaces 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces json > should publish all workspaces 1`] = ` Array [ Object { "_id": "workspace-a@1.2.3-a", @@ -154,13 +154,13 @@ Array [ ] ` -exports[`test/lib/publish.js TAP workspaces one workspace > should output one publish 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces one workspace > should output one publish 1`] = ` Array [ "+ workspace-a@1.2.3-a", ] ` -exports[`test/lib/publish.js TAP workspaces one workspace > should publish given workspace 1`] = ` +exports[`test/lib/commands/publish.js TAP workspaces one workspace > should publish given workspace 1`] = ` Array [ Object { "_id": "workspace-a@1.2.3-a", diff --git a/tap-snapshots/test/lib/search.js.test.cjs b/tap-snapshots/test/lib/commands/search.js.test.cjs index 4b4dc75ea..139fca259 100644 --- a/tap-snapshots/test/lib/search.js.test.cjs +++ b/tap-snapshots/test/lib/commands/search.js.test.cjs @@ -5,16 +5,16 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/search.js TAP empty search results > should have expected search results 1`] = ` +exports[`test/lib/commands/search.js TAP empty search results > should have expected search results 1`] = ` No matches found for "foo" ` -exports[`test/lib/search.js TAP search <name> --searchexclude --searchopts > should have filtered expected search results 1`] = ` +exports[`test/lib/commands/search.js TAP search <name> --searchexclude --searchopts > should have filtered expected search results 1`] = ` NAME | AUTHOR | DATE | VERSION | KEYWORDS foo | =foo | prehistoric | 1.0.0 | ` -exports[`test/lib/search.js TAP search <name> > should have expected search results 1`] = ` +exports[`test/lib/commands/search.js TAP search <name> > should have expected search results 1`] = ` NAME | AUTHOR | DATE | VERSION | KEYWORDS libnpm | =nlf… | 2019-07-16 | 3.0.1 | npm api package manager liblibnpmaccess | =nlf… | 2020-11-03 | 4.0.1 | @evocateur/libnpmaccess | =evocateur | 2019-07-16 | 3.1.2 | @evocateur/libnpmpublish | =evocateur | 2019-07-16 | 1.2.2 | libnpmorg | =nlf… | 2020-11-03 | 2.0.1 | libnpm npm package manager api orgs teamslibnpmsearch | =nlf… | 2020-12-08 | 3.1.0 | npm search api libnpmlibnpmteam | =nlf… | 2020-11-03 | 2.0.2 | libnpmhook | =nlf… | 2020-11-03 | 6.0.1 | npm hooks registry npm apilibnpmpublish | =nlf… | 2020-11-03 | 4.0.0 | libnpmfund | =nlf… | 2020-12-08 | 1.0.2 | npm npmcli libnpm cli git fund gitfund@npmcli/map-workspaces | =nlf… | 2020-09-30 | 1.0.1 | npm npmcli libnpm cli workspaces map-workspaceslibnpmversion | =nlf… | 2020-11-04 | 1.0.7 | @types/libnpmsearch | =types | 2019-09-26 | 2.0.1 | ` diff --git a/tap-snapshots/test/lib/stars.js.test.cjs b/tap-snapshots/test/lib/commands/stars.js.test.cjs index ac628148f..fbf074f71 100644 --- a/tap-snapshots/test/lib/stars.js.test.cjs +++ b/tap-snapshots/test/lib/commands/stars.js.test.cjs @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/stars.js TAP no args > should output a list of starred packages 1`] = ` +exports[`test/lib/commands/stars.js TAP no args > should output a list of starred packages 1`] = ` @npmcli/arborist @npmcli/map-workspaces diff --git a/tap-snapshots/test/lib/commands/team.js.test.cjs b/tap-snapshots/test/lib/commands/team.js.test.cjs new file mode 100644 index 000000000..6a93234f5 --- /dev/null +++ b/tap-snapshots/test/lib/commands/team.js.test.cjs @@ -0,0 +1,85 @@ +/* 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/commands/team.js TAP team add <scope:team> <user> --parseable > should output success result for parseable add user 1`] = ` +foo npmcli:developers added +` + +exports[`test/lib/commands/team.js TAP team add <scope:team> <user> default output > should output success result for add user 1`] = ` +foo added to @npmcli:developers +` + +exports[`test/lib/commands/team.js TAP team create <scope:team> --parseable > should output parseable success result for create team 1`] = ` +npmcli:newteam created +` + +exports[`test/lib/commands/team.js TAP team create <scope:team> default output > should output success result for create team 1`] = ` ++@npmcli:newteam +` + +exports[`test/lib/commands/team.js TAP team destroy <scope:team> --parseable > should output parseable result for destroy team 1`] = ` +npmcli:newteam deleted +` + +exports[`test/lib/commands/team.js TAP team destroy <scope:team> default output > should output success result for destroy team 1`] = ` +-@npmcli:newteam +` + +exports[`test/lib/commands/team.js TAP team ls <scope:team> --parseable > should list users for a parseable scope:team 1`] = ` +darcyclarke +isaacs +nlf +ruyadorno +` + +exports[`test/lib/commands/team.js TAP team ls <scope:team> default output > should list users for a given scope:team 1`] = ` + +@npmcli:developers has 4 users: +darcyclarke isaacs nlf ruyadorno +` + +exports[`test/lib/commands/team.js TAP team ls <scope:team> no users > should list no users for a given scope 1`] = ` + +@npmcli:developers has 0 users +` + +exports[`test/lib/commands/team.js TAP team ls <scope:team> single user > should list single user for a given scope 1`] = ` + +@npmcli:developers has 1 user: +foo +` + +exports[`test/lib/commands/team.js TAP team ls <scope> --parseable > should list teams for a parseable scope 1`] = ` +npmcli:designers +npmcli:developers +npmcli:product +` + +exports[`test/lib/commands/team.js TAP team ls <scope> default output > should list teams for a given scope 1`] = ` + +@npmcli has 3 teams: +@npmcli:designers @npmcli:developers @npmcli:product +` + +exports[`test/lib/commands/team.js TAP team ls <scope> no teams > should list no teams for a given scope 1`] = ` + +@npmcli has 0 teams +` + +exports[`test/lib/commands/team.js TAP team ls <scope> single team > should list single team for a given scope 1`] = ` + +@npmcli has 1 team: +@npmcli:developers +` + +exports[`test/lib/commands/team.js TAP team rm <scope:team> <user> --parseable > should output parseable result for remove user 1`] = ` +foo npmcli:newteam removed +` + +exports[`test/lib/commands/team.js TAP team rm <scope:team> <user> default output > should output success result for remove user 1`] = ` +foo removed from @npmcli:newteam +` diff --git a/tap-snapshots/test/lib/unpublish.js.test.cjs b/tap-snapshots/test/lib/commands/unpublish.js.test.cjs index 5936bec6c..d84f26f29 100644 --- a/tap-snapshots/test/lib/unpublish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/unpublish.js.test.cjs @@ -5,10 +5,10 @@ * 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`] = ` +exports[`test/lib/commands/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`] = ` +exports[`test/lib/commands/unpublish.js TAP workspaces one workspace --force > should output one workspaces 1`] = ` - workspace-a ` diff --git a/tap-snapshots/test/lib/view.js.test.cjs b/tap-snapshots/test/lib/commands/view.js.test.cjs index 9ed833413..10d38cb3f 100644 --- a/tap-snapshots/test/lib/view.js.test.cjs +++ b/tap-snapshots/test/lib/commands/view.js.test.cjs @@ -5,18 +5,18 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/view.js TAP should log info by field name array field - 1 element > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name array field - 1 element > must match snapshot 1`] = ` claudia ` -exports[`test/lib/view.js TAP should log info by field name array field - 2 elements > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name array field - 2 elements > must match snapshot 1`] = ` maintainers[0].name = 'claudia' maintainers[1].name = 'isaacs' ` -exports[`test/lib/view.js TAP should log info by field name maintainers with email > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name maintainers with email > must match snapshot 1`] = ` { "maintainers": [ @@ -35,7 +35,7 @@ exports[`test/lib/view.js TAP should log info by field name maintainers with ema } ` -exports[`test/lib/view.js TAP should log info by field name maintainers with url > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name maintainers with url > must match snapshot 1`] = ` [ "claudia (http://c.pink.com)", @@ -43,17 +43,17 @@ exports[`test/lib/view.js TAP should log info by field name maintainers with url ] ` -exports[`test/lib/view.js TAP should log info by field name nested field with brackets > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name nested field with brackets > must match snapshot 1`] = ` "123" ` -exports[`test/lib/view.js TAP should log info by field name readme > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name readme > must match snapshot 1`] = ` a very useful readme ` -exports[`test/lib/view.js TAP should log info by field name several fields > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name several fields > must match snapshot 1`] = ` { "name": "yellow", @@ -61,14 +61,14 @@ exports[`test/lib/view.js TAP should log info by field name several fields > mus } ` -exports[`test/lib/view.js TAP should log info by field name several fields with several versions > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info by field name several fields with several versions > must match snapshot 1`] = ` yellow@1.0.0 'claudia' yellow@1.0.1 'claudia' yellow@1.0.2 'claudia' ` -exports[`test/lib/view.js TAP should log info of package in current working dir non-specific version > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info of package in current working dir non-specific version > must match snapshot 1`] = ` [4m[1m[32mblue[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -85,7 +85,7 @@ dist-tags: published [33myesterday[39m ` -exports[`test/lib/view.js TAP should log info of package in current working dir specific version > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log info of package in current working dir specific version > must match snapshot 1`] = ` [4m[1m[32mblue[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -102,7 +102,7 @@ dist-tags: published [33myesterday[39m ` -exports[`test/lib/view.js TAP should log package info package from git > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package from git > must match snapshot 1`] = ` [4m[1m[32mgreen[39m@[32m1.0.0[39m[22m[24m | [32mACME[39m | deps: [36m2[39m | versions: [33m2[39m @@ -132,7 +132,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP should log package info package with --json and semver range > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with --json and semver range > must match snapshot 1`] = ` [ { @@ -168,7 +168,7 @@ exports[`test/lib/view.js TAP should log package info package with --json and se ] ` -exports[`test/lib/view.js TAP should log package info package with homepage > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with homepage > must match snapshot 1`] = ` [4m[1m[32morange[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -184,7 +184,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP should log package info package with license, bugs, repository and other fields > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with license, bugs, repository and other fields > must match snapshot 1`] = ` [4m[1m[32mgreen[39m@[32m1.0.0[39m[22m[24m | [32mACME[39m | deps: [36m2[39m | versions: [33m2[39m @@ -214,7 +214,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP should log package info package with maintainers info as object > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with maintainers info as object > must match snapshot 1`] = ` [4m[1m[32mpink[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -229,7 +229,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP should log package info package with more than 25 deps > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with more than 25 deps > must match snapshot 1`] = ` [4m[1m[32mblack[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [36m25[39m | versions: [33m2[39m @@ -271,7 +271,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP should log package info package with no modified time > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with no modified time > must match snapshot 1`] = ` [4m[1m[32mcyan[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -288,7 +288,7 @@ dist-tags: published by [33mclaudia[39m <[36mclaudia@cyan.com[39m> ` -exports[`test/lib/view.js TAP should log package info package with no repo or homepage > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with no repo or homepage > must match snapshot 1`] = ` [4m[1m[32mblue[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -305,7 +305,7 @@ dist-tags: published [33myesterday[39m ` -exports[`test/lib/view.js TAP should log package info package with semver range > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP should log package info package with semver range > must match snapshot 1`] = ` [4m[1m[32mblue[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -320,9 +320,22 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 published [33myesterday[39m + +[4m[1m[32mblue[39m@[32m1.0.1[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m + +dist +.tarball:[36mhttp://hm.blue.com/1.0.1.tgz[39m +.shasum:[33m124[39m +.integrity:[33m---[39m +.unpackedSize:[33m1 B[39m + +dist-tags: +[1m[32mlatest[39m[22m: 1.0.0 + +published [33mover a year from now[39m ` -exports[`test/lib/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = ` { "green": { @@ -402,7 +415,7 @@ exports[`test/lib/view.js TAP workspaces all workspaces --json > must match snap } ` -exports[`test/lib/view.js TAP workspaces all workspaces > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces > must match snapshot 1`] = ` [4m[1m[32mgreen[39m@[32m1.0.0[39m[22m[24m | [32mACME[39m | deps: [36m2[39m | versions: [33m2[39m @@ -444,17 +457,17 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP workspaces all workspaces nonexistent field --json > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces nonexistent field --json > must match snapshot 1`] = ` ` -exports[`test/lib/view.js TAP workspaces all workspaces nonexistent field > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces nonexistent field > must match snapshot 1`] = ` green: orange: ` -exports[`test/lib/view.js TAP workspaces all workspaces single field --json > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces single field --json > must match snapshot 1`] = ` { "green": "green", @@ -462,7 +475,7 @@ exports[`test/lib/view.js TAP workspaces all workspaces single field --json > mu } ` -exports[`test/lib/view.js TAP workspaces all workspaces single field > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces all workspaces single field > must match snapshot 1`] = ` green: green @@ -470,7 +483,7 @@ orange: orange ` -exports[`test/lib/view.js TAP workspaces one specific workspace > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces one specific workspace > must match snapshot 1`] = ` [4m[1m[32mgreen[39m@[32m1.0.0[39m[22m[24m | [32mACME[39m | deps: [36m2[39m | versions: [33m2[39m @@ -500,11 +513,11 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP workspaces remote package name > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces remote package name > must match snapshot 1`] = ` Ignoring workspaces for specified package(s) ` -exports[`test/lib/view.js TAP workspaces remote package name > must match snapshot 2`] = ` +exports[`test/lib/commands/view.js TAP workspaces remote package name > must match snapshot 2`] = ` [4m[1m[32mpink[39m@[32m1.0.0[39m[22m[24m | [1m[31mProprietary[39m[22m | deps: [32mnone[39m | versions: [33m2[39m @@ -519,7 +532,7 @@ dist-tags: [1m[32mlatest[39m[22m: 1.0.0 ` -exports[`test/lib/view.js TAP workspaces single workspace --json > must match snapshot 1`] = ` +exports[`test/lib/commands/view.js TAP workspaces single workspace --json > must match snapshot 1`] = ` { "green": { diff --git a/tap-snapshots/test/lib/link.js.test.cjs b/tap-snapshots/test/lib/link.js.test.cjs deleted file mode 100644 index 0e20bcd99..000000000 --- a/tap-snapshots/test/lib/link.js.test.cjs +++ /dev/null @@ -1,45 +0,0 @@ -/* 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/link.js TAP link global linked pkg to local nm when using args > should create a local symlink to global pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/bar -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/@myscope/bar -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/scoped-linked -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/a -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/a -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/link-me-too -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/link-me-too -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/test-pkg-link -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-nm-when-using-args/test-pkg-link - -` - -exports[`test/lib/link.js TAP link global linked pkg to local workspace using args > should create a local symlink to global pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/@myscope/bar -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/global-prefix/lib/node_modules/@myscope/bar -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/scoped-linked -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/a -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/global-prefix/lib/node_modules/a -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/link-me-too -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/link-me-too -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/test-pkg-link -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/test-pkg-link -{CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/node_modules/x -> {CWD}/test/lib/tap-testdir-link-link-global-linked-pkg-to-local-workspace-using-args/my-project/packages/x - -` - -exports[`test/lib/link.js TAP link pkg already in global space > should create a local symlink to global pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-pkg-already-in-global-space/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/tap-testdir-link-link-pkg-already-in-global-space/scoped-linked - -` - -exports[`test/lib/link.js TAP link pkg already in global space when prefix is a symlink > should create a local symlink to global pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-pkg-already-in-global-space-when-prefix-is-a-symlink/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/tap-testdir-link-link-pkg-already-in-global-space-when-prefix-is-a-symlink/scoped-linked - -` - -exports[`test/lib/link.js TAP link to globalDir when in current working dir of pkg and no args > should create a global link to current pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/global-prefix/lib/node_modules/test-pkg-link -> {CWD}/test/lib/tap-testdir-link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/test-pkg-link - -` - -exports[`test/lib/link.js TAP link ws to globalDir when workspace specified and no args > should create a global link to current pkg 1`] = ` -{CWD}/test/lib/tap-testdir-link-link-ws-to-globalDir-when-workspace-specified-and-no-args/global-prefix/lib/node_modules/a -> {CWD}/test/lib/tap-testdir-link-link-ws-to-globalDir-when-workspace-specified-and-no-args/test-pkg-link/packages/a - -` diff --git a/tap-snapshots/test/lib/team.js.test.cjs b/tap-snapshots/test/lib/team.js.test.cjs deleted file mode 100644 index 73123ee1a..000000000 --- a/tap-snapshots/test/lib/team.js.test.cjs +++ /dev/null @@ -1,85 +0,0 @@ -/* 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/team.js TAP team add <scope:team> <user> --parseable > should output success result for parseable add user 1`] = ` -foo npmcli:developers added -` - -exports[`test/lib/team.js TAP team add <scope:team> <user> default output > should output success result for add user 1`] = ` -foo added to @npmcli:developers -` - -exports[`test/lib/team.js TAP team create <scope:team> --parseable > should output parseable success result for create team 1`] = ` -npmcli:newteam created -` - -exports[`test/lib/team.js TAP team create <scope:team> default output > should output success result for create team 1`] = ` -+@npmcli:newteam -` - -exports[`test/lib/team.js TAP team destroy <scope:team> --parseable > should output parseable result for destroy team 1`] = ` -npmcli:newteam deleted -` - -exports[`test/lib/team.js TAP team destroy <scope:team> default output > should output success result for destroy team 1`] = ` --@npmcli:newteam -` - -exports[`test/lib/team.js TAP team ls <scope:team> --parseable > should list users for a parseable scope:team 1`] = ` -darcyclarke -isaacs -nlf -ruyadorno -` - -exports[`test/lib/team.js TAP team ls <scope:team> default output > should list users for a given scope:team 1`] = ` - -@npmcli:developers has 4 users: -darcyclarke isaacs nlf ruyadorno -` - -exports[`test/lib/team.js TAP team ls <scope:team> no users > should list no users for a given scope 1`] = ` - -@npmcli:developers has 0 users -` - -exports[`test/lib/team.js TAP team ls <scope:team> single user > should list single user for a given scope 1`] = ` - -@npmcli:developers has 1 user: -foo -` - -exports[`test/lib/team.js TAP team ls <scope> --parseable > should list teams for a parseable scope 1`] = ` -npmcli:designers -npmcli:developers -npmcli:product -` - -exports[`test/lib/team.js TAP team ls <scope> default output > should list teams for a given scope 1`] = ` - -@npmcli has 3 teams: -@npmcli:designers @npmcli:developers @npmcli:product -` - -exports[`test/lib/team.js TAP team ls <scope> no teams > should list no teams for a given scope 1`] = ` - -@npmcli has 0 teams -` - -exports[`test/lib/team.js TAP team ls <scope> single team > should list single team for a given scope 1`] = ` - -@npmcli has 1 team: -@npmcli:developers -` - -exports[`test/lib/team.js TAP team rm <scope:team> <user> --parseable > should output parseable result for remove user 1`] = ` -foo npmcli:newteam removed -` - -exports[`test/lib/team.js TAP team rm <scope:team> <user> default output > should output success result for remove user 1`] = ` -foo removed from @npmcli:newteam -` diff --git a/tap-snapshots/test/lib/utils/error-message.js.test.cjs b/tap-snapshots/test/lib/utils/error-message.js.test.cjs index 79301bfaa..e4efb0eb9 100644 --- a/tap-snapshots/test/lib/utils/error-message.js.test.cjs +++ b/tap-snapshots/test/lib/utils/error-message.js.test.cjs @@ -214,7 +214,7 @@ Object { } ` -exports[`test/lib/utils/error-message.js TAP bad engine with config loaded > must match snapshot 1`] = ` +exports[`test/lib/utils/error-message.js TAP bad engine without config loaded > must match snapshot 1`] = ` Object { "detail": Array [ Array [ @@ -222,7 +222,7 @@ Object { String( Not compatible with your version of node/npm: some@package Required: undefined - Actual: {"npm":"123.69.420-npm","node":"99.99.99"} + Actual: {"npm":"123.456.789-npm","node":"123.456.789-node"} ), ], ], @@ -246,7 +246,7 @@ Object { "notsup", String( Valid OS: !yours,mine - Valid Arch: x420,x69 + Valid Arch: x867,x5309 Actual OS: posix Actual Arch: x64 ), @@ -255,7 +255,7 @@ Object { "summary": Array [ Array [ "notsup", - "Unsupported platform for lodash@1.0.0: wanted {\\"os\\":\\"!yours,mine\\",\\"arch\\":\\"x420,x69\\"} (current: {\\"os\\":\\"posix\\",\\"arch\\":\\"x64\\"})", + "Unsupported platform for lodash@1.0.0: wanted {\\"os\\":\\"!yours,mine\\",\\"arch\\":\\"x867,x5309\\"} (current: {\\"os\\":\\"posix\\",\\"arch\\":\\"x64\\"})", ], ], } @@ -517,7 +517,7 @@ Object { previous versions of npm which has since been addressed. To permanently fix this problem, please run: - sudo chown -R 69:420 "/some/cache/dir" + sudo chown -R 867:5309 "/some/cache/dir" ), ], ], @@ -544,7 +544,7 @@ Object { previous versions of npm which has since been addressed. To permanently fix this problem, please run: - sudo chown -R 69:420 "/some/cache/dir" + sudo chown -R 867:5309 "/some/cache/dir" ), ], ], @@ -571,7 +571,7 @@ Object { previous versions of npm which has since been addressed. To permanently fix this problem, please run: - sudo chown -R 69:420 "/some/cache/dir" + sudo chown -R 867:5309 "/some/cache/dir" ), ], ], @@ -1145,7 +1145,7 @@ Object { String( Not compatible with your version of node/npm: some@package Required: undefined - Actual: {"npm":"123.69.420-npm","node":"123.69.420-node"} + Actual: {"npm":"123.456.789-npm","node":"99.99.99"} ), ], ], |