Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,66 @@
/* 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/cli/exit-handler.js TAP handles unknown error with logs and debug file > debug file contents 1`] = `
XX timing npm:load:whichnode Completed in {TIME}ms
XX silly config load:file:{CWD}/npmrc
XX silly config load:file:{CWD}/prefix/.npmrc
XX silly config load:file:{CWD}/home/.npmrc
XX silly config load:file:{CWD}/global/etc/npmrc
XX timing npm:load:configload Completed in {TIME}ms
XX timing npm:load:mkdirpcache Completed in {TIME}ms
XX timing npm:load:mkdirplogs Completed in {TIME}ms
XX verbose title npm
XX verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--timing" "true"
XX timing npm:load:setTitle Completed in {TIME}ms
XX verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
XX verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
XX timing npm:load Completed in {TIME}ms
XX timing command:root Completed in {TIME}ms
XX verbose stack Error: Unknown error
XX error code ECODE
XX error Unknown error
XX timing npm Completed in {TIME}ms
XX info timing Timing info written to: {CWD}/cache/_logs/{DATE}-timing.json
XX verbose cwd {CWD}/prefix
XX verbose os {OS}
XX verbose {NODE-VERSION}
XX verbose npm {NPM-VERSION}
XX verbose exit 1
XX verbose code 1
XX error A complete log of this run can be found in: {CWD}/cache/_logs/{DATE}-debug-0.log
`
exports[`test/lib/cli/exit-handler.js TAP handles unknown error with logs and debug file > logs 1`] = `
timing npm:load:whichnode Completed in {TIME}ms
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
timing npm:load:configload Completed in {TIME}ms
timing npm:load:mkdirpcache Completed in {TIME}ms
timing npm:load:mkdirplogs Completed in {TIME}ms
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--timing" "true"
timing npm:load:setTitle Completed in {TIME}ms
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
timing npm:load Completed in {TIME}ms
timing command:root Completed in {TIME}ms
verbose stack Error: Unknown error
error code ECODE
error Unknown error
timing npm Completed in {TIME}ms
info timing Timing info written to: {CWD}/cache/_logs/{DATE}-timing.json
verbose cwd {CWD}/prefix
verbose os {OS}
verbose {NODE-VERSION}
verbose npm {NPM-VERSION}
verbose exit 1
verbose code 1
error A complete log of this run can be found in: {CWD}/cache/_logs/{DATE}-debug-0.log
`

View File

@ -0,0 +1,110 @@
/* 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/cli/update-notifier.js TAP notification situation with engine compatibility > must match snapshot 1`] = `
New minor version of npm available! 123.420.70 -> 123.421.60
Changelog: https://github.com/npm/cli/releases/tag/v123.421.60
To update run: npm install -g npm@123.421.60
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 122.420.69 - color=always > must match snapshot 1`] = `
New major version of npm available! 122.420.69 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 122.420.69 - color=false > must match snapshot 1`] = `
New major version of npm available! 122.420.69 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.419.69 - color=always > must match snapshot 1`] = `
New minor version of npm available! 123.419.69 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.419.69 - color=false > must match snapshot 1`] = `
New minor version of npm available! 123.419.69 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.420.68 - color=always > must match snapshot 1`] = `
New patch version of npm available! 123.420.68 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.420.68 - color=false > must match snapshot 1`] = `
New patch version of npm available! 123.420.68 -> 123.420.69
Changelog: https://github.com/npm/cli/releases/tag/v123.420.69
To update run: npm install -g npm@123.420.69
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.420.70 - color=always > must match snapshot 1`] = `
New minor version of npm available! 123.420.70 -> 123.421.70
Changelog: https://github.com/npm/cli/releases/tag/v123.421.70
To update run: npm install -g npm@123.421.70
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.420.70 - color=false > must match snapshot 1`] = `
New minor version of npm available! 123.420.70 -> 123.421.70
Changelog: https://github.com/npm/cli/releases/tag/v123.421.70
To update run: npm install -g npm@123.421.70
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.421.69 - color=always > must match snapshot 1`] = `
New patch version of npm available! 123.421.69 -> 123.421.70
Changelog: https://github.com/npm/cli/releases/tag/v123.421.70
To update run: npm install -g npm@123.421.70
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 123.421.69 - color=false > must match snapshot 1`] = `
New patch version of npm available! 123.421.69 -> 123.421.70
Changelog: https://github.com/npm/cli/releases/tag/v123.421.70
To update run: npm install -g npm@123.421.70
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 124.0.0-beta.0 - color=always > must match snapshot 1`] = `
New prerelease version of npm available! 124.0.0-beta.0 -> 124.0.0-beta.99999
Changelog: https://github.com/npm/cli/releases/tag/v124.0.0-beta.99999
To update run: npm install -g npm@124.0.0-beta.99999
`
exports[`test/lib/cli/update-notifier.js TAP notification situations 124.0.0-beta.0 - color=false > must match snapshot 1`] = `
New prerelease version of npm available! 124.0.0-beta.0 -> 124.0.0-beta.99999
Changelog: https://github.com/npm/cli/releases/tag/v124.0.0-beta.99999
To update run: npm install -g npm@124.0.0-beta.99999
`

View File

@ -0,0 +1,401 @@
/* 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/audit.js TAP audit fix - bulk endpoint > lockfile has test-dep-a@1.0.1 1`] = `
{
"name": "test-dep",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "test-dep",
"version": "1.0.0",
"dependencies": {
"test-dep-a": "*"
}
},
"node_modules/test-dep-a": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/test-dep-a/-/test-dep-a-1.0.1.tgz"
}
},
"dependencies": {
"test-dep-a": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/test-dep-a/-/test-dep-a-1.0.1.tgz"
}
}
}
`
exports[`test/lib/commands/audit.js TAP audit fix - bulk endpoint > must match snapshot 1`] = `
added 1 package, and audited 2 packages in xxx
found 0 vulnerabilities
`
exports[`test/lib/commands/audit.js TAP audit signatures ignores optional dependencies > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures json output with invalid and missing signatures > must match snapshot 1`] = `
{
"invalid": [
{
"code": "EINTEGRITYSIGNATURE",
"message": "kms-demo@1.0.0 has an invalid registry signature with keyid: SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA and signature: bogus",
"integrity": "sha512-QqZ7VJ/8xPkS9s2IWB7Shj3qTJdcRyeXKbPQnsZjsPEwvutGv0EGeVchPcauoiDFJlGbZMFq5GDCurAGNSghJQ==",
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"location": "node_modules/kms-demo",
"name": "kms-demo",
"registry": "https://registry.npmjs.org/",
"resolved": "https://registry.npmjs.org/kms-demo/-/kms-demo-1.0.0.tgz",
"signature": "bogus",
"type": "dependencies",
"version": "1.0.0"
}
],
"missing": [
{
"location": "node_modules/async",
"name": "async",
"registry": "https://registry.npmjs.org/",
"resolved": "https://registry.npmjs.org/async/-/async-1.1.1.tgz",
"version": "1.1.1"
}
]
}
`
exports[`test/lib/commands/audit.js TAP audit signatures json output with invalid attestations > must match snapshot 1`] = `
{
"invalid": [
{
"code": "EATTESTATIONVERIFY",
"message": "sigstore@1.0.0 failed to verify attestation: artifact signature verification failed",
"integrity": "sha512-e+qfbn/zf1+rCza/BhIA//Awmf0v1pa5HQS8Xk8iXrn9bgytytVLqYD0P7NSqZ6IELTgq+tcDvLPkQjNHyWLNg==",
"keyid": "",
"location": "node_modules/sigstore",
"name": "sigstore",
"registry": "https://registry.npmjs.org/",
"resolved": "https://registry.npmjs.org/sigstore/-/sigstore-1.0.0.tgz",
"signature": "MEYCIQD10kAn3lC/1rJvXBtSDckbqkKEmz369gPDKb4lG4zMKQIhAP1+RhbMcASsfXhxpXKNCAjJb+3Av3Br95eKD7VL/BEB",
"predicateType": "https://slsa.dev/provenance/v0.2",
"type": "dependencies",
"version": "1.0.0"
}
],
"missing": []
}
`
exports[`test/lib/commands/audit.js TAP audit signatures json output with invalid signatures > must match snapshot 1`] = `
{
"invalid": [
{
"code": "EINTEGRITYSIGNATURE",
"message": "kms-demo@1.0.0 has an invalid registry signature with keyid: SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA and signature: bogus",
"integrity": "sha512-QqZ7VJ/8xPkS9s2IWB7Shj3qTJdcRyeXKbPQnsZjsPEwvutGv0EGeVchPcauoiDFJlGbZMFq5GDCurAGNSghJQ==",
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"location": "node_modules/kms-demo",
"name": "kms-demo",
"registry": "https://registry.npmjs.org/",
"resolved": "https://registry.npmjs.org/kms-demo/-/kms-demo-1.0.0.tgz",
"signature": "bogus",
"type": "dependencies",
"version": "1.0.0"
}
],
"missing": []
}
`
exports[`test/lib/commands/audit.js TAP audit signatures json output with valid signatures > must match snapshot 1`] = `
{
"invalid": [],
"missing": []
}
`
exports[`test/lib/commands/audit.js TAP audit signatures multiple registries with keys and signatures > must match snapshot 1`] = `
audited 2 packages in xxx
2 packages have verified registry signatures
`
exports[`test/lib/commands/audit.js TAP audit signatures omit dev dependencies with missing signature > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures output details about missing signatures > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a missing registry signature but the registry is providing signing keys:
kms-demo@1.0.0 (https://registry.npmjs.org/)
`
exports[`test/lib/commands/audit.js TAP audit signatures third-party registry with invalid signatures errors > must match snapshot 1`] = `
audited 1 package in xxx
1 package has an invalid registry signature:
@npmcli/arborist@1.0.14 (https://verdaccio-clone.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures third-party registry with keys and missing signatures errors > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a missing registry signature but the registry is providing signing keys:
@npmcli/arborist@1.0.14 (https://verdaccio-clone.org/)
`
exports[`test/lib/commands/audit.js TAP audit signatures third-party registry with keys and signatures > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures third-party registry with sub-path (trailing slash) > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures third-party registry with sub-path > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures with both invalid and missing signatures > must match snapshot 1`] = `
audited 2 packages in xxx
1 package has a missing registry signature but the registry is providing signing keys:
async@1.1.1 (https://registry.npmjs.org/)
1 package has an invalid registry signature:
kms-demo@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with bundled and peer deps and no signatures > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures with invalid attestations > must match snapshot 1`] = `
audited 1 package in xxx
1 package has an invalid attestation:
sigstore@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with invalid signatures > must match snapshot 1`] = `
audited 1 package in xxx
1 package has an invalid registry signature:
kms-demo@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with invalid signatures and color output enabled > must match snapshot 1`] = `
audited 1 package in xxx
1 package has an invalid registry signature:
kms-demo@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with key fallback to legacy API > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures with keys but missing signature > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a missing registry signature but the registry is providing signing keys:
kms-demo@1.0.0 (https://registry.npmjs.org/)
`
exports[`test/lib/commands/audit.js TAP audit signatures with multiple invalid attestations > must match snapshot 1`] = `
audited 2 packages in xxx
2 packages have invalid attestations:
sigstore@1.0.0 (https://registry.npmjs.org/)
tuf-js@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with these packages since they were published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with multiple invalid signatures > must match snapshot 1`] = `
audited 2 packages in xxx
2 packages have invalid registry signatures:
async@1.1.1 (https://registry.npmjs.org/)
kms-demo@1.0.0 (https://registry.npmjs.org/)
Someone might have tampered with these packages since they were published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with multiple missing signatures > must match snapshot 1`] = `
audited 2 packages in xxx
2 packages have missing registry signatures but the registry is providing signing keys:
async@1.1.1 (https://registry.npmjs.org/)
kms-demo@1.0.0 (https://registry.npmjs.org/)
`
exports[`test/lib/commands/audit.js TAP audit signatures with multiple valid signatures and one invalid > must match snapshot 1`] = `
audited 3 packages in xxx
2 packages have verified registry signatures
1 package has an invalid registry signature:
node-fetch@1.6.0 (https://registry.npmjs.org/)
Someone might have tampered with this package since it was published on the registry!
`
exports[`test/lib/commands/audit.js TAP audit signatures with valid and missing signatures > must match snapshot 1`] = `
audited 2 packages in xxx
1 package has a verified registry signature
1 package has a missing registry signature but the registry is providing signing keys:
async@1.1.1 (https://registry.npmjs.org/)
`
exports[`test/lib/commands/audit.js TAP audit signatures with valid attestations > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
1 package has a verified attestation
`
exports[`test/lib/commands/audit.js TAP audit signatures with valid signatures > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures with valid signatures using alias > must match snapshot 1`] = `
audited 1 package in xxx
1 package has a verified registry signature
`
exports[`test/lib/commands/audit.js TAP audit signatures workspaces verifies registry deps and ignores local workspace deps > must match snapshot 1`] = `
audited 3 packages in xxx
3 packages have verified registry signatures
`
exports[`test/lib/commands/audit.js TAP audit signatures workspaces verifies registry deps when filtering by workspace name > must match snapshot 1`] = `
audited 2 packages in xxx
2 packages have verified registry signatures
`
exports[`test/lib/commands/audit.js TAP json audit > must match snapshot 1`] = `
{
"auditReportVersion": 2,
"vulnerabilities": {
"test-dep-a": {
"name": "test-dep-a",
"severity": "high",
"isDirect": true,
"via": [
{
"source": 100,
"name": "test-dep-a",
"dependency": "test-dep-a",
"title": "Test advisory 100",
"url": "https://github.com/advisories/GHSA-100",
"severity": "high",
"cwe": [
"cwe-0"
],
"cvss": {
"score": 0
},
"range": "*"
}
],
"effects": [],
"range": "*",
"nodes": [
"node_modules/test-dep-a"
],
"fixAvailable": false
}
},
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 1,
"critical": 0,
"total": 1
},
"dependencies": {
"prod": 2,
"dev": 0,
"optional": 0,
"peer": 0,
"peerOptional": 0,
"total": 1
}
}
}
`
exports[`test/lib/commands/audit.js TAP normal audit > must match snapshot 1`] = `
# npm audit report
test-dep-a 1.0.0
Severity: high
Test advisory 100 - https://github.com/advisories/GHSA-100
fix available via \`npm audit fix\`
node_modules/test-dep-a
1 high severity vulnerability
To address all issues, run:
npm audit fix
`

View File

@ -0,0 +1,139 @@
/* 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/cache.js TAP cache ls > logs cache entries 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/test-package
make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz
`
exports[`test/lib/commands/cache.js TAP cache ls corrupted > logs cache entries with bad data 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/corrupted
make-fetch-happen:request-cache:https://registry.npmjs.org/corrupted/-/corrupted-3.1.0.tgz
`
exports[`test/lib/commands/cache.js TAP cache ls missing packument version not an object > logs cache entry for packument 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/missing-version
`
exports[`test/lib/commands/cache.js TAP cache ls nonpublic registry > logs cache entry for extemporaneously and its tarball 1`] = `
make-fetch-happen:request-cache:https://somerepo.github.org/aabbcc/
make-fetch-happen:request-cache:https://somerepo.github.org/extemporaneously
`
exports[`test/lib/commands/cache.js TAP cache ls pkgs > logs cache entries for npm and webpack and one webpack tgz 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/npm
make-fetch-happen:request-cache:https://registry.npmjs.org/npm/-/npm-1.2.0.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/webpack
make-fetch-happen:request-cache:https://registry.npmjs.org/webpack/-/webpack-4.47.0.tgz
`
exports[`test/lib/commands/cache.js TAP cache ls scoped and scoped slash > logs cache entries for @gar and @fritzy 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/@fritzy%2fstaydown
make-fetch-happen:request-cache:https://registry.npmjs.org/@gar%2fnpm-expansion
`
exports[`test/lib/commands/cache.js TAP cache ls special > logs cache entries for foo 1`] = `
make-fetch-happen:request-cache:https://registry.npmjs.org/foo
make-fetch-happen:request-cache:https://registry.npmjs.org/foo/-/foo-1.2.3-beta.tgz
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows invalid package info 1`] = `
invalid npx cache entry with key deadbeef
location: {CWD}/cache/_npx/deadbeef
invalid npx cache entry with key badc0de
location: {CWD}/cache/_npx/badc0de
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows valid package info 1`] = `
invalid npx cache entry with key deadbeef
location: {CWD}/cache/_npx/deadbeef
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx directory package > shows valid package info with _npx directory package 1`] = `
valid npx cache entry with key valid123
location: {CWD}/cache/_npx/valid123
packages:
- /path/to/valid-package
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx packages > shows valid package info with _npx packages 1`] = `
valid npx cache entry with key valid123
location: {CWD}/cache/_npx/valid123
packages:
- valid-package@1.0.0 (valid-package@1.0.0)
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with a link dependency > shows link dependency realpath (child.isLink branch) 1`] = `
valid npx cache entry with key link123
location: {CWD}/cache/_npx/link123
packages: (unknown)
dependencies:
- {CWD}/cache/_npx/some-other-loc
`
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with dependencies > shows valid package info with dependencies 1`] = `
valid npx cache entry with key valid456
location: {CWD}/cache/_npx/valid456
packages: (unknown)
dependencies:
- dep-package@1.0.0
`
exports[`test/lib/commands/cache.js TAP cache npx ls: empty cache > logs message for empty npx cache 1`] = `
npx cache does not exist
`
exports[`test/lib/commands/cache.js TAP cache npx ls: entry with unknown package > lists entry with unknown package 1`] = `
unknown123: (unknown)
`
exports[`test/lib/commands/cache.js TAP cache npx ls: some entries > lists one valid and one invalid entry 1`] = `
abc123: fake-npx-package@1.0.0
z9y8x7: (empty/invalid)
`
exports[`test/lib/commands/cache.js TAP cache npx rm: remove single entry > logs removing single npx cache entry 1`] = `
Removing npx key at {CWD}/cache/_npx/123removeme
Removing npx key at {CWD}/cache/_npx/123removeme
`
exports[`test/lib/commands/cache.js TAP cache npx rm: removing all with --force works > logs removing everything 1`] = `
Removing npx key at {CWD}/cache/_npx/remove-all-yes-force
`
exports[`test/lib/commands/cache.js TAP cache npx rm: removing all without --force fails > logs usage error when removing all without --force 1`] = `
`
exports[`test/lib/commands/cache.js TAP cache npx rm: removing more than 1, less than all entries > logs removing 2 of 3 entries 1`] = `
Removing npx key at {CWD}/cache/_npx/123removeme
Removing npx key at {CWD}/cache/_npx/456removeme
Removing npx key at {CWD}/cache/_npx/123removeme
Removing npx key at {CWD}/cache/_npx/456removeme
`
exports[`test/lib/commands/cache.js TAP cache rm > logs deleting single entry 1`] = `
Deleted: make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz
`
exports[`test/lib/commands/cache.js TAP cache verify > shows verified cache output 1`] = `
Cache verified and compressed ({PATH})
Content verified: 0 (0 bytes)
Index entries: 0
Finished in xxxs
`
exports[`test/lib/commands/cache.js TAP cache verify w/ extra output > shows extra output 1`] = `
Cache verified and compressed ({PATH})
Content verified: 17057 (1644485260 bytes)
Corrupted content removed: 12345
Content garbage-collected: 1144 (248164665 bytes)
Missing content: 92
Index entries: 20175
Finished in xxxs
`

View File

@ -0,0 +1,220 @@
/* 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/completion.js TAP completion --no- flags > flags 1`] = `
Array [
String(
--no-version
--no-versions
),
]
`
exports[`test/lib/commands/completion.js TAP completion commands with no completion > no results 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion completion cannot complete options that take a value in mid-command > does not try to complete option arguments in the middle of a command 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion completion completion > both shells 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion completion completion no known shells > no responses 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion completion completion wrong word count > no responses 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion completion of invalid command name does nothing > no results 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion double dashes escape from flag completion > full command list 1`] = `
Array [
String(
access
adduser
audit
bugs
cache
ci
completion
config
dedupe
deprecate
diff
dist-tag
docs
doctor
edit
exec
explain
explore
find-dupes
fund
get
help
help-search
init
install
install-ci-test
install-test
link
ll
login
logout
ls
org
outdated
owner
pack
ping
pkg
prefix
profile
prune
publish
query
rebuild
repo
restart
root
run-script
sbom
search
set
shrinkwrap
star
stars
start
stop
team
test
token
undeprecate
uninstall
unpublish
unstar
update
version
view
whoami
author
home
issues
info
show
find
add
unlink
remove
rm
r
un
rb
list
ln
create
i
it
cit
up
c
s
se
tst
t
ddp
v
run
clean-install
clean-install-test
x
why
la
verison
ic
innit
in
ins
inst
insta
instal
isnt
isnta
isntal
isntall
install-clean
isntall-clean
hlep
dist-tags
upgrade
udpate
rum
sit
urn
ogr
add-user
),
]
`
exports[`test/lib/commands/completion.js TAP completion filtered subcommands > filtered subcommands 1`] = `
Array []
`
exports[`test/lib/commands/completion.js TAP completion flags > flags 1`] = `
Array [
String(
--version
--versions
--viewer
--verbose
--v
),
]
`
exports[`test/lib/commands/completion.js TAP completion multiple command names > multiple command names 1`] = `
Array [
String(
access
adduser
audit
author
add
add-user
),
]
`
exports[`test/lib/commands/completion.js TAP completion single command name > single command name 1`] = `
Array [
"config",
]
`
exports[`test/lib/commands/completion.js TAP completion subcommand completion > subcommands 1`] = `
Array [
String(
get
grant
list
revoke
set
),
]
`
exports[`test/lib/commands/completion.js TAP windows without bash > no output 1`] = `
Array []
`

View File

@ -0,0 +1,429 @@
/* 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/config.js TAP config list --json > output matches snapshot 1`] = `
{
"cache": "{CACHE}",
"color": {COLOR},
"json": true,
"projectloaded": "yes",
"userloaded": "yes",
"globalloaded": "yes",
"access": null,
"all": false,
"allow-same-version": false,
"also": null,
"audit": true,
"audit-level": null,
"auth-type": "web",
"before": null,
"bin-links": true,
"browser": null,
"ca": null,
"cache-max": null,
"cache-min": 0,
"cafile": null,
"call": "",
"cert": null,
"cidr": null,
"commit-hooks": true,
"cpu": null,
"depth": null,
"description": true,
"dev": false,
"diff": [],
"diff-ignore-all-space": false,
"diff-name-only": false,
"diff-no-prefix": false,
"diff-dst-prefix": "b/",
"diff-src-prefix": "a/",
"diff-text": false,
"diff-unified": 3,
"dry-run": false,
"editor": "{EDITOR}",
"engine-strict": false,
"expect-result-count": null,
"expect-results": null,
"fetch-retries": 2,
"fetch-retry-factor": 10,
"fetch-retry-maxtimeout": 60000,
"fetch-retry-mintimeout": 10000,
"fetch-timeout": 300000,
"force": false,
"foreground-scripts": false,
"format-package-lock": true,
"fund": true,
"git": "git",
"git-tag-version": true,
"global": false,
"globalconfig": "{CWD}/global/etc/npmrc",
"global-style": false,
"heading": "npm",
"https-proxy": null,
"if-present": false,
"ignore-scripts": false,
"include": [],
"include-staged": false,
"include-workspace-root": false,
"init-author-email": "",
"init-author-name": "",
"init-author-url": "",
"init-license": "ISC",
"init-module": "{CWD}/home/.npm-init.js",
"init-type": "commonjs",
"init-version": "1.0.0",
"init.author.email": "",
"init.author.name": "",
"init.author.url": "",
"init.license": "ISC",
"init.module": "{CWD}/home/.npm-init.js",
"init.version": "1.0.0",
"install-links": false,
"install-strategy": "hoisted",
"key": null,
"legacy-bundling": false,
"legacy-peer-deps": false,
"libc": null,
"link": false,
"local-address": null,
"location": "user",
"lockfile-version": null,
"loglevel": "notice",
"logs-dir": null,
"logs-max": 10,
"long": false,
"maxsockets": 15,
"message": "%s",
"node-gyp": "{CWD}/node_modules/node-gyp/bin/node-gyp.js",
"node-options": null,
"noproxy": [
""
],
"offline": false,
"omit": [],
"omit-lockfile-registry-resolved": false,
"only": null,
"optional": null,
"os": null,
"otp": null,
"package": [],
"package-lock": true,
"package-lock-only": false,
"pack-destination": ".",
"parseable": false,
"prefer-dedupe": false,
"prefer-offline": false,
"prefer-online": false,
"prefix": "{CWD}/global",
"preid": "",
"production": null,
"progress": {PROGRESS},
"provenance": false,
"provenance-file": null,
"proxy": null,
"read-only": false,
"rebuild-bundle": true,
"registry": "https://registry.npmjs.org/",
"replace-registry-host": "npmjs",
"save": true,
"save-bundle": false,
"save-dev": false,
"save-exact": false,
"save-optional": false,
"save-peer": false,
"save-prefix": "^",
"save-prod": false,
"sbom-format": null,
"sbom-type": "library",
"scope": "",
"script-shell": null,
"searchexclude": "",
"searchlimit": 20,
"searchopts": "",
"searchstaleness": 900,
"shell": "{SHELL}",
"shrinkwrap": true,
"sign-git-commit": false,
"sign-git-tag": false,
"strict-peer-deps": false,
"strict-ssl": true,
"tag": "latest",
"tag-version-prefix": "v",
"timing": false,
"umask": 0,
"unicode": false,
"update-notifier": true,
"usage": false,
"user-agent": "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}",
"userconfig": "{CWD}/home/.npmrc",
"version": false,
"versions": false,
"viewer": "{VIEWER}",
"which": null,
"workspace": [],
"workspaces": null,
"workspaces-update": true,
"yes": null,
"npm-version": "{NPM-VERSION}"
}
`
exports[`test/lib/commands/config.js TAP config list --long > output matches snapshot 1`] = `
; "default" config from default values
_auth = (protected)
access = null
all = false
allow-same-version = false
also = null
audit = true
audit-level = null
auth-type = "web"
before = null
bin-links = true
browser = null
ca = null
; cache = "{CACHE}" ; overridden by cli
cache-max = null
cache-min = 0
cafile = null
call = ""
cert = null
cidr = null
; color = {COLOR}
commit-hooks = true
cpu = null
depth = null
description = true
dev = false
diff = []
diff-dst-prefix = "b/"
diff-ignore-all-space = false
diff-name-only = false
diff-no-prefix = false
diff-src-prefix = "a/"
diff-text = false
diff-unified = 3
dry-run = false
editor = "{EDITOR}"
engine-strict = false
expect-result-count = null
expect-results = null
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
fetch-timeout = 300000
force = false
foreground-scripts = false
format-package-lock = true
fund = true
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "{CWD}/global/etc/npmrc"
heading = "npm"
https-proxy = null
if-present = false
ignore-scripts = false
include = []
include-staged = false
include-workspace-root = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "{CWD}/home/.npm-init.js"
init-type = "commonjs"
init-version = "1.0.0"
init.author.email = ""
init.author.name = ""
init.author.url = ""
init.license = "ISC"
init.module = "{CWD}/home/.npm-init.js"
init.version = "1.0.0"
install-links = false
install-strategy = "hoisted"
json = false
key = null
legacy-bundling = false
legacy-peer-deps = false
libc = null
link = false
local-address = null
location = "user"
lockfile-version = null
loglevel = "notice"
logs-dir = null
logs-max = 10
; long = false ; overridden by cli
maxsockets = 15
message = "%s"
node-gyp = "{CWD}/node_modules/node-gyp/bin/node-gyp.js"
node-options = null
noproxy = [""]
npm-version = "{NPM-VERSION}"
offline = false
omit = []
omit-lockfile-registry-resolved = false
only = null
optional = null
os = null
otp = null
pack-destination = "."
package = []
package-lock = true
package-lock-only = false
parseable = false
prefer-dedupe = false
prefer-offline = false
prefer-online = false
prefix = "{CWD}/global"
preid = ""
production = null
progress = {PROGRESS}
provenance = false
provenance-file = null
proxy = null
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
replace-registry-host = "npmjs"
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-peer = false
save-prefix = "^"
save-prod = false
sbom-format = null
sbom-type = "library"
scope = ""
script-shell = null
searchexclude = ""
searchlimit = 20
searchopts = ""
searchstaleness = 900
shell = "{SHELL}"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
strict-peer-deps = false
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
timing = false
umask = 0
unicode = false
update-notifier = true
usage = false
user-agent = "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}"
userconfig = "{CWD}/home/.npmrc"
version = false
versions = false
viewer = "{VIEWER}"
which = null
workspace = []
workspaces = null
workspaces-update = true
yes = null
; "global" config from {CWD}/global/etc/npmrc
globalloaded = "yes"
; "user" config from {CWD}/home/.npmrc
userloaded = "yes"
; "project" config from {CWD}/prefix/.npmrc
projectloaded = "yes"
; "cli" config from command line options
cache = "{CACHE}"
color = {COLOR}
long = true
`
exports[`test/lib/commands/config.js TAP config list > output matches snapshot 1`] = `
; "global" config from {CWD}/global/etc/npmrc
globalloaded = "yes"
; "user" config from {CWD}/home/.npmrc
_auth = (protected)
//nerfdart:_auth = (protected)
//nerfdart:auth = (protected)
auth = (protected)
userloaded = "yes"
; "project" config from {CWD}/prefix/.npmrc
projectloaded = "yes"
; "cli" config from command line options
cache = "{CACHE}"
color = {COLOR}
; node bin location = {NODE-BIN-LOCATION}
; node version = {NODE-VERSION}
; npm local prefix = {CWD}/prefix
; npm version = {NPM-VERSION}
; cwd = {CWD}/prefix
; HOME = {CWD}/home
; Run \`npm config ls -l\` to show all defaults.
`
exports[`test/lib/commands/config.js TAP config list with publishConfig global > output matches snapshot 1`] = `
; "cli" config from command line options
cache = "{CACHE}"
color = {COLOR}
global = true
; node bin location = {NODE-BIN-LOCATION}
; node version = {NODE-VERSION}
; npm local prefix = {CWD}/prefix
; npm version = {NPM-VERSION}
; cwd = {CWD}/prefix
; HOME = {CWD}/home
; Run \`npm config ls -l\` to show all defaults.
`
exports[`test/lib/commands/config.js TAP config list with publishConfig local > output matches snapshot 1`] = `
; "cli" config from command line options
cache = "{CACHE}"
color = {COLOR}
; node bin location = {NODE-BIN-LOCATION}
; node version = {NODE-VERSION}
; npm local prefix = {CWD}/prefix
; npm version = {NPM-VERSION}
; cwd = {CWD}/prefix
; HOME = {CWD}/home
; Run \`npm config ls -l\` to show all defaults.
; "publishConfig" from {CWD}/prefix/package.json
; This set of config values will be used at publish-time.
//some.registry:_authToken = (protected)
other = "not defined"
registry = "https://some.registry"
`
exports[`test/lib/commands/config.js TAP config list with publishConfig local > warns about unknown config 1`] = `
Array [
"Unknown publishConfig config /"other/". This will stop working in the next major version of npm.",
]
`

View File

@ -0,0 +1,88 @@
/* 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/diff.js TAP no args in a project dir > must match snapshot 1`] = `
diff --git a/a.js b/a.js
index v0.1.0..v1.0.0 100644
--- a/a.js
+++ b/a.js
@@ -1,1 +1,1 @@
-const a = "a@0.1.0"
+const a = "a@1.0.0"
diff --git a/b.js b/b.js
index v0.1.0..v1.0.0 100644
--- a/b.js
+++ b/b.js
@@ -1,1 +1,1 @@
-const b = "b@0.1.0"
+const b = "b@1.0.0"
diff --git a/index.js b/index.js
index v0.1.0..v1.0.0 100644
--- a/index.js
+++ b/index.js
@@ -1,1 +1,1 @@
-const version = "0.1.0"
+const version = "1.0.0"
diff --git a/package.json b/package.json
index v0.1.0..v1.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,4 +1,4 @@
{
"name": "@npmcli/foo",
- "version": "0.1.0"
+ "version": "1.0.0"
}
`
exports[`test/lib/commands/diff.js TAP single arg version, filtering by files > must match snapshot 1`] = `
diff --git a/a.js b/a.js
index v0.1.0..v1.0.0 100644
--- a/a.js
+++ b/a.js
@@ -1,1 +1,1 @@
-const a = "a@0.1.0"
+const a = "a@1.0.0"
diff --git a/b.js b/b.js
index v0.1.0..v1.0.0 100644
--- a/b.js
+++ b/b.js
@@ -1,1 +1,1 @@
-const b = "b@0.1.0"
+const b = "b@1.0.0"
`
exports[`test/lib/commands/diff.js TAP various options using --name-only option > must match snapshot 1`] = `
index.js
package.json
`
exports[`test/lib/commands/diff.js TAP various options using diff option > must match snapshot 1`] = `
diff --git a/index.js b/index.js
index v2.0.0..v3.0.0 100644
--- a/index.js
+++ b/index.js
@@ -18,7 +18,7 @@
17
18
19
-202.0.0
+203.0.0
21
22
23
diff --git a/package.json b/package.json
index v2.0.0..v3.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,4 +1,4 @@
{
"name": "bar",
- "version": "2.0.0"
+ "version": "3.0.0"
}
`

View File

@ -0,0 +1,172 @@
/* 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/dist-tag.js TAP add new tag > should return success msg 1`] = `
+c: @scoped/another@7.7.7
`
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/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/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 Result {
dist-tag ls type: 'range',
dist-tag ls registry: true,
dist-tag ls where: undefined,
dist-tag ls raw: 'foo',
dist-tag ls name: 'foo',
dist-tag ls escapedName: 'foo',
dist-tag ls scope: undefined,
dist-tag ls rawSpec: '*',
dist-tag ls saveSpec: null,
dist-tag ls fetchSpec: '*',
dist-tag ls gitRange: undefined,
dist-tag ls gitCommittish: undefined,
dist-tag ls gitSubdir: undefined,
dist-tag ls hosted: undefined
dist-tag ls }
`
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/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/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/commands/dist-tag.js TAP remove existing tag > should log remove info 1`] = `
dist-tag del c from @scoped/another
`
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/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/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/commands/dist-tag.js TAP workspaces no args > printed the expected output 1`] = `
workspace-a:
latest-a: 1.0.0
latest: 1.0.0
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`
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
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
workspace-d:
`
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/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
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`
exports[`test/lib/commands/dist-tag.js TAP workspaces one arg -- cwd > printed the expected output 1`] = `
workspace-a:
latest-a: 1.0.0
latest: 1.0.0
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`
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
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`
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
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`
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
`
exports[`test/lib/commands/dist-tag.js TAP workspaces two args -- list, cwd > printed the expected output 1`] = `
workspace-a:
latest-a: 1.0.0
latest: 1.0.0
workspace-b:
latest-b: 2.0.0
latest: 2.0.0
workspace-c:
latest-c: 3.0.0
latest: 3.0.0
`

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
/* 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/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 [<package-spec>] --which=1\`, for example, to open the first funding URL listed in that package
`
exports[`test/lib/commands/fund.js TAP fund colors > should print output with color info 1`] = `
test-fund-colors@1.0.0
+-- http://example.com/a
| \`-- a@1.0.0
\`-- http://example.com/b
| \`-- b@1.0.0, c@1.0.0
+-- http://example.com/d
| \`-- d@1.0.0
\`-- http://example.com/e
\`-- e@1.0.0
`
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
\`-- http://example.com/donate
\`-- bar@1.0.0
`
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/commands/fund.js TAP fund pkg missing version number > should print name only 1`] = `
http://example.com/foo
\`-- foo
`
exports[`test/lib/commands/fund.js TAP fund using bad which value: index too high > should print message about invalid which 1`] = `
--which=100 is not a valid index
1: Funding available at the following URL: http://example.com
2: Funding available at the following URL: http://sponsors.example.com/me
3: Funding available at the following URL: http://collective.example.com
Run \`npm fund [<package-spec>] --which=1\`, for example, to open the first funding URL listed in that package
`
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 [<package-spec>] --which=1\`, for example, to open the first funding URL listed in that package
`
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/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
\`-- http://example.com/c
\`-- c@1.0.0
`
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace name > should display only filtered workspace name and its deps 1`] = `
workspaces-support@1.0.0
\`-- https://example.com/a
| \`-- a@1.0.0
\`-- http://example.com/c
\`-- c@1.0.0
`
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace path > should display only filtered workspace name and its deps 1`] = `
workspaces-support@1.0.0
\`-- https://example.com/a
| \`-- a@1.0.0
\`-- http://example.com/c
\`-- c@1.0.0
`

View File

@ -0,0 +1,25 @@
/* 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/init.js TAP displays output > displays helper info 1`] = `
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See \`npm help init\` for definitive documentation on these fields
and exactly what they do.
Use \`npm install <pkg>\` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
`
exports[`test/lib/commands/init.js TAP workspaces no args -- yes > should print helper info 1`] = `
added 1 package in {TIME}
`

View File

@ -0,0 +1,309 @@
/* 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/install.js TAP devEngines should not utilize engines in root if devEngines is provided > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
warn EBADDEVENGINES The developer of this package has specified the following through devEngines
warn EBADDEVENGINES Invalid engine "runtime"
warn EBADDEVENGINES Invalid semver version "0.0.1" does not match "v1337.0.0" for "runtime"
warn EBADDEVENGINES {
warn EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
warn EBADDEVENGINES required: { name: 'node', version: '0.0.1', onFail: 'warn' }
warn EBADDEVENGINES }
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly reify moves {}
silly audit report null
up to date, audited 1 package in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should show devEngines doesnt break engines > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--global" "true"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly placeDep ROOT alpha@ OK for: want: file:../../prefix/alpha
warn EBADENGINE Unsupported engine {
warn EBADENGINE package: undefined,
warn EBADENGINE required: { node: '1.0.0' },
warn EBADENGINE current: { node: 'v1337.0.0', npm: '42.0.0' }
warn EBADENGINE }
warn EBADENGINE Unsupported engine {
warn EBADENGINE package: undefined,
warn EBADENGINE required: { node: '1.0.0' },
warn EBADENGINE current: { node: 'v1337.0.0', npm: '42.0.0' }
warn EBADENGINE }
silly reify moves {}
silly ADD node_modules/alpha
added 1 package in {TIME}
`
exports[`test/lib/commands/install.js TAP devEngines should show devEngines has no effect on dev package install > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--save-dev" "true"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly placeDep ROOT alpha@ OK for: want: file:alpha
silly reify moves {}
silly audit bulk request {}
silly audit report null
silly ADD node_modules/alpha
added 1 package, and audited 3 packages in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should show devEngines has no effect on global package install > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--global" "true"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly placeDep ROOT alpha@ OK for: want: file:../../prefix
silly reify moves {}
silly ADD node_modules/alpha
added 1 package in {TIME}
`
exports[`test/lib/commands/install.js TAP devEngines should show devEngines has no effect on package install > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly placeDep ROOT alpha@ OK for: want: file:alpha
silly reify moves {}
silly audit bulk request {}
silly audit report null
silly ADD node_modules/alpha
added 1 package, and audited 3 packages in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines 2x error case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
verbose stack Error: The developer of this package has specified the following through devEngines
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
error EBADDEVENGINES Invalid name "nondescript" does not match "node" for "runtime"
error EBADDEVENGINES {
error EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
error EBADDEVENGINES required: { name: 'nondescript', onFail: 'error' }
error EBADDEVENGINES }
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines 2x warning case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
warn EBADDEVENGINES The developer of this package has specified the following through devEngines
warn EBADDEVENGINES Invalid engine "runtime"
warn EBADDEVENGINES Invalid name "nondescript" does not match "node" for "runtime"
warn EBADDEVENGINES {
warn EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
warn EBADDEVENGINES required: { name: 'nondescript', onFail: 'warn' }
warn EBADDEVENGINES }
warn EBADDEVENGINES Invalid engine "cpu"
warn EBADDEVENGINES Invalid name "risv" does not match "x86" for "cpu"
warn EBADDEVENGINES {
warn EBADDEVENGINES current: { name: 'x86' },
warn EBADDEVENGINES required: { name: 'risv', onFail: 'warn' }
warn EBADDEVENGINES }
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly reify moves {}
silly audit report null
up to date, audited 1 package in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines failure and warning case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
warn EBADDEVENGINES The developer of this package has specified the following through devEngines
warn EBADDEVENGINES Invalid engine "cpu"
warn EBADDEVENGINES Invalid name "risv" does not match "x86" for "cpu"
warn EBADDEVENGINES {
warn EBADDEVENGINES current: { name: 'x86' },
warn EBADDEVENGINES required: { name: 'risv', onFail: 'warn' }
warn EBADDEVENGINES }
verbose stack Error: The developer of this package has specified the following through devEngines
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
error EBADDEVENGINES Invalid name "nondescript" does not match "node" for "runtime"
error EBADDEVENGINES {
error EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
error EBADDEVENGINES required: { name: 'nondescript' }
error EBADDEVENGINES }
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines failure case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
verbose stack Error: The developer of this package has specified the following through devEngines
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
error EBADDEVENGINES Invalid name "nondescript" does not match "node" for "runtime"
error EBADDEVENGINES {
error EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
error EBADDEVENGINES required: { name: 'nondescript' }
error EBADDEVENGINES }
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines failure force case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--force" "true"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
warn using --force Recommended protections disabled.
silly logfile done cleaning log files
warn EBADDEVENGINES The developer of this package has specified the following through devEngines
warn EBADDEVENGINES Invalid engine "runtime"
warn EBADDEVENGINES Invalid name "nondescript" does not match "node" for "runtime"
warn EBADDEVENGINES {
warn EBADDEVENGINES current: { name: 'node', version: 'v1337.0.0' },
warn EBADDEVENGINES required: { name: 'nondescript' }
warn EBADDEVENGINES }
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly reify moves {}
silly audit report null
up to date, audited 1 package in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should utilize devEngines success case > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
silly reify moves {}
silly audit report null
up to date, audited 1 package in {TIME}
found 0 vulnerabilities
`
exports[`test/lib/commands/install.js TAP devEngines should utilize engines in root if devEngines is not provided > must match snapshot 1`] = `
silly config load:file:{CWD}/npmrc
silly config load:file:{CWD}/prefix/.npmrc
silly config load:file:{CWD}/home/.npmrc
silly config load:file:{CWD}/global/etc/npmrc
verbose title npm
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false"
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
silly logfile done cleaning log files
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
silly idealTree buildDeps
warn EBADENGINE Unsupported engine {
warn EBADENGINE package: undefined,
warn EBADENGINE required: { node: '0.0.1' },
warn EBADENGINE current: { node: 'v1337.0.0', npm: '42.0.0' }
warn EBADENGINE }
silly reify moves {}
silly audit report null
up to date, audited 1 package in {TIME}
found 0 vulnerabilities
`

View File

@ -0,0 +1,55 @@
/* 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 hash character in working directory path > should create a global link to current pkg, even within path with hash 1`] = `
{CWD}/global/node_modules/test-pkg-link -> {CWD}/other/i_like_#_in_my_paths/test-pkg-link
`
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}/prefix/node_modules/@myscope/bar -> {CWD}/global/node_modules/@myscope/bar
{CWD}/prefix/node_modules/@myscope/linked -> {CWD}/other/scoped-linked
{CWD}/prefix/node_modules/a -> {CWD}/global/node_modules/a
{CWD}/prefix/node_modules/link-me-too -> {CWD}/other/link-me-too
{CWD}/prefix/node_modules/test-pkg-link -> {CWD}/other/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}/prefix/node_modules/@myscope/bar -> {CWD}/global/node_modules/@myscope/bar
{CWD}/prefix/node_modules/@myscope/linked -> {CWD}/other/scoped-linked
{CWD}/prefix/node_modules/a -> {CWD}/global/node_modules/a
{CWD}/prefix/node_modules/link-me-too -> {CWD}/other/link-me-too
{CWD}/prefix/node_modules/test-pkg-link -> {CWD}/other/test-pkg-link
{CWD}/prefix/node_modules/x -> {CWD}/prefix/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}/prefix/node_modules/@myscope/linked -> {CWD}/other/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}/prefix/node_modules/@myscope/linked -> {CWD}/other/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}/global/node_modules/test-pkg-link -> {CWD}/prefix
`
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}/global/node_modules/a -> {CWD}/prefix/packages/a
`
exports[`test/lib/commands/link.js TAP test linked installed as symlinks > linked package should not be installed 1`] = `
{CWD}/prefix/node_modules/mylink -> {CWD}/other/mylink
`

View File

@ -0,0 +1,671 @@
/* 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/ls.js TAP ignore missing optional deps --json > ls --json problems 1`] = `
Array [
"invalid: optional-wrong@3.2.1 {CWD}/prefix/node_modules/optional-wrong",
"missing: peer-missing@1, required by test-npm-ls-ignore-missing-optional@1.2.3",
"invalid: peer-optional-wrong@3.2.1 {CWD}/prefix/node_modules/peer-optional-wrong",
"invalid: peer-wrong@3.2.1 {CWD}/prefix/node_modules/peer-wrong",
"missing: prod-missing@1, required by test-npm-ls-ignore-missing-optional@1.2.3",
"invalid: prod-wrong@3.2.1 {CWD}/prefix/node_modules/prod-wrong",
]
`
exports[`test/lib/commands/ls.js TAP ignore missing optional deps --parseable > ls --parseable result 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/optional-ok
{CWD}/prefix/node_modules/optional-wrong
{CWD}/prefix/node_modules/peer-ok
{CWD}/prefix/node_modules/peer-optional-ok
{CWD}/prefix/node_modules/peer-optional-wrong
{CWD}/prefix/node_modules/peer-wrong
{CWD}/prefix/node_modules/prod-ok
{CWD}/prefix/node_modules/prod-wrong
`
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 {CWD}/prefix
+-- UNMET OPTIONAL DEPENDENCY optional-missing@1
+-- optional-ok@1.2.3
+-- optional-wrong@3.2.1 invalid: "1" from the root project
+-- UNMET DEPENDENCY peer-missing@1
+-- peer-ok@1.2.3
+-- UNMET OPTIONAL DEPENDENCY peer-optional-missing@1
+-- peer-optional-ok@1.2.3
+-- peer-optional-wrong@3.2.1 invalid: "1" from the root project
+-- peer-wrong@3.2.1 invalid: "1" from the root project
+-- UNMET DEPENDENCY prod-missing@1
+-- prod-ok@1.2.3
\`-- prod-wrong@3.2.1 invalid: "1" from the root project
`
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}/prefix
+-- chai@1.0.0
\`-- foo@1.0.0
`
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}/prefix
+-- a@1.0.0
| \`-- b@1.0.0
\`-- e@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --dev > should output tree containing dev deps 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- dev-dep@1.0.0
\`-- foo@1.0.0
\`-- dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --link > should output tree containing linked deps 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- linked-dep@1.0.0 -> ./linked-dep
`
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}/prefix
|
+-- chai@1.0.0
|
+-- dev-dep@1.0.0
| A DEV dep kind of dep
+-- optional-dep@1.0.0
| Maybe a dep?
+-- peer-dep@1.0.0
| Peer-dep description here
\`-- prod-dep@1.0.0
A PROD dep kind of dep
`
exports[`test/lib/commands/ls.js TAP ls --long > should output tree info with descriptions 1`] = `
test-npm-ls@1.0.0
| {CWD}/prefix
|
+-- chai@1.0.0
|
+-- dev-dep@1.0.0
| | A DEV dep kind of dep
| \`-- foo@1.0.0
| |
| \`-- dog@1.0.0
|
+-- optional-dep@1.0.0
| Maybe a dep?
+-- peer-dep@1.0.0
| Peer-dep description here
\`-- prod-dep@1.0.0
| A PROD dep kind of dep
\`-- dog@2.0.0
A dep that bars
`
exports[`test/lib/commands/ls.js TAP ls --parseable --depth=0 > should output tree containing only top-level dependencies 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
`
exports[`test/lib/commands/ls.js TAP ls --parseable --depth=1 > should output parseable containing top-level deps and their deps only 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable --dev > should output tree containing dev deps 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/dev-dep
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable --link > should output tree containing linked deps 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/linked-dep
`
exports[`test/lib/commands/ls.js TAP ls --parseable --long --depth=0 > should output tree containing top-level deps with descriptions 1`] = `
{CWD}/prefix:test-npm-ls@1.0.0
{CWD}/prefix/node_modules/chai:chai@1.0.0
{CWD}/prefix/node_modules/dev-dep:dev-dep@1.0.0
{CWD}/prefix/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/prefix/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/prefix/node_modules/prod-dep:prod-dep@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --parseable --long > should output tree info with descriptions 1`] = `
{CWD}/prefix:test-npm-ls@1.0.0
{CWD}/prefix/node_modules/chai:chai@1.0.0
{CWD}/prefix/node_modules/dev-dep:dev-dep@1.0.0
{CWD}/prefix/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/prefix/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/prefix/node_modules/prod-dep:prod-dep@1.0.0
{CWD}/prefix/node_modules/foo:foo@1.0.0
{CWD}/prefix/node_modules/prod-dep/node_modules/dog:dog@2.0.0
{CWD}/prefix/node_modules/dog:dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --parseable --long missing/invalid/extraneous > should output parseable result containing EXTRANEOUS/INVALID labels 1`] = `
{CWD}/prefix:test-npm-ls@1.0.0
{CWD}/prefix/node_modules/chai:chai@1.0.0:EXTRANEOUS
{CWD}/prefix/node_modules/foo:foo@1.0.0:INVALID
{CWD}/prefix/node_modules/dog:dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --parseable --long print symlink target location > should output parseable results with symlink targets 1`] = `
{CWD}/prefix:test-npm-ls@1.0.0
{CWD}/prefix/node_modules/chai:chai@1.0.0
{CWD}/prefix/node_modules/dev-dep:dev-dep@1.0.0
{CWD}/prefix/node_modules/linked-dep:linked-dep@1.0.0:{CWD}/prefix/linked-dep
{CWD}/prefix/node_modules/optional-dep:optional-dep@1.0.0
{CWD}/prefix/node_modules/peer-dep:peer-dep@1.0.0
{CWD}/prefix/node_modules/prod-dep:prod-dep@1.0.0
{CWD}/prefix/node_modules/foo:foo@1.0.0
{CWD}/prefix/node_modules/prod-dep/node_modules/dog:dog@2.0.0
{CWD}/prefix/node_modules/dog:dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --parseable --long with extraneous deps > should output long parseable output with extraneous info 1`] = `
{CWD}/prefix:test-npm-ls@1.0.0
{CWD}/prefix/node_modules/chai:chai@1.0.0:EXTRANEOUS
{CWD}/prefix/node_modules/foo:foo@1.0.0
{CWD}/prefix/node_modules/dog:dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls --parseable --production > should output tree containing production deps 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/optional-dep
{CWD}/prefix/node_modules/prod-dep
{CWD}/prefix/node_modules/prod-dep/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable cycle deps > should print tree output omitting deduped ref 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/a
{CWD}/prefix/node_modules/b
`
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}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
`
exports[`test/lib/commands/ls.js TAP ls --parseable empty location > should print empty result 1`] = `
{CWD}/prefix
`
exports[`test/lib/commands/ls.js TAP ls --parseable extraneous deps > should output containing problems info 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable from and resolved properties > should not be printed in tree output 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/simple-output
`
exports[`test/lib/commands/ls.js TAP ls --parseable global > should print parseable output for global deps 1`] = `
{CWD}/global
{CWD}/global/node_modules/a
{CWD}/global/node_modules/b
{CWD}/global/node_modules/b/node_modules/c
`
exports[`test/lib/commands/ls.js TAP ls --parseable json read problems > should print empty result 1`] = `
{CWD}/prefix
`
exports[`test/lib/commands/ls.js TAP ls --parseable missing package.json > should output parseable missing name/version of top-level package 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/dog
{CWD}/prefix/node_modules/foo
`
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}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable no args > should output parseable representation of dependencies structure 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable overridden dep > should contain overridden outout 1`] = `
{CWD}/prefix:test-overridden@1.0.0
{CWD}/prefix/node_modules/foo:foo@1.0.0
{CWD}/prefix/node_modules/bar:bar@1.0.0:OVERRIDDEN
`
exports[`test/lib/commands/ls.js TAP ls --parseable resolved points to git ref > should output tree containing git refs 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/abbrev
`
exports[`test/lib/commands/ls.js TAP ls --parseable unmet optional dep > should output parseable with empty entry for missing optional deps 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/dev-dep
{CWD}/prefix/node_modules/optional-dep
{CWD}/prefix/node_modules/peer-dep
{CWD}/prefix/node_modules/prod-dep
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/prod-dep/node_modules/dog
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable unmet peer dep > should output parseable signaling missing peer dep in problems 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/dev-dep
{CWD}/prefix/node_modules/optional-dep
{CWD}/prefix/node_modules/peer-dep
{CWD}/prefix/node_modules/prod-dep
{CWD}/prefix/node_modules/foo
{CWD}/prefix/node_modules/prod-dep/node_modules/dog
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --parseable using aliases > should output tree containing aliases 1`] = `
{CWD}/prefix
{CWD}/prefix/node_modules/a
`
exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg > should output parseable contaning only occurrences of filtered by package 1`] = `
{CWD}/prefix/node_modules/chai
`
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}/prefix/node_modules/dog
`
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/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}/prefix/node_modules/chai
{CWD}/prefix/node_modules/dog
`
exports[`test/lib/commands/ls.js TAP ls --production > should output tree containing production deps 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- chai@1.0.0
+-- optional-dep@1.0.0
\`-- prod-dep@1.0.0
\`-- dog@2.0.0
`
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}/prefix
\`-- a@1.0.1
`
exports[`test/lib/commands/ls.js TAP ls colored output > should output tree containing color info 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- chai@1.0.0 extraneous
+-- foo@1.0.0 invalid: "^2.0.0" from the root project
| \`-- dog@1.0.0
\`-- UNMET DEPENDENCY ipsum@^1.0.0

`
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}/prefix
\`-- a@1.0.0
\`-- b@1.0.0
\`-- a@1.0.0 deduped
`
exports[`test/lib/commands/ls.js TAP ls cycle deps with filter args > should print tree output containing deduped ref 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- a@1.0.0
 \`-- b@1.0.0
 \`-- a@1.0.0 deduped

`
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}/prefix
+-- a@1.0.0
| \`-- UNMET DEPENDENCY b@^1.0.0
\`-- UNMET DEPENDENCY b@^1.0.0
`
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}/prefix
+-- chai@1.0.0
\`-- foo@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls empty location > should print empty result 1`] = `
{CWD}/prefix
\`-- (empty)
`
exports[`test/lib/commands/ls.js TAP ls extraneous deps > should output containing problems info 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- chai@1.0.0 extraneous
\`-- foo@1.0.0
\`-- dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option should list a in top-level only > output 1`] = `
test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/prefix
\`-- a@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option should print empty results msg > output 1`] = `
test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/prefix
\`-- (empty)
`
exports[`test/lib/commands/ls.js TAP ls filter pkg arg using depth option should print expected result > output 1`] = `
test-pkg-arg-filter-with-depth-opt@1.0.0 {CWD}/prefix
\`-- b@1.0.0
\`-- c@1.0.0
\`-- d@1.0.0
`
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}/prefix
+-- b@1.0.0 extraneous
| \`-- c@1.0.0 deduped
+-- c@1.0.0 extraneous
\`-- d@1.0.0 extraneous
\`-- c@2.0.0 extraneous
`
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}/prefix
\`-- simple-output@2.1.1
`
exports[`test/lib/commands/ls.js TAP ls global > should print tree and not mark top-level items extraneous 1`] = `
{CWD}/global
+-- a@1.0.0
\`-- b@1.0.0
\`-- c@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls invalid deduped dep > should output tree signaling mismatching peer dep in problems 1`] = `
invalid-deduped-dep@1.0.0 {CWD}/prefix
+-- a@1.0.0
| \`-- b@1.0.0 deduped invalid: "^2.0.0" from the root project, "^2.0.0" from node_modules/a
\`-- b@1.0.0 invalid: "^2.0.0" from the root project, "^2.0.0" from node_modules/a

`
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}/prefix
+-- chai@1.0.0
+-- dev-dep@1.0.0
| \`-- foo@1.0.0
| \`-- dog@1.0.0
+-- optional-dep@1.0.0
+-- peer-dep@1.0.0 invalid: "^2.0.0" from the root project
\`-- prod-dep@1.0.0
\`-- dog@2.0.0
`
exports[`test/lib/commands/ls.js TAP ls json read problems > should print empty result 1`] = `
{CWD}/prefix
\`-- (empty)
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should filter by parent folder workspace config > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- e@1.0.0 -> ./group/e
\`-- f@1.0.0 -> ./group/f
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should filter single workspace > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- a@1.0.0 -> ./a
| \`-- d@1.0.0 deduped -> ./d
\`-- d@1.0.0 -> ./d
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should filter using workspace config > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
\`-- a@1.0.0 -> ./a
+-- baz@1.0.0
+-- c@1.0.0
\`-- d@1.0.0 -> ./d
\`-- foo@1.1.1
\`-- bar@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should inlude root and specified workspace > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- d@1.0.0 -> ./d
| \`-- foo@1.1.1
| \`-- bar@1.0.0
\`-- pacote@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should list --all workspaces properly > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- a@1.0.0 -> ./a
| +-- baz@1.0.0
| +-- c@1.0.0
| \`-- d@1.0.0 deduped -> ./d
+-- b@1.0.0 -> ./b
+-- d@1.0.0 -> ./d
| \`-- foo@1.1.1
| \`-- bar@1.0.0
+-- e@1.0.0 -> ./group/e
+-- f@1.0.0 -> ./group/f
\`-- pacote@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should list only prod deps of workspaces > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- a@1.0.0 -> ./a
| +-- c@1.0.0
| \`-- d@1.0.0 deduped -> ./d
+-- b@1.0.0 -> ./b
+-- d@1.0.0 -> ./d
| \`-- foo@1.1.1
| \`-- bar@1.0.0
+-- e@1.0.0 -> ./group/e
+-- f@1.0.0 -> ./group/f
\`-- pacote@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should list workspaces properly with default configs > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- a@1.0.0 -> ./a
| +-- baz@1.0.0
| +-- c@1.0.0
| \`-- d@1.0.0 deduped -> ./d
+-- b@1.0.0 -> ./b
+-- d@1.0.0 -> ./d
| \`-- foo@1.1.1
+-- e@1.0.0 -> ./group/e
+-- f@1.0.0 -> ./group/f
\`-- pacote@1.0.0

`
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should not list workspaces with --no-workspaces > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
\`-- pacote@1.0.0

`
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 > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
\`-- d@1.0.0 -> ./d
\`-- foo@1.1.1
\`-- bar@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls missing package.json > should output tree missing name/version of top-level package 1`] = `
{CWD}/prefix
+-- chai@1.0.0 extraneous
+-- dog@1.0.0 extraneous
\`-- foo@1.0.0 extraneous
\`-- dog@1.0.0 deduped
`
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}/prefix
+-- chai@1.0.0 extraneous
+-- foo@1.0.0 invalid: "^2.0.0" from the root project
| \`-- dog@1.0.0
\`-- UNMET DEPENDENCY ipsum@^1.0.0
`
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}/prefix
+-- chai@1.0.0
\`-- foo@1.0.0
\`-- dog@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls overridden dep > should contain overridden outout 1`] = `
test-overridden@1.0.0 {CWD}/prefix
\`-- foo@1.0.0
\`-- bar@1.0.0 overridden
`
exports[`test/lib/commands/ls.js TAP ls overridden dep w/ color > should contain overridden outout 1`] = `
test-overridden@1.0.0 {CWD}/prefix
\`-- foo@1.0.0
 \`-- bar@1.0.0 overridden

`
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}/prefix
+-- a@1.0.0
| \`-- b@1.0.0 deduped -> ./b
\`-- b@1.0.0 -> ./b
`
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}/prefix
\`-- abbrev@1.1.1 (git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c)
`
exports[`test/lib/commands/ls.js TAP ls unmet optional dep > should output tree with empty entry for missing optional deps 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- chai@1.0.0
+-- dev-dep@1.0.0
| \`-- foo@1.0.0
| \`-- dog@1.0.0
+-- UNMET OPTIONAL DEPENDENCY missing-optional-dep@^1.0.0
+-- optional-dep@1.0.0 invalid: "^2.0.0" from the root project
+-- peer-dep@1.0.0
\`-- prod-dep@1.0.0
 \`-- dog@2.0.0

`
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}/prefix
\`-- UNMET DEPENDENCY peer-dep@*
`
exports[`test/lib/commands/ls.js TAP ls using aliases > should output tree containing aliases 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- a@npm:b@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls with args and dedupe entries > should print tree output containing deduped ref 1`] = `
dedupe-entries@1.0.0 {CWD}/prefix
+-- @npmcli/a@1.0.0
| \`-- @npmcli/b@1.1.2 deduped
+-- @npmcli/b@1.1.2
\`-- @npmcli/c@1.0.0
 \`-- @npmcli/b@1.1.2 deduped

`
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}/prefix
+-- @npmcli/a@1.0.0
| \`-- @npmcli/c@1.0.0 deduped
+-- @npmcli/b@1.1.2
| \`-- @npmcli/c@1.0.0 deduped
\`-- @npmcli/c@1.0.0
`
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}/prefix
\`-- (empty)
`
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`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- chai@1.0.0

`
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}/prefix
\`-- foo@1.0.0
\`-- dog@1.0.0
`
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}/prefix
\`-- (empty)
`
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}/prefix
+-- chai@1.0.0
\`-- foo@1.0.0
\`-- dog@1.0.0
`
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}/prefix
+-- @npmcli/a@1.0.0
| \`-- @npmcli/b@1.1.2 deduped
+-- @npmcli/b@1.1.2
\`-- @npmcli/c@1.0.0
\`-- @npmcli/b@1.1.2 deduped
`
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}/prefix
+-- @npmcli/a@1.0.0
+-- @npmcli/b@1.1.2
\`-- @npmcli/c@1.0.0
`
exports[`test/lib/commands/ls.js TAP ls workspace and missing optional dep > should omit missing optional dep 1`] = `
root@ {CWD}/prefix
+-- baz@1.0.0 -> ./baz
\`-- foo@1.0.0
`
exports[`test/lib/commands/ls.js TAP show multiple invalid reasons > ls result 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- 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
+-- chai@1.0.0 extraneous
| \`-- dog@1.0.0 deduped invalid: "^1.2.3" from the root project, "^2.0.0" from node_modules/cat, "2.x" from node_modules/chai
\`-- dog@1.0.0 invalid: "^1.2.3" from the root project, "^2.0.0" from node_modules/cat, "2.x" from node_modules/chai
\`-- cat@1.0.0 deduped invalid: "^2.0.0" from the root project
`

View File

@ -0,0 +1,264 @@
/* 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/outdated.js TAP aliases > should display aliased outdated dep output 1`] = `
Package Current Wanted Latest Location Depended by
cat:dog@latest 1.0.0 2.0.0 2.0.0 node_modules/cat prefix
`
exports[`test/lib/commands/outdated.js TAP aliases with version range > should display aliased outdated dep output with correct wanted values 1`] = `
Package Current Wanted Latest Location Depended by
cat:dog@^1.0.0 1.0.0 1.0.1 2.0.0 node_modules/cat prefix
`
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 prefix
chai 1.0.0 1.0.1 1.0.1 node_modules/chai prefix
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - prefix
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --json --long > must match snapshot 1`] = `
{
"cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/cat",
"type": "dependencies"
},
"chai": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/chai",
"type": "peerDependencies"
},
"dog": {
"current": "1.0.1",
"wanted": "1.0.1",
"latest": "2.0.0",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/dog",
"type": "dependencies"
},
"theta": {
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix",
"type": "dependencies"
}
}
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --json > must match snapshot 1`] = `
{
"cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/cat"
},
"chai": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/chai"
},
"dog": {
"current": "1.0.1",
"wanted": "1.0.1",
"latest": "2.0.0",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/dog"
},
"theta": {
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "prefix"
}
}
`
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 prefix dependencies
chai 1.0.0 1.0.1 1.0.1 node_modules/chai prefix peerDependencies
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix dependencies
theta MISSING 1.0.1 1.0.1 - prefix dependencies
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=dev --omit=peer > must match snapshot 1`] = `
Package Current Wanted Latest Location Depended by
cat 1.0.0 1.0.1 1.0.1 node_modules/cat prefix
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - prefix
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=dev > must match snapshot 1`] = `
Package Current Wanted Latest Location Depended by
cat 1.0.0 1.0.1 1.0.1 node_modules/cat prefix
chai 1.0.0 1.0.1 1.0.1 node_modules/chai prefix
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - prefix
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --omit=prod > must match snapshot 1`] = `
Package Current Wanted Latest Location Depended by
cat 1.0.0 1.0.1 1.0.1 node_modules/cat prefix
chai 1.0.0 1.0.1 1.0.1 node_modules/chai prefix
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --parseable --long > must match snapshot 1`] = `
{CWD}/prefix/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:prefix:dependencies:
{CWD}/prefix/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:prefix:peerDependencies:
{CWD}/prefix/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:prefix:dependencies:
:theta@1.0.1:MISSING:theta@1.0.1:prefix:dependencies:
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated --parseable > must match snapshot 1`] = `
{CWD}/prefix/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:prefix
{CWD}/prefix/node_modules/chai:chai@1.0.1:chai@1.0.0:chai@1.0.1:prefix
{CWD}/prefix/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:prefix
:theta@1.0.1:MISSING:theta@1.0.1:prefix
`
exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated > must match snapshot 1`] = `
Package Current Wanted Latest Location Depended by
cat 1.0.0 1.0.1 1.0.1 node_modules/cat prefix
chai 1.0.0 1.0.1 1.0.1 node_modules/chai prefix
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - prefix
`
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/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 prefix
`
exports[`test/lib/commands/outdated.js TAP workspaces should display all dependencies > 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
chai 1.0.0 1.0.1 1.0.1 node_modules/chai foo
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - c@1.0.0
theta MISSING 1.0.1 1.0.1 - d@1.0.0
theta MISSING 1.0.1 1.0.1 - e@1.0.0
`
exports[`test/lib/commands/outdated.js TAP workspaces should display json results filtered by ws > output 1`] = `
{
"cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "a",
"location": "{CWD}/prefix/node_modules/cat"
}
}
`
exports[`test/lib/commands/outdated.js TAP workspaces should display missing deps when filtering by ws > output 1`] = `
Package Current Wanted Latest Location Depended by
theta MISSING 1.0.1 1.0.1 - c@1.0.0
`
exports[`test/lib/commands/outdated.js TAP workspaces should display nested deps when filtering by ws and using --all > 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
chai 1.0.0 1.0.1 1.0.1 node_modules/chai foo
`
exports[`test/lib/commands/outdated.js TAP workspaces should display no results if ws has no deps to display > output 1`] = `
`
exports[`test/lib/commands/outdated.js TAP workspaces should display only root outdated when ws disabled > output 1`] = `
`
exports[`test/lib/commands/outdated.js TAP workspaces should display parseable results filtered by ws > output 1`] = `
{CWD}/prefix/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a
`
exports[`test/lib/commands/outdated.js TAP workspaces should display results filtered by ws > 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
`
exports[`test/lib/commands/outdated.js TAP workspaces should display ws outdated deps human output > 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
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - c@1.0.0
theta MISSING 1.0.1 1.0.1 - d@1.0.0
theta MISSING 1.0.1 1.0.1 - e@1.0.0
`
exports[`test/lib/commands/outdated.js TAP workspaces should display ws outdated deps json output > output 1`] = `
{
"cat": {
"current": "1.0.0",
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "a",
"location": "{CWD}/prefix/node_modules/cat"
},
"dog": {
"current": "1.0.1",
"wanted": "1.0.1",
"latest": "2.0.0",
"dependent": "prefix",
"location": "{CWD}/prefix/node_modules/dog"
},
"theta": [
{
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "c"
},
{
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "d"
},
{
"wanted": "1.0.1",
"latest": "1.0.1",
"dependent": "e"
}
]
}
`
exports[`test/lib/commands/outdated.js TAP workspaces should display ws outdated deps parseable output > output 1`] = `
{CWD}/prefix/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a
{CWD}/prefix/node_modules/dog:dog@1.0.1:dog@1.0.1:dog@2.0.0:prefix
:theta@1.0.1:MISSING:theta@1.0.1:c
:theta@1.0.1:MISSING:theta@1.0.1:d
:theta@1.0.1:MISSING:theta@1.0.1:e
`
exports[`test/lib/commands/outdated.js TAP workspaces should highlight ws in dependend by section > 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
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
theta MISSING 1.0.1 1.0.1 - c@1.0.0
theta MISSING 1.0.1 1.0.1 - d@1.0.0
theta MISSING 1.0.1 1.0.1 - e@1.0.0
`

View File

@ -0,0 +1,145 @@
/* 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/pack.js TAP dry run > logs pack contents 1`] = `
Array [
"package: test-package@1.0.0",
"Tarball Contents",
"41B package.json",
"Tarball Details",
"name: test-package",
"version: 1.0.0",
"filename: test-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 41 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
]
`
exports[`test/lib/commands/pack.js TAP foreground-scripts can still be set to false > logs pack contents 1`] = `
Array [
"package: test-fg-scripts@0.0.0",
"Tarball Contents",
"110B package.json",
"Tarball Details",
"name: test-fg-scripts",
"version: 0.0.0",
"filename: test-fg-scripts-0.0.0.tgz",
"package size: {size}",
"unpacked size: 110 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
]
`
exports[`test/lib/commands/pack.js TAP foreground-scripts defaults to true > logs pack contents 1`] = `
Array [
"package: test-fg-scripts@0.0.0",
"Tarball Contents",
"110B package.json",
"Tarball Details",
"name: test-fg-scripts",
"version: 0.0.0",
"filename: test-fg-scripts-0.0.0.tgz",
"package size: {size}",
"unpacked size: 110 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
]
`
exports[`test/lib/commands/pack.js TAP should log output as valid json > logs pack contents 1`] = `
Array []
`
exports[`test/lib/commands/pack.js TAP should log output as valid json > outputs as json 1`] = `
Array [
Array [
Object {
"bundled": Array [],
"entryCount": 1,
"filename": "test-package-1.0.0.tgz",
"files": Array [
Object {
"mode": 420,
"path": "package.json",
"size": "{size}",
},
],
"id": "test-package@1.0.0",
"integrity": "{integrity}",
"name": "test-package",
"shasum": "{sha}",
"size": "{size}",
"unpackedSize": 41,
"version": "1.0.0",
},
],
]
`
exports[`test/lib/commands/pack.js TAP should log scoped package output as valid json > logs pack contents 1`] = `
Array []
`
exports[`test/lib/commands/pack.js TAP should log scoped package output as valid json > outputs as json 1`] = `
Array [
Array [
Object {
"bundled": Array [],
"entryCount": 1,
"filename": "myscope-test-package-1.0.0.tgz",
"files": Array [
Object {
"mode": 420,
"path": "package.json",
"size": "{size}",
},
],
"id": "@myscope/test-package@1.0.0",
"integrity": "{integrity}",
"name": "@myscope/test-package",
"shasum": "{sha}",
"size": "{size}",
"unpackedSize": 88,
"version": "1.0.0",
},
],
]
`
exports[`test/lib/commands/pack.js TAP should log scoped package output as valid json > stderr has banners 1`] = `
Array [
String(
> @myscope/test-package@1.0.0 prepack
> echo prepack!
),
]
`
exports[`test/lib/commands/pack.js TAP should pack current directory with no arguments > logs pack contents 1`] = `
Array [
"package: test-package@1.0.0",
"Tarball Contents",
"41B package.json",
"Tarball Details",
"name: test-package",
"version: 1.0.0",
"filename: test-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 41 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
]
`

View File

@ -0,0 +1,103 @@
/* 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/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: 1234
2FA successfully enabled. Below are your recovery codes, please print these out.
You will need these to recover access to your account if you lose your authentication device.
123456
789101
`
exports[`test/lib/commands/profile.js TAP profile get <key> --parseable > should output parseable result value 1`] = `
foo
`
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/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/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/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
email_verified true
created 2015-02-26T01:26:37.384Z
updated 2020-08-12T16:19:35.326Z
fullname Foo Bar
homepage https://github.com
freenode foobar
twitter https://twitter.com/npmjs
github https://github.com/npm
`
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
fullname: Foo Bar
homepage: https://github.com
freenode: foobar
twitter: https://twitter.com/npmjs
github: https://github.com/npm
created: 2015-02-26T01:26:37.384Z
updated: 2020-08-12T16:19:35.326Z
`
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
fullname: Foo Bar
homepage: https://github.com
freenode: foobar
twitter: https://twitter.com/npmjs
github: https://github.com/npm
created: 2015-02-26T01:26:37.384Z
updated: 2020-08-12T16:19:35.326Z
`
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
fullname: Foo Bar
homepage: https://github.com
freenode: foobar
twitter: https://twitter.com/npmjs
github: https://github.com/npm
created: 2015-02-26T01:26:37.384Z
updated: 2020-08-12T16:19:35.326Z
cidr_whitelist: 192.168.1.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
fullname: Foo Bar
homepage: https://github.com
freenode: foobar
twitter: https://twitter.com/npmjs
github: https://github.com/npm
created: 2015-02-26T01:26:37.384Z
updated: 2020-08-12T16:19:35.326Z
`
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
`

View File

@ -0,0 +1,473 @@
/* 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/publish.js TAP _auth config default registry > new package version 1`] = `
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP bare _auth and registry config > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP dry-run > must match snapshot 1`] = `
Array [
"package: @npmcli/test-package@1.0.0",
"Tarball Contents",
"95B package.json",
"Tarball Details",
"name: @npmcli/test-package",
"version: 1.0.0",
"filename: npmcli-test-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 95 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
"Publishing to https://registry.npmjs.org/ with tag latest and default access (dry-run)",
]
`
exports[`test/lib/commands/publish.js TAP foreground-scripts can still be set to false > must match snapshot 1`] = `
Array [
"package: test-fg-scripts@0.0.0",
"Tarball Contents",
"110B package.json",
"Tarball Details",
"name: test-fg-scripts",
"version: 0.0.0",
"filename: test-fg-scripts-0.0.0.tgz",
"package size: {size}",
"unpacked size: 110 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
"Publishing to https://registry.npmjs.org/ with tag latest and default access (dry-run)",
]
`
exports[`test/lib/commands/publish.js TAP foreground-scripts defaults to true > must match snapshot 1`] = `
Array [
"package: test-fg-scripts@0.0.0",
"Tarball Contents",
"110B package.json",
"Tarball Details",
"name: test-fg-scripts",
"version: 0.0.0",
"filename: test-fg-scripts-0.0.0.tgz",
"package size: {size}",
"unpacked size: 110 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
"Publishing to https://registry.npmjs.org/ with tag latest and default access (dry-run)",
]
`
exports[`test/lib/commands/publish.js TAP has mTLS auth for scope configured registry > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP has token auth for scope configured registry > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP ignore-scripts > new package version 1`] = `
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP json > must match snapshot 1`] = `
Array [
"Publishing to https://registry.npmjs.org/ with tag latest and default access",
]
`
exports[`test/lib/commands/publish.js TAP json > new package json 1`] = `
{
"id": "@npmcli/test-package@1.0.0",
"name": "@npmcli/test-package",
"version": "1.0.0",
"size": "{size}",
"unpackedSize": 95,
"shasum": "{sha}",
"integrity": "{integrity}",
"filename": "npmcli-test-package-1.0.0.tgz",
"files": [
{
"path": "package.json",
"size": "{size}",
"mode": 420
}
],
"entryCount": 1,
"bundled": []
}
`
exports[`test/lib/commands/publish.js TAP manifest > manifest 1`] = `
Object {
"_id": "npm@{VERSION}",
"author": Object {
"name": "GitHub Inc.",
},
"bin": Object {
"npm": "bin/npm-cli.js",
"npx": "bin/npx-cli.js",
},
"bugs": Object {
"url": "https://github.com/npm/cli/issues",
},
"description": "a package manager for JavaScript",
"directories": Object {
"doc": "./doc",
"man": "./man",
},
"exports": Object {
".": Array [
Object {
"default": "./index.js",
},
"./index.js",
],
"./package.json": "./package.json",
},
"files": Array [
"bin/",
"lib/",
"index.js",
"docs/content/",
"docs/output/",
"man/",
],
"homepage": "https://docs.npmjs.com/",
"keywords": Array [
"install",
"modules",
"package manager",
"package.json",
],
"license": "Artistic-2.0",
"main": "./index.js",
"man": Array [
"man/man1/npm-access.1",
"man/man1/npm-adduser.1",
"man/man1/npm-audit.1",
"man/man1/npm-bugs.1",
"man/man1/npm-cache.1",
"man/man1/npm-ci.1",
"man/man1/npm-completion.1",
"man/man1/npm-config.1",
"man/man1/npm-dedupe.1",
"man/man1/npm-deprecate.1",
"man/man1/npm-diff.1",
"man/man1/npm-dist-tag.1",
"man/man1/npm-docs.1",
"man/man1/npm-doctor.1",
"man/man1/npm-edit.1",
"man/man1/npm-exec.1",
"man/man1/npm-explain.1",
"man/man1/npm-explore.1",
"man/man1/npm-find-dupes.1",
"man/man1/npm-fund.1",
"man/man1/npm-help-search.1",
"man/man1/npm-help.1",
"man/man1/npm-init.1",
"man/man1/npm-install-ci-test.1",
"man/man1/npm-install-test.1",
"man/man1/npm-install.1",
"man/man1/npm-link.1",
"man/man1/npm-login.1",
"man/man1/npm-logout.1",
"man/man1/npm-ls.1",
"man/man1/npm-org.1",
"man/man1/npm-outdated.1",
"man/man1/npm-owner.1",
"man/man1/npm-pack.1",
"man/man1/npm-ping.1",
"man/man1/npm-pkg.1",
"man/man1/npm-prefix.1",
"man/man1/npm-profile.1",
"man/man1/npm-prune.1",
"man/man1/npm-publish.1",
"man/man1/npm-query.1",
"man/man1/npm-rebuild.1",
"man/man1/npm-repo.1",
"man/man1/npm-restart.1",
"man/man1/npm-root.1",
"man/man1/npm-run-script.1",
"man/man1/npm-sbom.1",
"man/man1/npm-search.1",
"man/man1/npm-shrinkwrap.1",
"man/man1/npm-star.1",
"man/man1/npm-stars.1",
"man/man1/npm-start.1",
"man/man1/npm-stop.1",
"man/man1/npm-team.1",
"man/man1/npm-test.1",
"man/man1/npm-token.1",
"man/man1/npm-undeprecate.1",
"man/man1/npm-uninstall.1",
"man/man1/npm-unpublish.1",
"man/man1/npm-unstar.1",
"man/man1/npm-update.1",
"man/man1/npm-version.1",
"man/man1/npm-view.1",
"man/man1/npm-whoami.1",
"man/man1/npm.1",
"man/man1/npx.1",
"man/man5/folders.5",
"man/man5/install.5",
"man/man5/npm-global.5",
"man/man5/npm-json.5",
"man/man5/npm-shrinkwrap-json.5",
"man/man5/npmrc.5",
"man/man5/package-json.5",
"man/man5/package-lock-json.5",
"man/man7/config.7",
"man/man7/dependency-selectors.7",
"man/man7/developers.7",
"man/man7/logging.7",
"man/man7/orgs.7",
"man/man7/package-spec.7",
"man/man7/registry.7",
"man/man7/removal.7",
"man/man7/scope.7",
"man/man7/scripts.7",
"man/man7/workspaces.7",
],
"name": "npm",
"readmeFilename": "README.md",
"repository": Object {
"type": "git",
"url": "git+https://github.com/npm/cli.git",
},
"version": "{VERSION}",
}
`
exports[`test/lib/commands/publish.js TAP no auth dry-run > must match snapshot 1`] = `
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP no auth dry-run > warns about auth being needed 1`] = `
Array [
"This command requires you to be logged in to https://registry.npmjs.org/ (dry-run)",
]
`
exports[`test/lib/commands/publish.js TAP prioritize CLI flags over publishConfig > new package version 1`] = `
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP public access > must match snapshot 1`] = `
Array [
"package: @npm/test-package@1.0.0",
"Tarball Contents",
"55B package.json",
"Tarball Details",
"name: @npm/test-package",
"version: 1.0.0",
"filename: npm-test-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 55 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
"Publishing to https://registry.npmjs.org/ with tag latest and public access",
]
`
exports[`test/lib/commands/publish.js TAP public access > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if added during script process > new package version 1`] = `
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = `
> @npmcli/test-package@1.0.0 prepublishOnly
> touch scripts-prepublishonly
> @npmcli/test-package@1.0.0 publish
> touch scripts-publish
> @npmcli/test-package@1.0.0 postpublish
> touch scripts-postpublish
+ @npmcli/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP restricted access > must match snapshot 1`] = `
Array [
"package: @npm/test-package@1.0.0",
"Tarball Contents",
"55B package.json",
"Tarball Details",
"name: @npm/test-package",
"version: 1.0.0",
"filename: npm-test-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 55 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 1",
"Publishing to https://registry.npmjs.org/ with tag latest and restricted access",
]
`
exports[`test/lib/commands/publish.js TAP restricted access > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP scoped _auth config scoped registry > new package version 1`] = `
+ @npm/test-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP tarball > must match snapshot 1`] = `
Array [
"package: test-tar-package@1.0.0",
"Tarball Contents",
String(
26B index.js
98B package.json
),
"Tarball Details",
"name: test-tar-package",
"version: 1.0.0",
"filename: test-tar-package-1.0.0.tgz",
"package size: {size}",
"unpacked size: 124 B",
"shasum: {sha}",
"integrity: {integrity}
"total files: 2",
"Publishing to https://registry.npmjs.org/ with tag latest and default access",
]
`
exports[`test/lib/commands/publish.js TAP tarball > new package json 1`] = `
+ test-tar-package@1.0.0
`
exports[`test/lib/commands/publish.js TAP workspaces all workspaces - color > all public workspaces 1`] = `
+ workspace-a@1.2.3-a
+ workspace-b@1.2.3-n
+ workspace-n@1.2.3-n
`
exports[`test/lib/commands/publish.js TAP workspaces all workspaces - color > warns about skipped private workspace in color 1`] = `
Array [
"\\u001b[94mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.",
String(
\\u001b[94mpublish\\u001b[39m errors corrected:
\\u001b[94mpublish\\u001b[39m "repository" was changed from a string to an object
),
"\\u001b[94mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.",
String(
\\u001b[94mpublish\\u001b[39m errors corrected:
\\u001b[94mpublish\\u001b[39m "repository" was changed from a string to an object
\\u001b[94mpublish\\u001b[39m "repository.url" was normalized to "git+https://github.com/npm/workspace-b.git"
),
"\\u001b[94mpublish\\u001b[39m Skipping workspace \\u001b[36mworkspace-p\\u001b[39m, marked as \\u001b[1mprivate\\u001b[22m",
]
`
exports[`test/lib/commands/publish.js TAP workspaces all workspaces - no color > all public workspaces 1`] = `
+ workspace-a@1.2.3-a
+ workspace-b@1.2.3-n
+ workspace-n@1.2.3-n
`
exports[`test/lib/commands/publish.js TAP workspaces all workspaces - no color > warns about skipped private workspace 1`] = `
Array [
"publish npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.",
String(
publish errors corrected:
publish "repository" was changed from a string to an object
),
"publish npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.",
String(
publish errors corrected:
publish "repository" was changed from a string to an object
publish "repository.url" was normalized to "git+https://github.com/npm/workspace-b.git"
),
"publish Skipping workspace workspace-p, marked as private",
]
`
exports[`test/lib/commands/publish.js TAP workspaces all workspaces - some marked private > one marked private 1`] = `
+ workspace-a@1.2.3-a
`
exports[`test/lib/commands/publish.js TAP workspaces differet package spec > publish different package spec 1`] = `
+ pkg@1.2.3
`
exports[`test/lib/commands/publish.js TAP workspaces json > all workspaces in json 1`] = `
{
"workspace-a": {
"id": "workspace-a@1.2.3-a",
"name": "workspace-a",
"version": "1.2.3-a",
"size": "{size}",
"unpackedSize": 82,
"shasum": "{sha}",
"integrity": "{integrity}",
"filename": "workspace-a-1.2.3-a.tgz",
"files": [
{
"path": "package.json",
"size": "{size}",
"mode": 420
}
],
"entryCount": 1,
"bundled": []
},
"workspace-b": {
"id": "workspace-b@1.2.3-n",
"name": "workspace-b",
"version": "1.2.3-n",
"size": "{size}",
"unpackedSize": 92,
"shasum": "{sha}",
"integrity": "{integrity}",
"filename": "workspace-b-1.2.3-n.tgz",
"files": [
{
"path": "package.json",
"size": "{size}",
"mode": 420
}
],
"entryCount": 1,
"bundled": []
},
"workspace-n": {
"id": "workspace-n@1.2.3-n",
"name": "workspace-n",
"version": "1.2.3-n",
"size": "{size}",
"unpackedSize": 42,
"shasum": "{sha}",
"integrity": "{integrity}",
"filename": "workspace-n-1.2.3-n.tgz",
"files": [
{
"path": "package.json",
"size": "{size}",
"mode": 420
}
],
"entryCount": 1,
"bundled": []
}
}
`
exports[`test/lib/commands/publish.js TAP workspaces one workspace - success > single workspace 1`] = `
+ workspace-a@1.2.3-a
`

View File

@ -0,0 +1,316 @@
/* 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/query.js TAP global > should return global package 1`] = `
[
{
"name": "lorem",
"version": "2.0.0",
"_id": "lorem@2.0.0",
"pkgid": "lorem@2.0.0",
"location": "node_modules/lorem",
"path": "{CWD}/global/node_modules/lorem",
"realpath": "{CWD}/global/node_modules/lorem",
"resolved": null,
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP include-workspace-root > should return workspace object and root object 1`] = `
[
{
"name": "project",
"workspaces": [
"c"
],
"dependencies": {
"a": "^1.0.0",
"b": "^1.0.0"
},
"pkgid": "project@",
"location": "",
"path": "{CWD}/prefix",
"realpath": "{CWD}/prefix",
"resolved": null,
"from": [],
"to": [
"node_modules/c",
"node_modules/a",
"node_modules/b"
],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"name": "c",
"version": "1.0.0",
"_id": "c@1.0.0",
"pkgid": "c@1.0.0",
"location": "c",
"path": "{CWD}/prefix/c",
"realpath": "{CWD}/prefix/c",
"resolved": null,
"from": [],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP linked node > should return linked node res 1`] = `
[
{
"name": "a",
"version": "1.0.0",
"_id": "a@1.0.0",
"pkgid": "a@1.0.0",
"location": "a",
"path": "{CWD}/prefix/a",
"realpath": "{CWD}/prefix/a",
"resolved": null,
"from": [],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP missing > should return missing node 1`] = `
[
{
"name": "b",
"version": "^1.0.0",
"_id": "b@^1.0.0",
"pkgid": "b@^1.0.0",
"path": null,
"realpath": null,
"resolved": null,
"from": [
""
],
"to": [],
"dev": true,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {
"missing": true
}
}
]
`
exports[`test/lib/commands/query.js TAP package-lock-only with package lock > should return valid response with only lock info 1`] = `
[
{
"name": "project",
"dependencies": {
"a": "^1.0.0"
},
"pkgid": "project@",
"location": "",
"path": "{CWD}/prefix",
"realpath": "{CWD}/prefix",
"resolved": null,
"from": [],
"to": [
"node_modules/a"
],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"version": "1.2.3",
"resolved": "https://dummy.npmjs.org/a/-/a-1.2.3.tgz",
"integrity": "sha512-dummy",
"engines": {
"node": ">=14.17"
},
"name": "a",
"_id": "a@1.2.3",
"pkgid": "a@1.2.3",
"location": "node_modules/a",
"path": "{CWD}/prefix/node_modules/a",
"realpath": "{CWD}/prefix/node_modules/a",
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP recursive tree > should return everything in the tree, accounting for recursion 1`] = `
[
{
"name": "project",
"dependencies": {
"a": "^1.0.0",
"b": "^1.0.0"
},
"pkgid": "project@",
"location": "",
"path": "{CWD}/prefix",
"realpath": "{CWD}/prefix",
"resolved": null,
"from": [],
"to": [
"node_modules/a",
"node_modules/b"
],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"pkgid": "a@",
"location": "node_modules/a",
"path": "{CWD}/prefix/node_modules/a",
"realpath": "{CWD}/prefix/node_modules/a",
"resolved": null,
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"pkgid": "b@",
"location": "node_modules/b",
"path": "{CWD}/prefix/node_modules/b",
"realpath": "{CWD}/prefix/node_modules/b",
"resolved": null,
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP simple query > should return root object and direct children 1`] = `
[
{
"name": "project",
"dependencies": {
"a": "^1.0.0",
"b": "^1.0.0"
},
"peerDependencies": {
"c": "1.0.0"
},
"pkgid": "project@",
"location": "",
"path": "{CWD}/prefix",
"realpath": "{CWD}/prefix",
"resolved": null,
"from": [],
"to": [
"node_modules/a",
"node_modules/b"
],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"pkgid": "a@",
"location": "node_modules/a",
"path": "{CWD}/prefix/node_modules/a",
"realpath": "{CWD}/prefix/node_modules/a",
"resolved": null,
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
},
{
"pkgid": "b@",
"location": "node_modules/b",
"path": "{CWD}/prefix/node_modules/b",
"realpath": "{CWD}/prefix/node_modules/b",
"resolved": null,
"from": [
""
],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`
exports[`test/lib/commands/query.js TAP workspace query > should return workspace object 1`] = `
[
{
"name": "c",
"version": "1.0.0",
"_id": "c@1.0.0",
"pkgid": "c@1.0.0",
"location": "c",
"path": "{CWD}/prefix/c",
"realpath": "{CWD}/prefix/c",
"resolved": null,
"from": [],
"to": [],
"dev": false,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
`

View File

@ -0,0 +1,274 @@
/* 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/run-script.js TAP list scripts no args > basic report 1`] = `
Lifecycle scripts included in x@1.2.3:
test
exit 2
start
node server.js
stop
node kill-server.js
available via \`npm run-script\`:
preenv
echo before the env
postenv
echo after the env
`
exports[`test/lib/commands/run-script.js TAP list scripts parseable > must match snapshot 1`] = `
test:exit 2
start:node server.js
stop:node kill-server.js
preenv:echo before the env
postenv:echo after the env
`
exports[`test/lib/commands/run-script.js TAP list scripts warn json > json report 1`] = `
{
"test": "exit 2",
"start": "node server.js",
"stop": "node kill-server.js",
"preenv": "echo before the env",
"postenv": "echo after the env"
}
`
exports[`test/lib/commands/run-script.js TAP list scripts, only commands > must match snapshot 1`] = `
Lifecycle scripts included in x@1.2.3:
preversion
echo doing the version dance
`
exports[`test/lib/commands/run-script.js TAP list scripts, only non-commands > must match snapshot 1`] = `
Scripts available in x@1.2.3 via \`npm run-script\`:
glorp
echo doing the glerp glop
`
exports[`test/lib/commands/run-script.js TAP workspaces failed workspace run with succeeded runs > should log error msgs for each workspace script 1`] = `
Lifecycle script \`glorp\` failed with error:
code ERR
workspace a@1.0.0
location {CWD}/prefix/packages/a
ERR
`
exports[`test/lib/commands/run-script.js TAP workspaces list all scripts --json > must match snapshot 1`] = `
{
"a": {
"glorp": "echo a doing the glerp glop"
},
"b": {
"glorp": "echo b doing the glerp glop"
},
"c": {
"test": "exit 0",
"posttest": "echo posttest",
"lorem": "echo c lorem"
},
"d": {
"test": "exit 0",
"posttest": "echo posttest"
},
"e": {
"test": "exit 0",
"start": "echo start something"
},
"noscripts": {}
}
`
exports[`test/lib/commands/run-script.js TAP workspaces list all scripts --parseable > must match snapshot 1`] = `
a:glorp:echo a doing the glerp glop
b:glorp:echo b doing the glerp glop
c:test:exit 0
c:posttest:echo posttest
c:lorem:echo c lorem
d:test:exit 0
d:posttest:echo posttest
e:test:exit 0
e:start:echo start something
`
exports[`test/lib/commands/run-script.js TAP workspaces list all scripts > must match snapshot 1`] = `
Scripts available in a@1.0.0 via \`npm run-script\`:
glorp
echo a doing the glerp glop
Scripts available in b@2.0.0 via \`npm run-script\`:
glorp
echo b doing the glerp glop
Lifecycle scripts included in c@1.0.0:
test
exit 0
posttest
echo posttest
available via \`npm run-script\`:
lorem
echo c lorem
Lifecycle scripts included in d@1.0.0:
test
exit 0
posttest
echo posttest
Lifecycle scripts included in e:
test
exit 0
start
echo start something
`
exports[`test/lib/commands/run-script.js TAP workspaces list all scripts with colors > must match snapshot 1`] = `
Scripts available in a@1.0.0 via \`npm run-script\`:
glorp
echo a doing the glerp glop
Scripts available in b@2.0.0 via \`npm run-script\`:
glorp
echo b doing the glerp glop
Lifecycle scripts included in c@1.0.0:
test
exit 0
posttest
echo posttest
available via \`npm run-script\`:
lorem
echo c lorem
Lifecycle scripts included in d@1.0.0:
test
exit 0
posttest
echo posttest
Lifecycle scripts included in e:
test
exit 0
start
echo start something
`
exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by name > must match snapshot 1`] = `
Scripts available in a@1.0.0 via \`npm run-script\`:
glorp
echo a doing the glerp glop
Scripts available in b@2.0.0 via \`npm run-script\`:
glorp
echo b doing the glerp glop
`
exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by parent folder > must match snapshot 1`] = `
Scripts available in a@1.0.0 via \`npm run-script\`:
glorp
echo a doing the glerp glop
Scripts available in b@2.0.0 via \`npm run-script\`:
glorp
echo b doing the glerp glop
Lifecycle scripts included in c@1.0.0:
test
exit 0
posttest
echo posttest
available via \`npm run-script\`:
lorem
echo c lorem
Lifecycle scripts included in d@1.0.0:
test
exit 0
posttest
echo posttest
Lifecycle scripts included in e:
test
exit 0
start
echo start something
`
exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by path > must match snapshot 1`] = `
Scripts available in a@1.0.0 via \`npm run-script\`:
glorp
echo a doing the glerp glop
`
exports[`test/lib/commands/run-script.js TAP workspaces missing scripts in all workspaces > should log error msgs for each workspace script 1`] = `
Lifecycle script \`missing-script\` failed with error:
workspace a@1.0.0
location {CWD}/prefix/packages/a
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=a@1.0.0
Lifecycle script \`missing-script\` failed with error:
workspace b@2.0.0
location {CWD}/prefix/packages/b
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=b@2.0.0
Lifecycle script \`missing-script\` failed with error:
workspace c@1.0.0
location {CWD}/prefix/packages/c
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=c@1.0.0
Lifecycle script \`missing-script\` failed with error:
workspace d@1.0.0
location {CWD}/prefix/packages/d
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=d@1.0.0
Lifecycle script \`missing-script\` failed with error:
workspace e
location {CWD}/prefix/packages/e
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=e
Lifecycle script \`missing-script\` failed with error:
workspace noscripts@1.0.0
location {CWD}/prefix/packages/noscripts
Missing script: "missing-script"
npm error
To see a list of scripts, run:
npm run --workspace=noscripts@1.0.0
`
exports[`test/lib/commands/run-script.js TAP workspaces missing scripts in some workspaces > should log error msgs for each workspace script 1`] = `
Lifecycle script \`test\` failed with error:
workspace a@1.0.0
location {CWD}/prefix/packages/a
Missing script: "test"
npm error
To see a list of scripts, run:
npm run --workspace=a@1.0.0
Lifecycle script \`test\` failed with error:
workspace b@2.0.0
location {CWD}/prefix/packages/b
Missing script: "test"
npm error
To see a list of scripts, run:
npm run --workspace=b@2.0.0
`
exports[`test/lib/commands/run-script.js TAP workspaces single failed workspace run > should log error msgs for each workspace script 1`] = `
Lifecycle script \`test\` failed with error:
workspace c@1.0.0
location {CWD}/prefix/packages/c
err
`

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,435 @@
/* 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/shrinkwrap.js TAP with hidden lockfile ancient > must match snapshot 1`] = `
{
"localPrefix": {
"node_modules": {
".package-lock.json": {
"lockfileVersion": 1
}
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 1,
"requires": true
},
"logs": [
"created a lockfile as npm-shrinkwrap.json"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with hidden lockfile ancient upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"node_modules": {
".package-lock.json": {
"lockfileVersion": 1
}
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {}
},
"logs": [
"created a lockfile as npm-shrinkwrap.json with version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v1 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with hidden lockfile existing > must match snapshot 1`] = `
{
"localPrefix": {
"node_modules": {
".package-lock.json": {
"lockfileVersion": 2
}
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 2,
"requires": true,
"packages": {}
},
"logs": [
"created a lockfile as npm-shrinkwrap.json"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with hidden lockfile existing downgrade > must match snapshot 1`] = `
{
"localPrefix": {
"node_modules": {
".package-lock.json": {
"lockfileVersion": 2
}
}
},
"config": {
"lockfile-version": 1
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 1,
"requires": true
},
"logs": [
"created a lockfile as npm-shrinkwrap.json with version 1"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v1"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with hidden lockfile existing upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"node_modules": {
".package-lock.json": {
"lockfileVersion": 2
}
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {}
},
"logs": [
"created a lockfile as npm-shrinkwrap.json with version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with nothing ancient > must match snapshot 1`] = `
{
"localPrefix": {},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {}
},
"logs": [
"created a lockfile as npm-shrinkwrap.json with version 3"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with nothing ancient upgrade > must match snapshot 1`] = `
{
"localPrefix": {},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {}
},
"logs": [
"created a lockfile as npm-shrinkwrap.json with version 3"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with npm-shrinkwrap.json ancient > must match snapshot 1`] = `
{
"localPrefix": {
"npm-shrinkwrap.json": {
"lockfileVersion": 1
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"npm-shrinkwrap.json updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v1 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with npm-shrinkwrap.json ancient upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"npm-shrinkwrap.json": {
"lockfileVersion": 1
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"npm-shrinkwrap.json updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v1 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with npm-shrinkwrap.json existing > must match snapshot 1`] = `
{
"localPrefix": {
"npm-shrinkwrap.json": {
"lockfileVersion": 2
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"npm-shrinkwrap.json up to date"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with npm-shrinkwrap.json existing downgrade > must match snapshot 1`] = `
{
"localPrefix": {
"npm-shrinkwrap.json": {
"lockfileVersion": 2
}
},
"config": {
"lockfile-version": 1
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 1,
"requires": true
},
"logs": [
"npm-shrinkwrap.json updated to version 1"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v1"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with npm-shrinkwrap.json existing upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"npm-shrinkwrap.json": {
"lockfileVersion": 2
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"npm-shrinkwrap.json updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with package-lock.json ancient > must match snapshot 1`] = `
{
"localPrefix": {
"package-lock.json": {
"lockfileVersion": 1
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"package-lock.json has been renamed to npm-shrinkwrap.json and updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v1 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with package-lock.json ancient upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"package-lock.json": {
"lockfileVersion": 1
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"package-lock.json has been renamed to npm-shrinkwrap.json and updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v1 -> v3"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with package-lock.json existing > must match snapshot 1`] = `
{
"localPrefix": {
"package-lock.json": {
"lockfileVersion": 2
}
},
"config": {},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"package-lock.json has been renamed to npm-shrinkwrap.json"
],
"warn": []
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with package-lock.json existing downgrade > must match snapshot 1`] = `
{
"localPrefix": {
"package-lock.json": {
"lockfileVersion": 2
}
},
"config": {
"lockfile-version": 1
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 1,
"requires": true
},
"logs": [
"package-lock.json has been renamed to npm-shrinkwrap.json and updated to version 1"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v1"
]
}
`
exports[`test/lib/commands/shrinkwrap.js TAP with package-lock.json existing upgrade > must match snapshot 1`] = `
{
"localPrefix": {
"package-lock.json": {
"lockfileVersion": 2
}
},
"config": {
"lockfile-version": 3
},
"shrinkwrap": {
"name": "prefix",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prefix"
}
}
},
"logs": [
"package-lock.json has been renamed to npm-shrinkwrap.json and updated to version 3"
],
"warn": [
"shrinkwrap Converting lock file (npm-shrinkwrap.json) from v2 -> v3"
]
}
`

View File

@ -0,0 +1,14 @@
/* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/lib/commands/stars.js TAP no args > should output a list of starred packages 1`] = `
@npmcli/arborist
@npmcli/map-workspaces
libnpmfund
libnpmpublish
ipt
`

View File

@ -0,0 +1,84 @@
/* 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
`

View File

@ -0,0 +1,78 @@
/* 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/version.js TAP empty versions workspaces with one arg, all workspaces > must match snapshot 1`] = `
{
"name": "workspaces-test",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workspaces-test",
"version": "1.0.0",
"workspaces": [
"workspace-a",
"workspace-b"
]
},
"node_modules/workspace-a": {
"resolved": "workspace-a",
"link": true
},
"node_modules/workspace-b": {
"resolved": "workspace-b",
"link": true
},
"workspace-a": {
"version": "2.0.0"
},
"workspace-b": {
"version": "2.0.0"
}
}
}
`
exports[`test/lib/commands/version.js TAP empty versions workspaces with one arg, all workspaces, saves package.json > must match snapshot 1`] = `
{
"name": "workspaces-test",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workspaces-test",
"version": "1.0.0",
"workspaces": [
"workspace-a",
"workspace-b"
],
"dependencies": {
"workspace-a": "^2.0.0",
"workspace-b": "^2.0.0"
}
},
"node_modules/workspace-a": {
"resolved": "workspace-a",
"link": true
},
"node_modules/workspace-b": {
"resolved": "workspace-b",
"link": true
},
"workspace-a": {
"version": "2.0.0"
},
"workspace-b": {
"version": "2.0.0"
}
}
}
`

View File

@ -0,0 +1,834 @@
/* 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/view.js TAP deprecated package with license, bugs, repository and other fields > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP deprecated package with unicode > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED ⚠️ - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP package from git > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP package in cwd directory > must match snapshot 1`] = `
blue@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.0.tgz
.shasum: 123
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
`
exports[`test/lib/commands/view.js TAP package in cwd non-specific version > must match snapshot 1`] = `
blue@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.0.tgz
.shasum: 123
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
`
exports[`test/lib/commands/view.js TAP package in cwd specific version > must match snapshot 1`] = `
blue@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.0.tgz
.shasum: 123
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
`
exports[`test/lib/commands/view.js TAP package with --json and semver range > must match snapshot 1`] = `
[
{
"_npmUser": "claudia <claudia@cyan.com>",
"name": "cyan",
"dist-tags": {
"latest": "1.0.0"
},
"versions": [
"1.0.0",
"1.0.1"
],
"version": "1.0.0",
"dist": {
"shasum": "123",
"tarball": "http://hm.cyan.com/1.0.0.tgz",
"integrity": "---",
"fileCount": 1,
"unpackedSize": 1000000
}
},
{
"_npmUser": "claudia <claudia@cyan.com>",
"name": "cyan",
"dist-tags": {
"latest": "1.0.0"
},
"versions": [
"1.0.0",
"1.0.1"
]
}
]
`
exports[`test/lib/commands/view.js TAP package with homepage > must match snapshot 1`] = `
orange@1.0.0 | Proprietary | deps: none | versions: 2
http://hm.orange.com
dist
.tarball: http://hm.orange.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1 B
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP package with invalid version > must match snapshot 1`] = `
[ '1.0.0', '1.0.1' ]
`
exports[`test/lib/commands/view.js TAP package with maintainers info as object > must match snapshot 1`] = `
pink@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.pink.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1 B
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP package with more than 25 deps > must match snapshot 1`] = `
black@1.0.0 | Proprietary | deps: 25 | versions: 2
dist
.tarball: http://hm.black.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1 B
dependencies:
0: 1.0.0
10: 1.0.0
11: 1.0.0
12: 1.0.0
13: 1.0.0
14: 1.0.0
15: 1.0.0
16: 1.0.0
17: 1.0.0
18: 1.0.0
19: 1.0.0
1: 1.0.0
20: 1.0.0
21: 1.0.0
22: 1.0.0
23: 1.0.0
2: 1.0.0
3: 1.0.0
4: 1.0.0
5: 1.0.0
6: 1.0.0
7: 1.0.0
8: 1.0.0
9: 1.0.0
(...and 1 more.)
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP package with no modified time > must match snapshot 1`] = `
cyan@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.cyan.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 MB
dist-tags:
latest: 1.0.0
published by claudia <claudia@cyan.com>
`
exports[`test/lib/commands/view.js TAP package with no repo or homepage > must match snapshot 1`] = `
blue@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.0.tgz
.shasum: 123
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
`
exports[`test/lib/commands/view.js TAP package with semver range > must match snapshot 1`] = `
blue@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.0.tgz
.shasum: 123
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
blue@1.0.1 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.blue.com/1.0.1.tgz
.shasum: 124
.integrity: ---
.unpackedSize: 1.0 kB
dist-tags:
latest: 1.0.0
z: 1.0.0
y: 1.0.0
v1: 1.0.0
prev: 1.0.0
d: 1.0.0
c: 1.0.0
b: 1.0.0
a: 1.0.0
x: 1.0.1
next: 1.0.1
h: 1.0.1
(...and 3 more.)
published {TIME} ago
`
exports[`test/lib/commands/view.js TAP package with single version full json > must match snapshot 1`] = `
{
"_id": "single-version",
"name": "single-version",
"dist-tags": {
"latest": "1.0.0"
},
"versions": [
"1.0.0"
],
"version": "1.0.0",
"dist": {
"shasum": "123",
"tarball": "http://hm.single-version.com/1.0.0.tgz",
"fileCount": 1
}
}
`
exports[`test/lib/commands/view.js TAP specific field names array field - 1 element > must match snapshot 1`] = `
claudia
`
exports[`test/lib/commands/view.js TAP specific field names array field - 2 elements > must match snapshot 1`] = `
maintainers[0].name = 'claudia'
maintainers[1].name = 'isaacs'
`
exports[`test/lib/commands/view.js TAP specific field names fields with empty values > must match snapshot 1`] = `
`
exports[`test/lib/commands/view.js TAP specific field names maintainers with email > must match snapshot 1`] = `
maintainers = [
{ name: 'claudia', email: 'c@yellow.com', twitter: 'cyellow' },
{ name: 'isaacs', email: 'i@yellow.com', twitter: 'iyellow' }
]
name = 'yellow'
`
exports[`test/lib/commands/view.js TAP specific field names maintainers with url > must match snapshot 1`] = `
[ 'claudia (http://c.pink.com)', 'isaacs (http://i.pink.com)' ]
`
exports[`test/lib/commands/view.js TAP specific field names nested field with brackets > must match snapshot 1`] = `
123
`
exports[`test/lib/commands/view.js TAP specific field names readme > must match snapshot 1`] = `
a very useful readme
`
exports[`test/lib/commands/view.js TAP specific field names several fields > must match snapshot 1`] = `
name = 'yellow'
version = '1.0.0'
`
exports[`test/lib/commands/view.js TAP specific field names 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/commands/view.js TAP workspaces 404 workspaces basic > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
error code E404
error 404 404
`
exports[`test/lib/commands/view.js TAP workspaces 404 workspaces json > must match snapshot 1`] = `
{
"green": {
"_id": "green",
"name": "green",
"dist-tags": {
"latest": "1.0.0"
},
"maintainers": [
{
"name": "claudia",
"email": "c@yellow.com",
"twitter": "cyellow"
},
{
"name": "isaacs",
"email": "i@yellow.com",
"twitter": "iyellow"
}
],
"keywords": [
"colors",
"green",
"crayola"
],
"versions": [
"1.0.0",
"1.0.1"
],
"version": "1.0.0",
"description": "green is a very important color",
"bugs": {
"url": "http://bugs.green.com"
},
"deprecated": true,
"repository": {
"url": "http://repository.green.com"
},
"license": {
"type": "ACME"
},
"bin": {
"green": "bin/green.js"
},
"dependencies": {
"red": "1.0.0",
"yellow": "1.0.0"
},
"dist": {
"shasum": "123",
"tarball": "http://hm.green.com/1.0.0.tgz",
"integrity": "---",
"fileCount": 1,
"unpackedSize": 1000000000
}
},
"error": {
"missing-package": {
"code": "E404",
"summary": "404",
"detail": ""
}
}
}
`
exports[`test/lib/commands/view.js TAP workspaces 404 workspaces json with package named error > must match snapshot 1`] = `
warn overwriting existing error on json output
{
"error": {
"missing-package": {
"code": "E404",
"summary": "404",
"detail": ""
}
}
}
`
exports[`test/lib/commands/view.js TAP workspaces 404 workspaces non-404 error rejects > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
error Unknown error
`
exports[`test/lib/commands/view.js TAP workspaces 404 workspaces non-404 error rejects with single arg > must match snapshot 1`] = `
green:
1.0.0
unknown-error:
error Unknown error
`
exports[`test/lib/commands/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = `
{
"green": {
"_id": "green",
"name": "green",
"dist-tags": {
"latest": "1.0.0"
},
"maintainers": [
{
"name": "claudia",
"email": "c@yellow.com",
"twitter": "cyellow"
},
{
"name": "isaacs",
"email": "i@yellow.com",
"twitter": "iyellow"
}
],
"keywords": [
"colors",
"green",
"crayola"
],
"versions": [
"1.0.0",
"1.0.1"
],
"version": "1.0.0",
"description": "green is a very important color",
"bugs": {
"url": "http://bugs.green.com"
},
"deprecated": true,
"repository": {
"url": "http://repository.green.com"
},
"license": {
"type": "ACME"
},
"bin": {
"green": "bin/green.js"
},
"dependencies": {
"red": "1.0.0",
"yellow": "1.0.0"
},
"dist": {
"shasum": "123",
"tarball": "http://hm.green.com/1.0.0.tgz",
"integrity": "---",
"fileCount": 1,
"unpackedSize": 1000000000
}
},
"orange": {
"name": "orange",
"dist-tags": {
"latest": "1.0.0"
},
"versions": [
"1.0.0",
"1.0.1"
],
"version": "1.0.0",
"homepage": "http://hm.orange.com",
"license": {},
"dist": {
"shasum": "123",
"tarball": "http://hm.orange.com/1.0.0.tgz",
"integrity": "---",
"fileCount": 1,
"unpackedSize": 1
}
}
}
`
exports[`test/lib/commands/view.js TAP workspaces all workspaces > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
orange@1.0.0 | Proprietary | deps: none | versions: 2
http://hm.orange.com
dist
.tarball: http://hm.orange.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1 B
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/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 > must match snapshot 1`] = `
green:
orange:
`
exports[`test/lib/commands/view.js TAP workspaces all workspaces single field --json > must match snapshot 1`] = `
{
"green": "green",
"orange": "orange"
}
`
exports[`test/lib/commands/view.js TAP workspaces all workspaces single field > must match snapshot 1`] = `
green:
green
orange:
orange
`
exports[`test/lib/commands/view.js TAP workspaces one specific workspace > must match snapshot 1`] = `
green@1.0.0 | ACME | deps: 2 | versions: 2
green is a very important color
DEPRECATED!! - true
keywords: colors, green, crayola
bin: green
dist
.tarball: http://hm.green.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1.0 GB
dependencies:
red: 1.0.0
yellow: 1.0.0
maintainers:
- claudia <c@yellow.com>
- isaacs <i@yellow.com>
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP workspaces remote package name > must match snapshot 1`] = `
pink@1.0.0 | Proprietary | deps: none | versions: 2
dist
.tarball: http://hm.pink.com/1.0.0.tgz
.shasum: 123
.integrity: ---
.unpackedSize: 1 B
dist-tags:
latest: 1.0.0
`
exports[`test/lib/commands/view.js TAP workspaces remote package name > should have warning of ignoring workspaces 1`] = `
Array [
"\\u001b[94mIgnoring workspaces for specified package(s)\\u001b[39m",
]
`
exports[`test/lib/commands/view.js TAP workspaces single workspace --json > must match snapshot 1`] = `
{
"green": {
"_id": "green",
"name": "green",
"dist-tags": {
"latest": "1.0.0"
},
"maintainers": [
{
"name": "claudia",
"email": "c@yellow.com",
"twitter": "cyellow"
},
{
"name": "isaacs",
"email": "i@yellow.com",
"twitter": "iyellow"
}
],
"keywords": [
"colors",
"green",
"crayola"
],
"versions": [
"1.0.0",
"1.0.1"
],
"version": "1.0.0",
"description": "green is a very important color",
"bugs": {
"url": "http://bugs.green.com"
},
"deprecated": true,
"repository": {
"url": "http://repository.green.com"
},
"license": {
"type": "ACME"
},
"bin": {
"green": "bin/green.js"
},
"dependencies": {
"red": "1.0.0",
"yellow": "1.0.0"
},
"dist": {
"shasum": "123",
"tarball": "http://hm.green.com/1.0.0.tgz",
"integrity": "---",
"fileCount": 1,
"unpackedSize": 1000000000
}
}
}
`

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,464 @@
/* 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/npm.js TAP npm.load workspace-aware configs and commands > should exec workspaces version of commands 1`] = `
Lifecycle scripts included in a@1.0.0:
test
echo test a
Lifecycle scripts included in b@1.0.0:
test
echo test b
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 0 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, init, install, install-ci-test, install-test,
link, ll, login, logout, ls, org, outdated, owner, pack,
ping, pkg, prefix, profile, prune, publish, query, rebuild,
repo, restart, root, run-script, sbom, search, set,
shrinkwrap, star, stars, start, stop, team, test, token,
undeprecate, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 1 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser,
audit, bugs, cache, ci,
completion, config,
dedupe, deprecate, diff,
dist-tag, docs, doctor,
edit, exec, explain,
explore, find-dupes,
fund, get, help,
help-search, init,
install,
install-ci-test,
install-test, link, ll,
login, logout, ls, org,
outdated, owner, pack,
ping, pkg, prefix,
profile, prune, publish,
query, rebuild, repo,
restart, root,
run-script, sbom,
search, set, shrinkwrap,
star, stars, start,
stop, team, test, token,
undeprecate, uninstall,
unpublish, unstar,
update, version, view,
whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 10 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser,
audit, bugs, cache, ci,
completion, config,
dedupe, deprecate, diff,
dist-tag, docs, doctor,
edit, exec, explain,
explore, find-dupes,
fund, get, help,
help-search, init,
install,
install-ci-test,
install-test, link, ll,
login, logout, ls, org,
outdated, owner, pack,
ping, pkg, prefix,
profile, prune, publish,
query, rebuild, repo,
restart, root,
run-script, sbom,
search, set, shrinkwrap,
star, stars, start,
stop, team, test, token,
undeprecate, uninstall,
unpublish, unstar,
update, version, view,
whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 100 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, init, install, install-ci-test, install-test,
link, ll, login, logout, ls, org, outdated, owner, pack,
ping, pkg, prefix, profile, prune, publish, query, rebuild,
repo, restart, root, run-script, sbom, search, set,
shrinkwrap, star, stars, start, stop, team, test, token,
undeprecate, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 24 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser,
audit, bugs, cache, ci,
completion, config,
dedupe, deprecate, diff,
dist-tag, docs, doctor,
edit, exec, explain,
explore, find-dupes,
fund, get, help,
help-search, init,
install,
install-ci-test,
install-test, link, ll,
login, logout, ls, org,
outdated, owner, pack,
ping, pkg, prefix,
profile, prune, publish,
query, rebuild, repo,
restart, root,
run-script, sbom,
search, set, shrinkwrap,
star, stars, start,
stop, team, test, token,
undeprecate, uninstall,
unpublish, unstar,
update, version, view,
whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 40 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser,
audit, bugs, cache, ci,
completion, config,
dedupe, deprecate, diff,
dist-tag, docs, doctor,
edit, exec, explain,
explore, find-dupes,
fund, get, help,
help-search, init,
install,
install-ci-test,
install-test, link, ll,
login, logout, ls, org,
outdated, owner, pack,
ping, pkg, prefix,
profile, prune, publish,
query, rebuild, repo,
restart, root,
run-script, sbom,
search, set, shrinkwrap,
star, stars, start,
stop, team, test, token,
undeprecate, uninstall,
unpublish, unstar,
update, version, view,
whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 41 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit,
bugs, cache, ci,
completion, config,
dedupe, deprecate, diff,
dist-tag, docs, doctor,
edit, exec, explain,
explore, find-dupes,
fund, get, help,
help-search, init,
install, install-ci-test,
install-test, link, ll,
login, logout, ls, org,
outdated, owner, pack,
ping, pkg, prefix,
profile, prune, publish,
query, rebuild, repo,
restart, root,
run-script, sbom, search,
set, shrinkwrap, star,
stars, start, stop, team,
test, token, undeprecate,
uninstall, unpublish,
unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 75 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, init, install, install-ci-test, install-test,
link, ll, login, logout, ls, org, outdated, owner, pack,
ping, pkg, prefix, profile, prune, publish, query, rebuild,
repo, restart, root, run-script, sbom, search, set,
shrinkwrap, star, stars, start, stop, team, test, token,
undeprecate, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 76 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, init, install, install-ci-test, install-test,
link, ll, login, logout, ls, org, outdated, owner, pack,
ping, pkg, prefix, profile, prune, publish, query, rebuild,
repo, restart, root, run-script, sbom, search, set,
shrinkwrap, star, stars, start, stop, team, test, token,
undeprecate, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`
exports[`test/lib/npm.js TAP usage set process.stdout.columns column width 90 > must match snapshot 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, init, install, install-ci-test, install-test,
link, ll, login, logout, ls, org, outdated, owner, pack,
ping, pkg, prefix, profile, prune, publish, query, rebuild,
repo, restart, root, run-script, sbom, search, set,
shrinkwrap, star, stars, start, stop, team, test, token,
undeprecate, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
{USERCONFIG}
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm@{VERSION} {NPMROOT}
`

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,249 @@
/* 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/utils/explain-dep.js TAP basic > ellipses test one 1`] = `
manydep@1.0.0
manydep@"1.0.0" from prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
7 more (optdep, extra-neos, deep-dev, peer, the root project, ...)
`
exports[`test/lib/utils/explain-dep.js TAP basic > ellipses test two 1`] = `
manydep@1.0.0
manydep@"1.0.0" from prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
6 more (optdep, extra-neos, deep-dev, peer, the root project, a package with a pretty long name)
`
exports[`test/lib/utils/explain-dep.js TAP basic bundled > explain color deep 1`] = `
bundle-of-joy@1.0.0 bundled
node_modules/bundle-of-joy
bundled prod-dep@"1.x" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic bundled > explain nocolor shallow 1`] = `
bundle-of-joy@1.0.0 bundled
node_modules/bundle-of-joy
bundled prod-dep@"1.x" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic bundled > print color 1`] = `
bundle-of-joy@1.0.0 bundled
node_modules/bundle-of-joy
`
exports[`test/lib/utils/explain-dep.js TAP basic bundled > print nocolor 1`] = `
bundle-of-joy@1.0.0 bundled
node_modules/bundle-of-joy
`
exports[`test/lib/utils/explain-dep.js TAP basic deepDev > explain color deep 1`] = `
deep-dev@2.3.4 dev
node_modules/deep-dev
deep-dev@"2.x" from metadev@3.4.5
node_modules/dev/node_modules/metadev
metadev@"3.x" from topdev@4.5.6
node_modules/topdev
dev topdev@"4.x" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic deepDev > explain nocolor shallow 1`] = `
deep-dev@2.3.4 dev
node_modules/deep-dev
deep-dev@"2.x" from metadev@3.4.5
node_modules/dev/node_modules/metadev
metadev@"3.x" from topdev@4.5.6
node_modules/topdev
`
exports[`test/lib/utils/explain-dep.js TAP basic deepDev > print color 1`] = `
deep-dev@2.3.4 dev
node_modules/deep-dev
`
exports[`test/lib/utils/explain-dep.js TAP basic deepDev > print nocolor 1`] = `
deep-dev@2.3.4 dev
node_modules/deep-dev
`
exports[`test/lib/utils/explain-dep.js TAP basic extraneous > explain color deep 1`] = `
extra-neos@1337.420.69-lol extraneous
node_modules/extra-neos
`
exports[`test/lib/utils/explain-dep.js TAP basic extraneous > explain nocolor shallow 1`] = `
extra-neos@1337.420.69-lol extraneous
node_modules/extra-neos
`
exports[`test/lib/utils/explain-dep.js TAP basic extraneous > print color 1`] = `
extra-neos@1337.420.69-lol extraneous
node_modules/extra-neos
`
exports[`test/lib/utils/explain-dep.js TAP basic extraneous > print nocolor 1`] = `
extra-neos@1337.420.69-lol extraneous
node_modules/extra-neos
`
exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > explain color deep 1`] = `
manydep@1.0.0
manydep@"1.0.0" from prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
optional manydep@"1.x" from optdep@1.0.0 optional
node_modules/optdep
optional optdep@"1.0.0" from the root project
manydep@"1.0.x" from extra-neos@1337.420.69-lol extraneous
node_modules/extra-neos
dev manydep@"*" from deep-dev@2.3.4 dev
node_modules/deep-dev
deep-dev@"2.x" from metadev@3.4.5
node_modules/dev/node_modules/metadev
metadev@"3.x" from topdev@4.5.6
node_modules/topdev
dev topdev@"4.x" from the root project
peer manydep@">1.0.0-beta <1.0.1" from peer@1.0.0 peer
node_modules/peer
peer peer@"1.0.0" from the root project
manydep@">1.0.0-beta <1.0.1" from the root project
manydep@"1" from a package with a pretty long name@1.2.3
manydep@"1" from another package with a pretty long name@1.2.3
manydep@"1" from yet another a package with a pretty long name@1.2.3
`
exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > explain nocolor shallow 1`] = `
manydep@1.0.0
manydep@"1.0.0" from prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
8 more (optdep, extra-neos, deep-dev, peer, the root project, ...)
`
exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > print color 1`] = `
manydep@1.0.0
`
exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > print nocolor 1`] = `
manydep@1.0.0
`
exports[`test/lib/utils/explain-dep.js TAP basic optional > explain color deep 1`] = `
optdep@1.0.0 optional
node_modules/optdep
optional optdep@"1.0.0" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic optional > explain nocolor shallow 1`] = `
optdep@1.0.0 optional
node_modules/optdep
optional optdep@"1.0.0" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic optional > print color 1`] = `
optdep@1.0.0 optional
node_modules/optdep
`
exports[`test/lib/utils/explain-dep.js TAP basic optional > print nocolor 1`] = `
optdep@1.0.0 optional
node_modules/optdep
`
exports[`test/lib/utils/explain-dep.js TAP basic overridden > explain color deep 1`] = `
overridden-root@1.0.0 overridden
node_modules/overridden-root
overridden overridden-dep@"1.0.0" (was "^2.0.0") from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic overridden > explain nocolor shallow 1`] = `
overridden-root@1.0.0 overridden
node_modules/overridden-root
overridden overridden-dep@"1.0.0" (was "^2.0.0") from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic overridden > print color 1`] = `
overridden-root@1.0.0 overridden
node_modules/overridden-root
`
exports[`test/lib/utils/explain-dep.js TAP basic overridden > print nocolor 1`] = `
overridden-root@1.0.0 overridden
node_modules/overridden-root
`
exports[`test/lib/utils/explain-dep.js TAP basic peer > explain color deep 1`] = `
peer@1.0.0 peer
node_modules/peer
peer peer@"1.0.0" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic peer > explain nocolor shallow 1`] = `
peer@1.0.0 peer
node_modules/peer
peer peer@"1.0.0" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic peer > print color 1`] = `
peer@1.0.0 peer
node_modules/peer
`
exports[`test/lib/utils/explain-dep.js TAP basic peer > print nocolor 1`] = `
peer@1.0.0 peer
node_modules/peer
`
exports[`test/lib/utils/explain-dep.js TAP basic prodDep > explain color deep 1`] = `
prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic prodDep > explain nocolor shallow 1`] = `
prod-dep@1.2.3
node_modules/prod-dep
prod-dep@"1.x" from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic prodDep > print color 1`] = `
prod-dep@1.2.3
node_modules/prod-dep
`
exports[`test/lib/utils/explain-dep.js TAP basic prodDep > print nocolor 1`] = `
prod-dep@1.2.3
node_modules/prod-dep
`
exports[`test/lib/utils/explain-dep.js TAP basic workspaces > explain color deep 1`] = `
a@1.0.0
a
a@1.0.0
node_modules/a
workspace a from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic workspaces > explain nocolor shallow 1`] = `
a@1.0.0
a
a@1.0.0
node_modules/a
workspace a from the root project
`
exports[`test/lib/utils/explain-dep.js TAP basic workspaces > print color 1`] = `
a@1.0.0
a
`
exports[`test/lib/utils/explain-dep.js TAP basic workspaces > print nocolor 1`] = `
a@1.0.0
a
`

View File

@ -0,0 +1,655 @@
/* 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/utils/explain-eresolve.js TAP basic chain-conflict > explain with color, depth of 2 1`] = `
While resolving: project@1.2.3
Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-d
@isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project
Could not resolve dependency:
peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-c
@isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic chain-conflict > explain with no color, depth of 6 1`] = `
While resolving: project@1.2.3
Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-d
@isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project
Could not resolve dependency:
peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-c
@isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic chain-conflict > report from color 1`] = `
# npm resolution error report
While resolving: project@1.2.3
Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-d
@isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project
Could not resolve dependency:
peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-c
@isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic chain-conflict > report with color 1`] = `
While resolving: project@1.2.3
Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-d
@isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project
Could not resolve dependency:
peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-c
@isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic chain-conflict > report with no color 1`] = `
While resolving: project@1.2.3
Found: @isaacs/testing-peer-dep-conflict-chain-d@2.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-d
@isaacs/testing-peer-dep-conflict-chain-d@"2" from the root project
Could not resolve dependency:
peer @isaacs/testing-peer-dep-conflict-chain-d@"1" from @isaacs/testing-peer-dep-conflict-chain-c@1.0.0
node_modules/@isaacs/testing-peer-dep-conflict-chain-c
@isaacs/testing-peer-dep-conflict-chain-c@"1" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic cycleNested > explain with color, depth of 2 1`] = `
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0
node_modules/@isaacs/peer-dep-cycle-c
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
`
exports[`test/lib/utils/explain-eresolve.js TAP basic cycleNested > explain with no color, depth of 6 1`] = `
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0
node_modules/@isaacs/peer-dep-cycle-c
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic cycleNested > report from color 1`] = `
# npm resolution error report
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0
node_modules/@isaacs/peer-dep-cycle-c
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic cycleNested > report with color 1`] = `
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0
node_modules/@isaacs/peer-dep-cycle-c
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic cycleNested > report with no color 1`] = `
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0
node_modules/@isaacs/peer-dep-cycle-c
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic eslint-plugin case > explain with color, depth of 2 1`] = `
While resolving: eslint-plugin-react@7.24.0
Found: eslint@6.8.0
node_modules/eslint
dev eslint@"^3 || ^4 || ^5 || ^6 || ^7" from the root project
3 more (@typescript-eslint/parser, ...)
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Conflicting peer dependency: eslint@7.31.0
node_modules/eslint
peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic eslint-plugin case > explain with no color, depth of 6 1`] = `
While resolving: eslint-plugin-react@7.24.0
Found: eslint@6.8.0
node_modules/eslint
dev eslint@"^3 || ^4 || ^5 || ^6 || ^7" from the root project
peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
node_modules/@typescript-eslint/parser
dev @typescript-eslint/parser@"^2.34.0" from the root project
peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
node_modules/eslint-config-airbnb-base
dev eslint-config-airbnb-base@"^14.2.1" from the root project
1 more (eslint-plugin-import)
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Conflicting peer dependency: eslint@7.31.0
node_modules/eslint
peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic eslint-plugin case > report from color 1`] = `
# npm resolution error report
While resolving: eslint-plugin-react@7.24.0
Found: eslint@6.8.0
node_modules/eslint
dev eslint@"^3 || ^4 || ^5 || ^6 || ^7" from the root project
peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
node_modules/@typescript-eslint/parser
dev @typescript-eslint/parser@"^2.34.0" from the root project
peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
node_modules/eslint-config-airbnb-base
dev eslint-config-airbnb-base@"^14.2.1" from the root project
peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" from eslint-plugin-import@2.23.4
node_modules/eslint-plugin-import
dev eslint-plugin-import@"^2.23.4" from the root project
peer eslint-plugin-import@"^2.22.1" from eslint-config-airbnb-base@14.2.1
node_modules/eslint-config-airbnb-base
dev eslint-config-airbnb-base@"^14.2.1" from the root project
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Conflicting peer dependency: eslint@7.31.0
node_modules/eslint
peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic eslint-plugin case > report with color 1`] = `
While resolving: eslint-plugin-react@7.24.0
Found: eslint@6.8.0
node_modules/eslint
dev eslint@"^3 || ^4 || ^5 || ^6 || ^7" from the root project
peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
node_modules/@typescript-eslint/parser
dev @typescript-eslint/parser@"^2.34.0" from the root project
2 more (eslint-config-airbnb-base, eslint-plugin-import)
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Conflicting peer dependency: eslint@7.31.0
node_modules/eslint
peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic eslint-plugin case > report with no color 1`] = `
While resolving: eslint-plugin-react@7.24.0
Found: eslint@6.8.0
node_modules/eslint
dev eslint@"^3 || ^4 || ^5 || ^6 || ^7" from the root project
peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
node_modules/@typescript-eslint/parser
dev @typescript-eslint/parser@"^2.34.0" from the root project
2 more (eslint-config-airbnb-base, eslint-plugin-import)
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Conflicting peer dependency: eslint@7.31.0
node_modules/eslint
peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic gatsby > explain with color, depth of 2 1`] = `
While resolving: gatsby-recipes@0.2.31
Found: ink@3.0.0-7
node_modules/ink
dev ink@"next" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
Could not resolve dependency:
peer ink@">=2.0.0" from ink-box@1.0.0
node_modules/ink-box
ink-box@"^1.0.0" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
`
exports[`test/lib/utils/explain-eresolve.js TAP basic gatsby > explain with no color, depth of 6 1`] = `
While resolving: gatsby-recipes@0.2.31
Found: ink@3.0.0-7
node_modules/ink
dev ink@"next" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
Could not resolve dependency:
peer ink@">=2.0.0" from ink-box@1.0.0
node_modules/ink-box
ink-box@"^1.0.0" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic gatsby > report from color 1`] = `
# npm resolution error report
While resolving: gatsby-recipes@0.2.31
Found: ink@3.0.0-7
node_modules/ink
dev ink@"next" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
Could not resolve dependency:
peer ink@">=2.0.0" from ink-box@1.0.0
node_modules/ink-box
ink-box@"^1.0.0" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic gatsby > report with color 1`] = `
While resolving: gatsby-recipes@0.2.31
Found: ink@3.0.0-7
node_modules/ink
dev ink@"next" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
Could not resolve dependency:
peer ink@">=2.0.0" from ink-box@1.0.0
node_modules/ink-box
ink-box@"^1.0.0" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic gatsby > report with no color 1`] = `
While resolving: gatsby-recipes@0.2.31
Found: ink@3.0.0-7
node_modules/ink
dev ink@"next" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
gatsby@"" from the root project
Could not resolve dependency:
peer ink@">=2.0.0" from ink-box@1.0.0
node_modules/ink-box
ink-box@"^1.0.0" from gatsby-recipes@0.2.31
node_modules/gatsby-recipes
gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107
node_modules/gatsby-cli
gatsby-cli@"^2.12.107" from gatsby@2.24.74
node_modules/gatsby
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, but has current edge > explain with color, depth of 2 1`] = `
While resolving: eslint@7.22.0
Found: dev eslint@"file:." from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, but has current edge > explain with no color, depth of 6 1`] = `
While resolving: eslint@7.22.0
Found: dev eslint@"file:." from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, but has current edge > report from color 1`] = `
# npm resolution error report
While resolving: eslint@7.22.0
Found: dev eslint@"file:." from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, but has current edge > report with color 1`] = `
While resolving: eslint@7.22.0
Found: dev eslint@"file:." from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, but has current edge > report with no color 1`] = `
While resolving: eslint@7.22.0
Found: dev eslint@"file:." from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, no current edge, idk > explain with color, depth of 2 1`] = `
While resolving: eslint@7.22.0
Found: peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, no current edge, idk > explain with no color, depth of 6 1`] = `
While resolving: eslint@7.22.0
Found: peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, no current edge, idk > report from color 1`] = `
# npm resolution error report
While resolving: eslint@7.22.0
Found: peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, no current edge, idk > report with color 1`] = `
While resolving: eslint@7.22.0
Found: peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic no current node, no current edge, idk > report with no color 1`] = `
While resolving: eslint@7.22.0
Found: peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Could not resolve dependency:
peer eslint@"^6.0.0" from eslint-plugin-jsdoc@22.2.0
node_modules/eslint-plugin-jsdoc
dev eslint-plugin-jsdoc@"^22.1.0" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic withShrinkwrap > explain with color, depth of 2 1`] = `
While resolving: @isaacs/peer-dep-cycle-b@1.0.0
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
`
exports[`test/lib/utils/explain-eresolve.js TAP basic withShrinkwrap > explain with no color, depth of 6 1`] = `
While resolving: @isaacs/peer-dep-cycle-b@1.0.0
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
`
exports[`test/lib/utils/explain-eresolve.js TAP basic withShrinkwrap > report from color 1`] = `
# npm resolution error report
While resolving: @isaacs/peer-dep-cycle-b@1.0.0
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic withShrinkwrap > report with color 1`] = `
While resolving: @isaacs/peer-dep-cycle-b@1.0.0
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`
exports[`test/lib/utils/explain-eresolve.js TAP basic withShrinkwrap > report with no color 1`] = `
While resolving: @isaacs/peer-dep-cycle-b@1.0.0
Found: @isaacs/peer-dep-cycle-c@2.0.0
node_modules/@isaacs/peer-dep-cycle-c
@isaacs/peer-dep-cycle-c@"2.x" from the root project
Could not resolve dependency:
peer @isaacs/peer-dep-cycle-c@"1" from @isaacs/peer-dep-cycle-b@1.0.0
node_modules/@isaacs/peer-dep-cycle-b
peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0
node_modules/@isaacs/peer-dep-cycle-a
@isaacs/peer-dep-cycle-a@"1.x" from the root project
Fix the upstream dependency conflict, or retry
this command with --no-strict-peer-deps, --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
`

View File

@ -0,0 +1,71 @@
/* 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/utils/log-file.js TAP snapshot > must match snapshot 1`] = `
0 verbose logfile logs-max:10 dir:{CWD}/{DATE}-
1 verbose logfile {CWD}/{DATE}-debug-0.log
2 silly logfile done cleaning log files
3 error no prefix
4 error prefix with prefix
5 error prefix 1 2 3
6 verbose { obj: { with: { many: [Object] } } }
7 verbose {"obj":{"with":{"many":{"props":1}}}}
8 verbose {
8 verbose "obj": {
8 verbose "with": {
8 verbose "many": {
8 verbose "props": 1
8 verbose }
8 verbose }
8 verbose }
8 verbose }
9 verbose [ 'test', 'with', 'an', 'array' ]
10 verbose ["test","with","an","array"]
11 verbose [
11 verbose "test",
11 verbose "with",
11 verbose "an",
11 verbose "array"
11 verbose ]
12 verbose [ 'test', [ 'with', [ 'an', [Array] ] ] ]
13 verbose ["test",["with",["an",["array"]]]]
14 verbose [
14 verbose "test",
14 verbose [
14 verbose "with",
14 verbose [
14 verbose "an",
14 verbose [
14 verbose "array"
14 verbose ]
14 verbose ]
14 verbose ]
14 verbose ]
15 error pre has many errors Error: message
15 error pre at stack trace line 0
15 error pre at stack trace line 1
15 error pre at stack trace line 2
15 error pre at stack trace line 3
15 error pre at stack trace line 4
15 error pre at stack trace line 5
15 error pre at stack trace line 6
15 error pre at stack trace line 7
15 error pre at stack trace line 8
15 error pre at stack trace line 9 Error: message2
15 error pre at stack trace line 0
15 error pre at stack trace line 1
15 error pre at stack trace line 2
15 error pre at stack trace line 3
15 error pre at stack trace line 4
15 error pre at stack trace line 5
15 error pre at stack trace line 6
15 error pre at stack trace line 7
15 error pre at stack trace line 8
15 error pre at stack trace line 9
16 error nostack [Error: message]
`

View File

@ -0,0 +1,43 @@
/* 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/utils/open-url.js TAP open url prints where to go when browser is disabled > printed expected message 1`] = `
npm home:
https://www.npmjs.com
`
exports[`test/lib/utils/open-url.js TAP open url prints where to go when browser is disabled and json is enabled > printed expected message 1`] = `
{
"title": "npm home",
"url": "https://www.npmjs.com"
}
`
exports[`test/lib/utils/open-url.js TAP open url prints where to go when given browser does not exist > printed expected message 1`] = `
npm home:
https://www.npmjs.com
`
exports[`test/lib/utils/open-url.js TAP open url prompt does not error when opener can not find command > Outputs extra Browser unavailable message and url 1`] = `
npm home:
https://www.npmjs.com
Browser unavailable. Please open the URL manually:
https://www.npmjs.com
`
exports[`test/lib/utils/open-url.js TAP open url prompt opens a url > must match snapshot 1`] = `
npm home:
https://www.npmjs.com
`
exports[`test/lib/utils/open-url.js TAP open url prompt prints json output > must match snapshot 1`] = `
{
"title": "npm home",
"url": "https://www.npmjs.com"
}
`

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,730 @@
/* 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/utils/sbom-spdx.js TAP node - with deps > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
},
{
"name": "dep1",
"SPDXID": "SPDXRef-Package-dep1-0.0.1",
"versionInfo": "0.0.1",
"packageFileName": "node_modules/dep1",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep1@0.0.1"
}
]
},
{
"name": "dep2",
"SPDXID": "SPDXRef-Package-dep2-0.0.2",
"versionInfo": "0.0.2",
"packageFileName": "node_modules/dep2",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep2@0.0.2"
}
]
},
{
"name": "dep3",
"SPDXID": "SPDXRef-Package-dep3-0.0.3",
"versionInfo": "0.0.3",
"packageFileName": "node_modules/dep3",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep3@0.0.3"
}
]
},
{
"name": "dep4",
"SPDXID": "SPDXRef-Package-dep4-0.0.4",
"versionInfo": "0.0.4",
"packageFileName": "node_modules/dep4",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep4@0.0.4"
}
]
},
{
"name": "dep5",
"SPDXID": "SPDXRef-Package-dep5-0.0.5",
"versionInfo": "0.0.5",
"packageFileName": "node_modules/dep5",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep5@0.0.5"
}
]
},
{
"name": "dep6",
"SPDXID": "SPDXRef-Package-dep6-0.0.6",
"versionInfo": "0.0.6",
"packageFileName": "node_modules/dep6",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep6@0.0.6"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
},
{
"spdxElementId": "SPDXRef-Package-dep1-0.0.1",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "PREREQUISITE_FOR"
},
{
"spdxElementId": "SPDXRef-Package-dep2-0.0.2",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "OPTIONAL_DEPENDENCY_OF"
},
{
"spdxElementId": "SPDXRef-Package-dep3-0.0.3",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DEV_DEPENDENCY_OF"
},
{
"spdxElementId": "SPDXRef-Package-dep4-0.0.4",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DEPENDENCY_OF"
},
{
"spdxElementId": "SPDXRef-Package-dep5-0.0.5",
"relatedSpdxElement": "SPDXRef-Package-dep4-0.0.4",
"relationshipType": "DEPENDENCY_OF"
},
{
"spdxElementId": "SPDXRef-Package-dep6-0.0.6",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "OPTIONAL_DEPENDENCY_OF"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP node - with duplicate deps > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
},
{
"name": "dep1",
"SPDXID": "SPDXRef-Package-dep1-0.0.1",
"versionInfo": "0.0.1",
"packageFileName": "node_modules/dep1",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep1@0.0.1"
}
]
},
{
"name": "dep2",
"SPDXID": "SPDXRef-Package-dep2-0.0.2",
"versionInfo": "0.0.2",
"packageFileName": "node_modules/dep2",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/dep2@0.0.2"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
},
{
"spdxElementId": "SPDXRef-Package-dep1-0.0.1",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DEPENDENCY_OF"
},
{
"spdxElementId": "SPDXRef-Package-dep2-0.0.2",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DEPENDENCY_OF"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - application package type > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"primaryPackagePurpose": "APPLICATION",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - from git url > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "https://github.com/foo/bar#1234",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0?vcs_url=https://github.com/foo/bar#1234"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - linked > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with description > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"description": "Package description",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with distribution url > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "https://registry.npmjs.org/root/-/root-1.0.0.tgz",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with homepage > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "https://foo.bar/README.md",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with integrity > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
],
"checksums": [
{
"algorithm": "SHA512",
"checksumValue": "d5191b14650a7b1e25bec07dca121f5a5b493397192947ed07678d6a3683bf7742304a78f62046d0ad78b87f0d9d7f483eec76fa62bb24610e0748e7e3cfc9eb"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with license expression > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "(MIT OR Apache-2.0)",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with license object > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "MIT",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`
exports[`test/lib/utils/sbom-spdx.js TAP single node - with single license > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "root@1.0.0",
"documentNamespace": "docns",
"creationInfo": {
"created": "2020-01-01T00:00:00.000Z",
"creators": [
"Tool: npm/cli-10.0.0 "
]
},
"documentDescribes": [
"SPDXRef-Package-root-1.0.0"
],
"packages": [
{
"name": "root",
"SPDXID": "SPDXRef-Package-root-1.0.0",
"versionInfo": "1.0.0",
"packageFileName": "",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"homepage": "NOASSERTION",
"licenseDeclared": "ISC",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": "pkg:npm/root@1.0.0"
}
]
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relatedSpdxElement": "SPDXRef-Package-root-1.0.0",
"relationshipType": "DESCRIBES"
}
]
}
`

View File

@ -0,0 +1,86 @@
/* 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/utils/tar.js TAP should log tarball contents > must match snapshot 1`] = `
package: my-cool-pkg@1.0.0
Tarball Contents
4B cat
4B chai
4B dog
114B package.json
Bundled Dependencies
bundle-dep
Tarball Details
name: my-cool-pkg
version: 1.0.0
filename: my-cool-pkg-1.0.0.tgz
package size: {size}
unpacked size: 126 B
shasum: {sha}
integrity: {integrity}
bundled deps: 1
bundled files: 0
own files: 5
total files: 5
`
exports[`test/lib/utils/tar.js TAP should log tarball contents of a scoped package > must match snapshot 1`] = `
package: @myscope/my-cool-pkg@1.0.0
Tarball Contents
4B cat
4B chai
4B dog
123B package.json
Bundled Dependencies
bundle-dep
Tarball Details
name: @myscope/my-cool-pkg
version: 1.0.0
filename: myscope-my-cool-pkg-1.0.0.tgz
package size: {size}
unpacked size: 135 B
shasum: {sha}
integrity: {integrity}
bundled deps: 1
bundled files: 0
own files: 5
total files: 5
`

View File

@ -0,0 +1,35 @@
/* 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/utils/validate-lockfile.js TAP extra inventory items on idealTree > should have missing entries error 1`] = `
Array [
"Missing: baz@3.0.0 from lock file",
]
`
exports[`test/lib/utils/validate-lockfile.js TAP extra inventory items on virtualTree > should have no errors if finding virtualTree extra items 1`] = `
Array []
`
exports[`test/lib/utils/validate-lockfile.js TAP identical inventory for both idealTree and virtualTree > should have no errors on identical inventories 1`] = `
Array []
`
exports[`test/lib/utils/validate-lockfile.js TAP mismatching versions on inventory > should have errors for each mismatching version 1`] = `
Array [
"Invalid: lock file's foo@1.0.0 does not satisfy foo@2.0.0",
"Invalid: lock file's bar@2.0.0 does not satisfy bar@3.0.0",
]
`
exports[`test/lib/utils/validate-lockfile.js TAP missing virtualTree inventory > should have errors for each mismatching version 1`] = `
Array [
"Missing: foo@1.0.0 from lock file",
"Missing: bar@2.0.0 from lock file",
"Missing: baz@3.0.0 from lock file",
]
`