diff --git a/lib/commands/audit.js b/lib/commands/audit.js index 0ec4eec44a77e..7eada9f617e70 100644 --- a/lib/commands/audit.js +++ b/lib/commands/audit.js @@ -104,7 +104,7 @@ class VerifySignatures { } if (missing.length) { - const missingClr = this.npm.chalk.bold(this.npm.chalk.red('missing')) + const missingClr = this.npm.chalk.redBright('missing') if (missing.length === 1) { /* eslint-disable-next-line max-len */ output.standard(`1 package has a ${missingClr} registry signature but the registry is providing signing keys:`) @@ -122,7 +122,7 @@ class VerifySignatures { if (missing.length) { output.standard('') } - const invalidClr = this.npm.chalk.bold(this.npm.chalk.red('invalid')) + const invalidClr = this.npm.chalk.redBright('invalid') // We can have either invalid signatures or invalid provenance const invalidSignatures = this.invalid.filter(i => i.code === 'EINTEGRITYSIGNATURE') if (invalidSignatures.length) { diff --git a/lib/commands/doctor.js b/lib/commands/doctor.js index e3177f7a45544..f74fe2ecbcc7e 100644 --- a/lib/commands/doctor.js +++ b/lib/commands/doctor.js @@ -135,7 +135,7 @@ class Doctor extends BaseCommand { allOk = false item[0] = this.npm.chalk.red(item[0]) item[1] = this.npm.chalk.red('not ok') - item[2] = this.npm.chalk.magenta(String(item[2])) + item[2] = this.npm.chalk.cyan(String(item[2])) } else { item[1] = this.npm.chalk.green('ok') } diff --git a/lib/commands/fund.js b/lib/commands/fund.js index aa8c7b17b48b6..6fa2c467a35eb 100644 --- a/lib/commands/fund.js +++ b/lib/commands/fund.js @@ -111,26 +111,25 @@ class Fund extends ArboristWorkspaceCmd { const [fundingSource] = [].concat(normalizeFunding(funding)).filter(isValidFunding) const { url } = fundingSource || {} const pkgRef = getPrintableName({ name, version }) - let item = { - label: pkgRef, - } - if (url) { - item.label = tree({ - label: this.npm.chalk.bgBlack.white(url), + if (!url) { + return { label: pkgRef } + } + let item + if (seenUrls.has(url)) { + item = seenUrls.get(url) + item.label += `${this.npm.chalk.dim(',')} ${pkgRef}` + return null + } + item = { + label: tree({ + label: this.npm.chalk.blue(url), nodes: [pkgRef], - }).trim() - - // stacks all packages together under the same item - if (seenUrls.has(url)) { - item = seenUrls.get(url) - item.label += `, ${pkgRef}` - return null - } else { - seenUrls.set(url, item) - } + }).trim(), } + // stacks all packages together under the same item + seenUrls.set(url, item) return item }, @@ -154,7 +153,7 @@ class Fund extends ArboristWorkspaceCmd { }) const res = tree(result) - return this.npm.chalk.reset(res) + return res } async openFundingUrl ({ path, tree, spec, fundingSourceNumber }) { diff --git a/lib/commands/help-search.js b/lib/commands/help-search.js index c3719d48f2f5a..e71ffe4aee288 100644 --- a/lib/commands/help-search.js +++ b/lib/commands/help-search.js @@ -170,8 +170,7 @@ class HelpSearch extends BaseCommand { for (const f of finder) { hilitLine.push(line.slice(p, p + f.length)) const word = line.slice(p + f.length, p + f.length + arg.length) - const hilit = this.npm.chalk.bgBlack.red(word) - hilitLine.push(hilit) + hilitLine.push(this.npm.chalk.blue(word)) p += f.length + arg.length } } diff --git a/lib/commands/ls.js b/lib/commands/ls.js index ff954dec49cc7..a81e69fe40e89 100644 --- a/lib/commands/ls.js +++ b/lib/commands/ls.js @@ -280,7 +280,7 @@ const augmentItemWithIncludeMetadata = (node, item) => { const getHumanOutputItem = (node, { args, chalk, global, long }) => { const { pkgid, path } = node - const workspacePkgId = chalk.green(pkgid) + const workspacePkgId = chalk.blueBright(pkgid) let printable = node.isWorkspace ? workspacePkgId : pkgid // special formatting for top-level package name @@ -293,10 +293,12 @@ const getHumanOutputItem = (node, { args, chalk, global, long }) => { } } + // TODO there is a LOT of overlap with lib/utils/explain-dep.js here + const highlightDepName = args.length && node[_filteredBy] const missingColor = isOptional(node) - ? chalk.yellow.bgBlack - : chalk.red.bgBlack + ? chalk.yellow + : chalk.red const missingMsg = `UNMET ${isOptional(node) ? 'OPTIONAL ' : ''}DEPENDENCY` const targetLocation = node.root ? relative(node.root.realpath, node.realpath) @@ -310,25 +312,25 @@ const getHumanOutputItem = (node, { args, chalk, global, long }) => { ? missingColor(missingMsg) + ' ' : '' ) + - `${highlightDepName ? chalk.yellow.bgBlack(printable) : printable}` + + `${highlightDepName ? chalk.yellow(printable) : printable}` + ( node[_dedupe] - ? ' ' + chalk.gray('deduped') + ? ' ' + chalk.dim('deduped') : '' ) + ( invalid - ? ' ' + chalk.red.bgBlack(invalid) + ? ' ' + chalk.red(invalid) : '' ) + ( isExtraneous(node, { global }) - ? ' ' + chalk.green.bgBlack('extraneous') + ? ' ' + chalk.red('extraneous') : '' ) + ( node.overridden - ? ' ' + chalk.gray('overridden') + ? ' ' + chalk.dim('overridden') : '' ) + (isGitNode(node) ? ` (${node.resolved})` : '') + diff --git a/lib/commands/outdated.js b/lib/commands/outdated.js index a75afe18e6d93..1600315cac642 100644 --- a/lib/commands/outdated.js +++ b/lib/commands/outdated.js @@ -102,7 +102,7 @@ class Outdated extends ArboristWorkspaceCmd { } const outTable = [outHead].concat(outList) - outTable[0] = outTable[0].map(heading => this.npm.chalk.underline(heading)) + outTable[0] = outTable[0].map(heading => this.npm.chalk.bold.underline(heading)) const tableOpts = { align: ['l', 'r', 'r', 'r', 'l'], @@ -278,7 +278,7 @@ class Outdated extends ArboristWorkspaceCmd { : node.name return humanOutput - ? this.npm.chalk.green(workspaceName) + ? this.npm.chalk.blue(workspaceName) : workspaceName } @@ -295,17 +295,20 @@ class Outdated extends ArboristWorkspaceCmd { dependent, } = dep - const columns = [name, current, wanted, latest, location, dependent] + const columns = [ + this.npm.chalk[current === wanted ? 'yellow' : 'red'](name), + current, + this.npm.chalk.cyan(wanted), + this.npm.chalk.blue(latest), + location, + dependent, + ] if (this.npm.config.get('long')) { columns[6] = type - columns[7] = homepage + columns[7] = this.npm.chalk.blue(homepage) } - columns[0] = this.npm.chalk[current === wanted ? 'yellow' : 'red'](columns[0]) // current - columns[2] = this.npm.chalk.green(columns[2]) // wanted - columns[3] = this.npm.chalk.magenta(columns[3]) // latest - return columns } diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 8758422f5e9a7..db4cb7f5dc61e 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -169,7 +169,7 @@ class Publish extends BaseCommand { log.warn( 'publish', `Skipping workspace ${ - this.npm.chalk.green(name) + this.npm.chalk.cyan(name) }, marked as ${ this.npm.chalk.bold('private') }` diff --git a/lib/commands/view.js b/lib/commands/view.js index 9fb0f8add1ca7..744e2badb9581 100644 --- a/lib/commands/view.js +++ b/lib/commands/view.js @@ -318,125 +318,89 @@ class View extends BaseCommand { // More modern, pretty printing of default view const unicode = this.npm.config.get('unicode') const chalk = this.npm.chalk - const tags = [] - - Object.keys(packu['dist-tags']).forEach((t) => { - const version = packu['dist-tags'][t] - tags.push(`${chalk.bold.green(t)}: ${version}`) - }) - const unpackedSize = manifest.dist.unpackedSize && - formatBytes(manifest.dist.unpackedSize, true) + const deps = Object.keys(manifest.dependencies || {}).map((dep) => + `${chalk.blue(dep)}: ${manifest.dependencies[dep]}` + ) + const site = manifest.homepage?.url || manifest.homepage + const bins = Object.keys(manifest.bin || {}) const licenseField = manifest.license || 'Proprietary' - const info = { - name: chalk.green(manifest.name), - version: chalk.green(manifest.version), - bins: Object.keys(manifest.bin || {}), - versions: chalk.yellow(packu.versions.length + ''), - description: manifest.description, - deprecated: manifest.deprecated, - keywords: packu.keywords || [], - license: typeof licenseField === 'string' - ? licenseField - : (licenseField.type || 'Proprietary'), - deps: Object.keys(manifest.dependencies || {}).map((dep) => { - return `${chalk.yellow(dep)}: ${manifest.dependencies[dep]}` - }), - publisher: manifest._npmUser && unparsePerson({ - name: chalk.yellow(manifest._npmUser.name), - email: chalk.cyan(manifest._npmUser.email), - }), - modified: !packu.time ? undefined - : chalk.yellow(relativeDate(packu.time[manifest.version])), - maintainers: (packu.maintainers || []).map((u) => unparsePerson({ - name: chalk.yellow(u.name), - email: chalk.cyan(u.email), - })), - repo: ( - manifest.bugs && (manifest.bugs.url || manifest.bugs) - ) || ( - manifest.repository && (manifest.repository.url || manifest.repository) - ), - site: ( - manifest.homepage && (manifest.homepage.url || manifest.homepage) - ), - tags, - tarball: chalk.cyan(manifest.dist.tarball), - shasum: chalk.yellow(manifest.dist.shasum), - integrity: - manifest.dist.integrity && chalk.yellow(manifest.dist.integrity), - fileCount: - manifest.dist.fileCount && chalk.yellow(manifest.dist.fileCount), - unpackedSize: unpackedSize && chalk.yellow(unpackedSize), - } - if (info.license.toLowerCase().trim() === 'proprietary') { - info.license = chalk.bold.red(info.license) - } else { - info.license = chalk.green(info.license) - } + const license = typeof licenseField === 'string' + ? licenseField + : (licenseField.type || 'Proprietary') output.standard('') - output.standard( - chalk.underline.bold(`${info.name}@${info.version}`) + - ' | ' + info.license + - ' | deps: ' + (info.deps.length ? chalk.cyan(info.deps.length) : chalk.green('none')) + - ' | versions: ' + info.versions - ) - info.description && output.standard(info.description) - if (info.repo || info.site) { - info.site && output.standard(chalk.cyan(info.site)) + output.standard([ + chalk.underline.cyan(`${manifest.name}@${manifest.version}`), + license.toLowerCase().trim() === 'proprietary' + ? chalk.red(license) + : chalk.green(license), + `deps: ${deps.length ? chalk.cyan(deps.length) : chalk.cyan('none')}`, + `versions: ${chalk.cyan(packu.versions.length + '')}`, + ].join(' | ')) + + manifest.description && output.standard(manifest.description) + if (site) { + output.standard(chalk.blue(site)) } - const warningSign = unicode ? ' ⚠️ ' : '!!' - info.deprecated && output.standard( - `\n${chalk.bold.red('DEPRECATED')}${ - warningSign - } - ${info.deprecated}` + manifest.deprecated && output.standard( + `\n${chalk.redBright('DEPRECATED')}${unicode ? ' ⚠️ ' : '!!'} - ${manifest.deprecated}` ) - if (info.keywords.length) { - output.standard('') - output.standard(`keywords: ${chalk.yellow(info.keywords.join(', '))}`) + if (packu.keywords?.length) { + output.standard(`\nkeywords: ${ + packu.keywords.map(k => chalk.cyan(k)).join(', ') + }`) } - if (info.bins.length) { - output.standard('') - output.standard(`bin: ${chalk.yellow(info.bins.join(', '))}`) + if (bins.length) { + output.standard(`\nbin: ${chalk.cyan(bins.join(', '))}`) } - output.standard('') - output.standard('dist') - output.standard(`.tarball: ${info.tarball}`) - output.standard(`.shasum: ${info.shasum}`) - info.integrity && output.standard(`.integrity: ${info.integrity}`) - info.unpackedSize && output.standard(`.unpackedSize: ${info.unpackedSize}`) - - const maxDeps = 24 - if (info.deps.length) { - output.standard('') - output.standard('dependencies:') - output.standard(columns(info.deps.slice(0, maxDeps), { padding: 1 })) - if (info.deps.length > maxDeps) { - output.standard(`(...and ${info.deps.length - maxDeps} more.)`) + output.standard('\ndist') + output.standard(`.tarball: ${chalk.blue(manifest.dist.tarball)}`) + output.standard(`.shasum: ${chalk.green(manifest.dist.shasum)}`) + if (manifest.dist.integrity) { + output.standard(`.integrity: ${chalk.green(manifest.dist.integrity)}`) + } + if (manifest.dist.unpackedSize) { + output.standard(`.unpackedSize: ${chalk.blue(formatBytes(manifest.dist.unpackedSize, true))}`) + } + + if (deps.length) { + const maxDeps = 24 + output.standard('\ndependencies:') + output.standard(columns(deps.slice(0, maxDeps), { padding: 1 })) + if (deps.length > maxDeps) { + output.standard(chalk.dim(`(...and ${deps.length - maxDeps} more.)`)) } } - if (info.maintainers && info.maintainers.length) { - output.standard('') - output.standard('maintainers:') - info.maintainers.forEach((u) => output.standard(`- ${u}`)) + if (packu.maintainers?.length) { + output.standard('\nmaintainers:') + packu.maintainers.forEach(u => + output.standard(`- ${unparsePerson({ + name: chalk.blue(u.name), + email: chalk.dim(u.email) })}`) + ) } - output.standard('') - output.standard('dist-tags:') - output.standard(columns(info.tags)) + output.standard('\ndist-tags:') + output.standard(columns(Object.keys(packu['dist-tags']).map(t => + `${chalk.blue(t)}: ${packu['dist-tags'][t]}` + ))) - if (info.publisher || info.modified) { + const publisher = manifest._npmUser && unparsePerson({ + name: chalk.blue(manifest._npmUser.name), + email: chalk.dim(manifest._npmUser.email), + }) + if (publisher || packu.time) { let publishInfo = 'published' - if (info.modified) { - publishInfo += ` ${info.modified}` + if (packu.time) { + publishInfo += ` ${chalk.cyan(relativeDate(packu.time[manifest.version]))}` } - if (info.publisher) { - publishInfo += ` by ${info.publisher}` + if (publisher) { + publishInfo += ` by ${publisher}` } output.standard('') output.standard(publishInfo) diff --git a/lib/utils/display.js b/lib/utils/display.js index 05cdee6f9dbe4..d9642fa374adf 100644 --- a/lib/utils/display.js +++ b/lib/utils/display.js @@ -3,18 +3,33 @@ const { log, output } = require('proc-log') const { explain } = require('./explain-eresolve.js') const { formatWithOptions } = require('./format') +// This is the general approach to color: +// Eventually this will be exposed somewhere we can refer to these by name. +// Foreground colors only. Never set the background color. +/* + * Black # (Don't use) + * Red # Danger + * Green # Success + * Yellow # Warning + * Blue # Accent + * Magenta # Done + * Cyan # Emphasis + * White # (Don't use) + */ + +// Translates log levels to chalk colors const COLOR_PALETTE = ({ chalk: c }) => ({ - heading: c.white.bgBlack, - title: c.magenta, - timing: c.green.bgBlack, + heading: c.bold, + title: c.blueBright, + timing: c.magentaBright, // loglevels - error: c.red.bgBlack, - warn: c.black.bgYellow, - notice: c.blue.bgBlack, - http: c.green.bgBlack, - info: c.green, - verbose: c.blue.bgBlack, - silly: c.inverse, + error: c.red, + warn: c.yellow, + notice: c.cyanBright, + http: c.green, + info: c.cyan, + verbose: c.blue, + silly: c.blue.dim, }) const LOG_LEVELS = log.LEVELS.reduce((acc, key) => { diff --git a/lib/utils/explain-dep.js b/lib/utils/explain-dep.js index 86660d5d3ad4b..d5d1a40d3403d 100644 --- a/lib/utils/explain-dep.js +++ b/lib/utils/explain-dep.js @@ -6,63 +6,32 @@ const explainNode = (node, depth, chalk) => explainLinksIn(node, depth, chalk) const colorType = (type, chalk) => { - const { red, yellow, cyan, magenta, blue, green, gray } = chalk - const style = type === 'extraneous' ? red - : type === 'dev' ? yellow - : type === 'optional' ? cyan - : type === 'peer' ? magenta - : type === 'bundled' ? blue - : type === 'workspace' ? green - : type === 'overridden' ? gray + const style = type === 'extraneous' ? chalk.red + : type === 'dev' ? chalk.blue + : type === 'optional' ? chalk.magenta + : type === 'peer' ? chalk.magentaBright + : type === 'bundled' ? chalk.underline.cyan + : type === 'workspace' ? chalk.blueBright + : type === 'overridden' ? chalk.dim : /* istanbul ignore next */ s => s return style(type) } const printNode = (node, chalk) => { - const { - name, - version, - location, - extraneous, - dev, - optional, - peer, - bundled, - isWorkspace, - overridden, - } = node - const { bold, dim, green } = chalk const extra = [] - if (extraneous) { - extra.push(' ' + bold(colorType('extraneous', chalk))) - } - - if (dev) { - extra.push(' ' + bold(colorType('dev', chalk))) - } - if (optional) { - extra.push(' ' + bold(colorType('optional', chalk))) - } - - if (peer) { - extra.push(' ' + bold(colorType('peer', chalk))) - } - - if (bundled) { - extra.push(' ' + bold(colorType('bundled', chalk))) - } - - if (overridden) { - extra.push(' ' + bold(colorType('overridden', chalk))) + for (const meta of ['extraneous', 'dev', 'optional', 'peer', 'bundled', 'overridden']) { + if (node[meta]) { + extra.push(` ${colorType(meta, chalk)}`) + } } - const pkgid = isWorkspace - ? green(`${name}@${version}`) - : `${bold(name)}@${bold(version)}` + const pkgid = node.isWorkspace + ? chalk.blueBright(`${node.name}@${node.version}`) + : `${node.name}@${node.version}` return `${pkgid}${extra.join('')}` + - (location ? dim(`\n${location}`) : '') + (node.location ? chalk.dim(`\n${node.location}`) : '') } const explainLinksIn = ({ linksIn }, depth, chalk) => { @@ -107,10 +76,9 @@ const explainDependents = ({ name, dependents }, depth, chalk) => { } const explainEdge = ({ name, type, bundled, from, spec, rawSpec, overridden }, depth, chalk) => { - const { bold } = chalk let dep = type === 'workspace' - ? bold(relative(from.location, spec.slice('file:'.length))) - : `${bold(name)}@"${bold(spec)}"` + ? chalk.bold(relative(from.location, spec.slice('file:'.length))) + : `${name}@"${spec}"` if (overridden) { dep = `${colorType('overridden', chalk)} ${dep} (was "${rawSpec}")` } diff --git a/lib/utils/update-notifier.js b/lib/utils/update-notifier.js index 7481b65d56221..41fece36a558e 100644 --- a/lib/utils/update-notifier.js +++ b/lib/utils/update-notifier.js @@ -49,7 +49,6 @@ const updateCheck = async (npm, spec, version, current) => { return null } - const useColor = npm.logColor const chalk = npm.logChalk // ok! notify the user about this update they should get. @@ -60,19 +59,14 @@ const updateCheck = async (npm, spec, version, current) => { : update.minor !== current.minor ? 'minor' : update.patch !== current.patch ? 'patch' : 'prerelease' - const typec = type === 'major' ? chalk.red(type) - : type === 'minor' ? chalk.yellow(type) - : chalk.green(type) - const oldc = chalk.red(current) - const latestc = chalk.green(latest) - const changelog = `https://github.com/npm/cli/releases/tag/v${latest}` - const changelogc = !useColor ? `<${changelog}>` : chalk.cyan(changelog) + const typec = type === 'major' ? 'red' + : type === 'minor' ? 'yellow' + : 'cyan' const cmd = `npm install -g npm@${latest}` - const cmdc = !useColor ? `\`${cmd}\`` : chalk.green(cmd) - const message = `\nNew ${typec} version of npm available! ` + - `${oldc} -> ${latestc}\n` + - `Changelog: ${changelogc}\n` + - `Run ${cmdc} to update!\n` + const message = `\nNew ${chalk[typec](type)} version of npm available! ` + + `${chalk[typec](current)} -> ${chalk.blue(latest)}\n` + + `Changelog: ${chalk.blue(`https://github.com/npm/cli/releases/tag/v${latest}`)}\n` + + `To update run: ${chalk.underline(cmd)}\n` return message } diff --git a/tap-snapshots/test/lib/commands/audit.js.test.cjs b/tap-snapshots/test/lib/commands/audit.js.test.cjs index 4d2e2445aa2ae..21c22b26c12e6 100644 --- a/tap-snapshots/test/lib/commands/audit.js.test.cjs +++ b/tap-snapshots/test/lib/commands/audit.js.test.cjs @@ -222,10 +222,10 @@ 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 signtaures and color output enabled > must match snapshot 1`] = ` +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: +1 package has an invalid registry signature: kms-demo@1.0.0 (https://registry.npmjs.org/) diff --git a/tap-snapshots/test/lib/commands/doctor.js.test.cjs b/tap-snapshots/test/lib/commands/doctor.js.test.cjs index 674237823666d..ded43c37a693f 100644 --- a/tap-snapshots/test/lib/commands/doctor.js.test.cjs +++ b/tap-snapshots/test/lib/commands/doctor.js.test.cjs @@ -65,20 +65,20 @@ exports[`test/lib/commands/doctor.js TAP all clear in color > logs 1`] = ` Object { "error": Array [], "info": Array [ - "/u001b[35mdoctor/u001b[39m Running checkup", - "/u001b[35mdoctor/u001b[39m Pinging registry", - "/u001b[35mdoctor/u001b[39m Getting npm package information", - "/u001b[35mdoctor/u001b[39m Getting Node.js release information", - "/u001b[35mdoctor/u001b[39m Finding git in your PATH", - "/u001b[35mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH", - "/u001b[35mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache", + "/u001b[94mdoctor/u001b[39m Running checkup", + "/u001b[94mdoctor/u001b[39m Pinging registry", + "/u001b[94mdoctor/u001b[39m Getting npm package information", + "/u001b[94mdoctor/u001b[39m Getting Node.js release information", + "/u001b[94mdoctor/u001b[39m Finding git in your PATH", + "/u001b[94mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH", + "/u001b[94mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache", String( - /u001b[35mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: { - /u001b[35mdoctor/u001b[39m "badContentCount": 0, - /u001b[35mdoctor/u001b[39m "reclaimedCount": 0, - /u001b[35mdoctor/u001b[39m "missingContent": 0, - /u001b[35mdoctor/u001b[39m "verifiedContent": 0 - /u001b[35mdoctor/u001b[39m } + /u001b[94mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: { + /u001b[94mdoctor/u001b[39m "badContentCount": 0, + /u001b[94mdoctor/u001b[39m "reclaimedCount": 0, + /u001b[94mdoctor/u001b[39m "missingContent": 0, + /u001b[94mdoctor/u001b[39m "verifiedContent": 0 + /u001b[94mdoctor/u001b[39m } ), ], "warn": Array [], @@ -865,20 +865,20 @@ exports[`test/lib/commands/doctor.js TAP ping 404 in color > logs 1`] = ` Object { "error": Array [], "info": Array [ - "/u001b[35mdoctor/u001b[39m Running checkup", - "/u001b[35mdoctor/u001b[39m Pinging registry", - "/u001b[35mdoctor/u001b[39m Getting npm package information", - "/u001b[35mdoctor/u001b[39m Getting Node.js release information", - "/u001b[35mdoctor/u001b[39m Finding git in your PATH", - "/u001b[35mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH", - "/u001b[35mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache", + "/u001b[94mdoctor/u001b[39m Running checkup", + "/u001b[94mdoctor/u001b[39m Pinging registry", + "/u001b[94mdoctor/u001b[39m Getting npm package information", + "/u001b[94mdoctor/u001b[39m Getting Node.js release information", + "/u001b[94mdoctor/u001b[39m Finding git in your PATH", + "/u001b[94mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH", + "/u001b[94mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache", String( - /u001b[35mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: { - /u001b[35mdoctor/u001b[39m "badContentCount": 0, - /u001b[35mdoctor/u001b[39m "reclaimedCount": 0, - /u001b[35mdoctor/u001b[39m "missingContent": 0, - /u001b[35mdoctor/u001b[39m "verifiedContent": 0 - /u001b[35mdoctor/u001b[39m } + /u001b[94mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: { + /u001b[94mdoctor/u001b[39m "badContentCount": 0, + /u001b[94mdoctor/u001b[39m "reclaimedCount": 0, + /u001b[94mdoctor/u001b[39m "missingContent": 0, + /u001b[94mdoctor/u001b[39m "verifiedContent": 0 + /u001b[94mdoctor/u001b[39m } ), ], "warn": Array [], @@ -887,7 +887,7 @@ Object { exports[`test/lib/commands/doctor.js TAP ping 404 in color > ping 404 in color 1`] = ` Check Value Recommendation/Notes -npm ping not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true +npm ping not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true npm -v ok current: v1.0.0, latest: v1.0.0 node -v ok current: v1.0.0, recommended: v1.0.0 npm config get registry ok using default registry (https://registry.npmjs.org/) diff --git a/tap-snapshots/test/lib/commands/fund.js.test.cjs b/tap-snapshots/test/lib/commands/fund.js.test.cjs index 7b6881c2d5ebf..28ffd76d5c736 100644 --- a/tap-snapshots/test/lib/commands/fund.js.test.cjs +++ b/tap-snapshots/test/lib/commands/fund.js.test.cjs @@ -12,16 +12,15 @@ Run \`npm fund [] --which=1\`, for example, to open the first fund ` 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 - +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`] = ` diff --git a/tap-snapshots/test/lib/commands/ls.js.test.cjs b/tap-snapshots/test/lib/commands/ls.js.test.cjs index 9d040856a87c9..86394b702f19a 100644 --- a/tap-snapshots/test/lib/commands/ls.js.test.cjs +++ b/tap-snapshots/test/lib/commands/ls.js.test.cjs @@ -320,10 +320,10 @@ npm-broken-resolved-field-test@1.0.0 {CWD}/prefix 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 ++-- 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 +\`-- UNMET DEPENDENCY ipsum@^1.0.0  ` @@ -336,9 +336,9 @@ test-npm-ls@1.0.0 {CWD}/prefix 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 +\`-- a@1.0.0  \`-- b@1.0.0 - \`-- a@1.0.0 deduped + \`-- a@1.0.0 deduped  ` @@ -408,8 +408,8 @@ exports[`test/lib/commands/ls.js TAP ls global > should print tree and not mark 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 +| \`-- 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  ` @@ -492,15 +492,15 @@ workspaces-tree@1.0.0 {CWD}/prefix 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 ++-- 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 +| \`-- 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 ++-- e@1.0.0 -> ./group/e ++-- f@1.0.0 -> ./group/f \`-- pacote@1.0.0  ` @@ -550,7 +550,7 @@ test-overridden@1.0.0 {CWD}/prefix 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 + \`-- bar@1.0.0 overridden  ` @@ -572,8 +572,8 @@ exports[`test/lib/commands/ls.js TAP ls unmet optional dep > should output tree +-- 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 ++-- 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 @@ -593,10 +593,10 @@ test-npm-ls@1.0.0 {CWD}/prefix 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/b@1.1.2 deduped ++-- @npmcli/b@1.1.2 \`-- @npmcli/c@1.0.0 - \`-- @npmcli/b@1.1.2 deduped + \`-- @npmcli/b@1.1.2 deduped  ` @@ -616,7 +616,7 @@ test-npm-ls@1.0.0 {CWD}/prefix 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 +\`-- chai@1.0.0  ` diff --git a/tap-snapshots/test/lib/commands/outdated.js.test.cjs b/tap-snapshots/test/lib/commands/outdated.js.test.cjs index a72338b0bacc5..ec0298fcf4fa7 100644 --- a/tap-snapshots/test/lib/commands/outdated.js.test.cjs +++ b/tap-snapshots/test/lib/commands/outdated.js.test.cjs @@ -93,25 +93,25 @@ 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 +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 +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 +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`] = ` @@ -129,11 +129,11 @@ exports[`test/lib/commands/outdated.js TAP should display outdated deps outdated ` 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 +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`] = ` @@ -232,8 +232,8 @@ exports[`test/lib/commands/outdated.js TAP workspaces should display ws outdated ` 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 +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 ` diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index 875e25ebd8813..df2c66ab10e9f 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -368,30 +368,30 @@ exports[`test/lib/commands/publish.js TAP workspaces all workspaces - color > al exports[`test/lib/commands/publish.js TAP workspaces all workspaces - color > warns about skipped private workspace in color 1`] = ` Array [ - "\\u001b[35mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.", + "\\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[35mpublish\\u001b[39m errors corrected: - \\u001b[35mpublish\\u001b[39m Removed invalid "scripts" - \\u001b[35mpublish\\u001b[39m "repository" was changed from a string to an object + \\u001b[94mpublish\\u001b[39m errors corrected: + \\u001b[94mpublish\\u001b[39m Removed invalid "scripts" + \\u001b[94mpublish\\u001b[39m "repository" was changed from a string to an object ), - "\\u001b[35mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.", + "\\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[35mpublish\\u001b[39m errors corrected: - \\u001b[35mpublish\\u001b[39m Removed invalid "scripts" - \\u001b[35mpublish\\u001b[39m "repository" was changed from a string to an object - \\u001b[35mpublish\\u001b[39m "repository.url" was normalized to "git+https://github.com/npm/workspace-b.git" + \\u001b[94mpublish\\u001b[39m errors corrected: + \\u001b[94mpublish\\u001b[39m Removed invalid "scripts" + \\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[35mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.", + "\\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[35mpublish\\u001b[39m errors corrected: - \\u001b[35mpublish\\u001b[39m Removed invalid "scripts" + \\u001b[94mpublish\\u001b[39m errors corrected: + \\u001b[94mpublish\\u001b[39m Removed invalid "scripts" ), - "\\u001b[35mpublish\\u001b[39m npm auto-corrected some errors in your package.json when publishing. Please run \\"npm pkg fix\\" to address these errors.", + "\\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[35mpublish\\u001b[39m errors corrected: - \\u001b[35mpublish\\u001b[39m Removed invalid "scripts" + \\u001b[94mpublish\\u001b[39m errors corrected: + \\u001b[94mpublish\\u001b[39m Removed invalid "scripts" ), - "\\u001b[35mpublish\\u001b[39m Skipping workspace \\u001b[32mworkspace-p\\u001b[39m, marked as \\u001b[1mprivate\\u001b[22m", + "\\u001b[94mpublish\\u001b[39m Skipping workspace \\u001b[36mworkspace-p\\u001b[39m, marked as \\u001b[1mprivate\\u001b[22m", ] ` diff --git a/tap-snapshots/test/lib/commands/view.js.test.cjs b/tap-snapshots/test/lib/commands/view.js.test.cjs index fe22a14dc179c..3e06ecf5d054e 100644 --- a/tap-snapshots/test/lib/commands/view.js.test.cjs +++ b/tap-snapshots/test/lib/commands/view.js.test.cjs @@ -7,135 +7,129 @@ '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@1.0.0 | ACME | deps: 2 | versions: 2 green is a very important color -DEPRECATED!! - true +DEPRECATED!! - true -keywords: colors, green, crayola +keywords: colors, green, crayola -bin: green +bin: green dist -.tarball: http://hm.green.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1.0 GB +.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 +red: 1.0.0 +yellow: 1.0.0 maintainers: -- claudia <c@yellow.com> -- isaacs <i@yellow.com> +- claudia <c@yellow.com> +- isaacs <i@yellow.com> dist-tags: -latest: 1.0.0 +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@1.0.0 | ACME | deps: 2 | versions: 2 green is a very important color -DEPRECATED ⚠️ - true +DEPRECATED ⚠️ - true -keywords: colors, green, crayola +keywords: colors, green, crayola -bin: green +bin: green dist -.tarball: http://hm.green.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1.0 GB +.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 +red: 1.0.0 +yellow: 1.0.0 maintainers: -- claudia <c@yellow.com> -- isaacs <i@yellow.com> +- claudia <c@yellow.com> +- isaacs <i@yellow.com> dist-tags: -latest: 1.0.0 +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@1.0.0 | ACME | deps: 2 | versions: 2 green is a very important color -DEPRECATED!! - true +DEPRECATED!! - true -keywords: colors, green, crayola +keywords: colors, green, crayola -bin: green +bin: green dist -.tarball: http://hm.green.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1.0 GB +.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 +red: 1.0.0 +yellow: 1.0.0 maintainers: -- claudia <c@yellow.com> -- isaacs <i@yellow.com> +- claudia <c@yellow.com> +- isaacs <i@yellow.com> dist-tags: -latest: 1.0.0 +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 +blue@1.0.0 | Proprietary | deps: none | versions: 2 dist -.tarball: http://hm.blue.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1 B +.tarball: http://hm.blue.com/1.0.0.tgz +.shasum: 123 dist-tags: -latest: 1.0.0 +latest: 1.0.0 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 +blue@1.0.0 | Proprietary | deps: none | versions: 2 dist -.tarball: http://hm.blue.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1 B +.tarball: http://hm.blue.com/1.0.0.tgz +.shasum: 123 dist-tags: -latest: 1.0.0 +latest: 1.0.0 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 +blue@1.0.0 | Proprietary | deps: none | versions: 2 dist -.tarball: http://hm.blue.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1 B +.tarball: http://hm.blue.com/1.0.0.tgz +.shasum: 123 dist-tags: -latest: 1.0.0 +latest: 1.0.0 published {TIME} ago ` @@ -177,17 +171,17 @@ exports[`test/lib/commands/view.js TAP package with --json and semver range > mu 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 +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 +.tarball: http://hm.orange.com/1.0.0.tgz +.shasum: 123 +.integrity: --- +.unpackedSize: 1 B dist-tags: -latest: 1.0.0 +latest: 1.0.0 ` exports[`test/lib/commands/view.js TAP package with invalid version > must match snapshot 1`] = ` @@ -196,118 +190,114 @@ exports[`test/lib/commands/view.js TAP package with invalid version > must match 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 +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 +.tarball: http://hm.pink.com/1.0.0.tgz +.shasum: 123 +.integrity: --- +.unpackedSize: 1 B dist-tags: -latest: 1.0.0 +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 +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 +.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.) +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 +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 +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 +.tarball: http://hm.cyan.com/1.0.0.tgz +.shasum: 123 +.integrity: --- +.unpackedSize: 1.0 MB dist-tags: -latest: 1.0.0 +latest: 1.0.0 -published by claudia <claudia@cyan.com> +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 +blue@1.0.0 | Proprietary | deps: none | versions: 2 dist -.tarball: http://hm.blue.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1 B +.tarball: http://hm.blue.com/1.0.0.tgz +.shasum: 123 dist-tags: -latest: 1.0.0 +latest: 1.0.0 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 +blue@1.0.0 | Proprietary | deps: none | versions: 2 dist -.tarball: http://hm.blue.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1 B +.tarball: http://hm.blue.com/1.0.0.tgz +.shasum: 123 dist-tags: -latest: 1.0.0 +latest: 1.0.0 published {TIME} ago -blue@1.0.1 | Proprietary | deps: none | versions: 2 +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 +.tarball: http://hm.blue.com/1.0.1.tgz +.shasum: 124 +.integrity: --- +.unpackedSize: 1.0 kB dist-tags: -latest: 1.0.0 +latest: 1.0.0 -published over a year from now +published over a year from now ` exports[`test/lib/commands/view.js TAP specific field names array field - 1 element > must match snapshot 1`] = ` @@ -435,43 +425,43 @@ exports[`test/lib/commands/view.js TAP workspaces all workspaces --json > must m exports[`test/lib/commands/view.js TAP workspaces all workspaces > must match snapshot 1`] = ` -green@1.0.0 | ACME | deps: 2 | versions: 2 +green@1.0.0 | ACME | deps: 2 | versions: 2 green is a very important color -DEPRECATED!! - true +DEPRECATED!! - true -keywords: colors, green, crayola +keywords: colors, green, crayola -bin: green +bin: green dist -.tarball: http://hm.green.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1.0 GB +.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 +red: 1.0.0 +yellow: 1.0.0 maintainers: -- claudia <c@yellow.com> -- isaacs <i@yellow.com> +- claudia <c@yellow.com> +- isaacs <i@yellow.com> dist-tags: -latest: 1.0.0 +latest: 1.0.0 -orange@1.0.0 | Proprietary | deps: none | versions: 2 -http://hm.orange.com +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 +.tarball: http://hm.orange.com/1.0.0.tgz +.shasum: 123 +.integrity: --- +.unpackedSize: 1 B dist-tags: -latest: 1.0.0 +latest: 1.0.0 ` exports[`test/lib/commands/view.js TAP workspaces all workspaces nonexistent field --json > must match snapshot 1`] = ` @@ -499,50 +489,50 @@ 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@1.0.0 | ACME | deps: 2 | versions: 2 green is a very important color -DEPRECATED!! - true +DEPRECATED!! - true -keywords: colors, green, crayola +keywords: colors, green, crayola -bin: green +bin: green dist -.tarball: http://hm.green.com/1.0.0.tgz -.shasum: 123 -.integrity: --- -.unpackedSize: 1.0 GB +.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 +red: 1.0.0 +yellow: 1.0.0 maintainers: -- claudia <c@yellow.com> -- isaacs <i@yellow.com> +- claudia <c@yellow.com> +- isaacs <i@yellow.com> dist-tags: -latest: 1.0.0 +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 +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 +.tarball: http://hm.pink.com/1.0.0.tgz +.shasum: 123 +.integrity: --- +.unpackedSize: 1 B dist-tags: -latest: 1.0.0 +latest: 1.0.0 ` exports[`test/lib/commands/view.js TAP workspaces remote package name > should have warning of ignoring workspaces 1`] = ` Array [ - "\\u001b[35mIgnoring workspaces for specified package(s)\\u001b[39m", + "\\u001b[94mIgnoring workspaces for specified package(s)\\u001b[39m", ] ` diff --git a/tap-snapshots/test/lib/utils/explain-dep.js.test.cjs b/tap-snapshots/test/lib/utils/explain-dep.js.test.cjs index 876cc6552b760..34620d5c749bc 100644 --- a/tap-snapshots/test/lib/utils/explain-dep.js.test.cjs +++ b/tap-snapshots/test/lib/utils/explain-dep.js.test.cjs @@ -22,9 +22,9 @@ manydep@1.0.0 ` exports[`test/lib/utils/explain-dep.js TAP basic bundled > explain color deep 1`] = ` -bundle-of-joy@1.0.0 bundled +bundle-of-joy@1.0.0 bundled node_modules/bundle-of-joy - bundled prod-dep@"1.x" from the root project + bundled prod-dep@"1.x" from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic bundled > explain nocolor shallow 1`] = ` @@ -34,7 +34,7 @@ node_modules/bundle-of-joy ` exports[`test/lib/utils/explain-dep.js TAP basic bundled > print color 1`] = ` -bundle-of-joy@1.0.0 bundled +bundle-of-joy@1.0.0 bundled node_modules/bundle-of-joy ` @@ -44,13 +44,13 @@ 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 +deep-dev@2.3.4 dev node_modules/deep-dev - deep-dev@"2.x" from metadev@3.4.5 + deep-dev@"2.x" from metadev@3.4.5 node_modules/dev/node_modules/metadev - metadev@"3.x" from topdev@4.5.6 + metadev@"3.x" from topdev@4.5.6 node_modules/topdev - dev topdev@"4.x" from the root project + dev topdev@"4.x" from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic deepDev > explain nocolor shallow 1`] = ` @@ -63,7 +63,7 @@ node_modules/deep-dev ` exports[`test/lib/utils/explain-dep.js TAP basic deepDev > print color 1`] = ` -deep-dev@2.3.4 dev +deep-dev@2.3.4 dev node_modules/deep-dev ` @@ -73,7 +73,7 @@ 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 +extra-neos@1337.420.69-lol extraneous node_modules/extra-neos ` @@ -83,7 +83,7 @@ node_modules/extra-neos ` exports[`test/lib/utils/explain-dep.js TAP basic extraneous > print color 1`] = ` -extra-neos@1337.420.69-lol extraneous +extra-neos@1337.420.69-lol extraneous node_modules/extra-neos ` @@ -93,29 +93,29 @@ 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 +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 + 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 + 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 + dev manydep@"*" from deep-dev@2.3.4 dev node_modules/deep-dev - deep-dev@"2.x" from metadev@3.4.5 + deep-dev@"2.x" from metadev@3.4.5 node_modules/dev/node_modules/metadev - metadev@"3.x" from topdev@4.5.6 + 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 + 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 + 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`] = ` @@ -127,7 +127,7 @@ manydep@1.0.0 ` exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > print color 1`] = ` -manydep@1.0.0 +manydep@1.0.0 ` exports[`test/lib/utils/explain-dep.js TAP basic manyDeps > print nocolor 1`] = ` @@ -135,9 +135,9 @@ manydep@1.0.0 ` exports[`test/lib/utils/explain-dep.js TAP basic optional > explain color deep 1`] = ` -optdep@1.0.0 optional +optdep@1.0.0 optional node_modules/optdep - optional optdep@"1.0.0" from the root project + optional optdep@"1.0.0" from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic optional > explain nocolor shallow 1`] = ` @@ -147,7 +147,7 @@ node_modules/optdep ` exports[`test/lib/utils/explain-dep.js TAP basic optional > print color 1`] = ` -optdep@1.0.0 optional +optdep@1.0.0 optional node_modules/optdep ` @@ -157,9 +157,9 @@ node_modules/optdep ` exports[`test/lib/utils/explain-dep.js TAP basic overridden > explain color deep 1`] = ` -overridden-root@1.0.0 overridden +overridden-root@1.0.0 overridden node_modules/overridden-root - overridden overridden-dep@"1.0.0" (was "^2.0.0") from the root project + 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`] = ` @@ -169,7 +169,7 @@ node_modules/overridden-root ` exports[`test/lib/utils/explain-dep.js TAP basic overridden > print color 1`] = ` -overridden-root@1.0.0 overridden +overridden-root@1.0.0 overridden node_modules/overridden-root ` @@ -179,9 +179,9 @@ node_modules/overridden-root ` exports[`test/lib/utils/explain-dep.js TAP basic peer > explain color deep 1`] = ` -peer@1.0.0 peer +peer@1.0.0 peer node_modules/peer - peer peer@"1.0.0" from the root project + peer peer@"1.0.0" from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic peer > explain nocolor shallow 1`] = ` @@ -191,7 +191,7 @@ node_modules/peer ` exports[`test/lib/utils/explain-dep.js TAP basic peer > print color 1`] = ` -peer@1.0.0 peer +peer@1.0.0 peer node_modules/peer ` @@ -201,9 +201,9 @@ node_modules/peer ` exports[`test/lib/utils/explain-dep.js TAP basic prodDep > explain color deep 1`] = ` -prod-dep@1.2.3 +prod-dep@1.2.3 node_modules/prod-dep - prod-dep@"1.x" from the root project + prod-dep@"1.x" from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic prodDep > explain nocolor shallow 1`] = ` @@ -213,7 +213,7 @@ node_modules/prod-dep ` exports[`test/lib/utils/explain-dep.js TAP basic prodDep > print color 1`] = ` -prod-dep@1.2.3 +prod-dep@1.2.3 node_modules/prod-dep ` @@ -223,11 +223,11 @@ node_modules/prod-dep ` exports[`test/lib/utils/explain-dep.js TAP basic workspaces > explain color deep 1`] = ` -a@1.0.0 +a@1.0.0 a - a@1.0.0 + a@1.0.0 node_modules/a - workspace a from the root project + workspace a from the root project ` exports[`test/lib/utils/explain-dep.js TAP basic workspaces > explain nocolor shallow 1`] = ` @@ -239,7 +239,7 @@ a ` exports[`test/lib/utils/explain-dep.js TAP basic workspaces > print color 1`] = ` -a@1.0.0 +a@1.0.0 a ` diff --git a/tap-snapshots/test/lib/utils/explain-eresolve.js.test.cjs b/tap-snapshots/test/lib/utils/explain-eresolve.js.test.cjs index 3d73019d3e45b..5190ead244697 100644 --- a/tap-snapshots/test/lib/utils/explain-eresolve.js.test.cjs +++ b/tap-snapshots/test/lib/utils/explain-eresolve.js.test.cjs @@ -6,15 +6,15 @@ */ '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 +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 + @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 +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 + @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`] = ` @@ -48,15 +48,15 @@ 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 +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 + @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 +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 + @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 @@ -80,20 +80,20 @@ 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 +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 + @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 +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 + @isaacs/peer-dep-cycle-a@"1.x" from the root project -Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 +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 + 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 + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 node_modules/@isaacs/peer-dep-cycle-a ` @@ -142,22 +142,22 @@ 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 +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 + @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 +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 + @isaacs/peer-dep-cycle-a@"1.x" from the root project -Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 +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 + 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 + 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 + @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 @@ -188,20 +188,20 @@ 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 +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 + 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 +dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project -Conflicting peer dependency: eslint@7.31.0 +Conflicting peer dependency: eslint@7.31.0 node_modules/eslint - peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1 + 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 + 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`] = ` @@ -262,23 +262,23 @@ 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 +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 + 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 + 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 +dev eslint-plugin-eslint-plugin@"^3.1.0" from the root project -Conflicting peer dependency: eslint@7.31.0 +Conflicting peer dependency: eslint@7.31.0 node_modules/eslint - peer eslint@"^7.0.0" from eslint-plugin-eslint-plugin@3.5.1 + 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 + 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 @@ -310,18 +310,18 @@ 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 +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 + dev ink@"next" from gatsby-recipes@0.2.31 node_modules/gatsby-recipes - gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + 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 +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 + ink-box@"^1.0.0" from gatsby-recipes@0.2.31 node_modules/gatsby-recipes ` @@ -380,25 +380,25 @@ 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 +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 + dev ink@"next" from gatsby-recipes@0.2.31 node_modules/gatsby-recipes - gatsby-recipes@"^0.2.31" from gatsby-cli@2.12.107 + 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 + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby - gatsby@"" from the root project + gatsby@"" from the root project Could not resolve dependency: -peer ink@">=2.0.0" from ink-box@1.0.0 +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 + 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 + 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 + gatsby-cli@"^2.12.107" from gatsby@2.24.74 node_modules/gatsby Fix the upstream dependency conflict, or retry @@ -434,13 +434,13 @@ 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 +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 +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 + 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`] = ` @@ -470,13 +470,13 @@ 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 +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 +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 + 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 @@ -498,15 +498,15 @@ 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 +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 + 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 +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 + 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`] = ` @@ -540,15 +540,15 @@ 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 +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 + 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 +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 + 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 @@ -572,15 +572,15 @@ 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 +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 + @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 +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 + peer @isaacs/peer-dep-cycle-b@"1" from @isaacs/peer-dep-cycle-a@1.0.0 node_modules/@isaacs/peer-dep-cycle-a ` @@ -619,17 +619,17 @@ 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 +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 + @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 +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 + 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 + @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 diff --git a/tap-snapshots/test/lib/utils/update-notifier.js.test.cjs b/tap-snapshots/test/lib/utils/update-notifier.js.test.cjs index e5e9dd77569e0..5693b3f3a9097 100644 --- a/tap-snapshots/test/lib/utils/update-notifier.js.test.cjs +++ b/tap-snapshots/test/lib/utils/update-notifier.js.test.cjs @@ -7,96 +7,96 @@ 'use strict' exports[`test/lib/utils/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 -Run npm install -g npm@123.420.69 to update! +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/utils/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: -Run \`npm install -g npm@123.420.69\` to update! +Changelog: https://github.com/npm/cli/releases/tag/v123.420.69 +To update run: npm install -g npm@123.420.69 ` exports[`test/lib/utils/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 -Run npm install -g npm@123.420.69 to update! +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/utils/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: -Run \`npm install -g npm@123.420.69\` to update! +Changelog: https://github.com/npm/cli/releases/tag/v123.420.69 +To update run: npm install -g npm@123.420.69 ` exports[`test/lib/utils/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 -Run npm install -g npm@123.420.69 to update! +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/utils/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: -Run \`npm install -g npm@123.420.69\` to update! +Changelog: https://github.com/npm/cli/releases/tag/v123.420.69 +To update run: npm install -g npm@123.420.69 ` exports[`test/lib/utils/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 -Run npm install -g npm@123.421.70 to update! +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/utils/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: -Run \`npm install -g npm@123.421.70\` to update! +Changelog: https://github.com/npm/cli/releases/tag/v123.421.70 +To update run: npm install -g npm@123.421.70 ` exports[`test/lib/utils/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 -Run npm install -g npm@123.421.70 to update! +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/utils/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: -Run \`npm install -g npm@123.421.70\` to update! +Changelog: https://github.com/npm/cli/releases/tag/v123.421.70 +To update run: npm install -g npm@123.421.70 ` exports[`test/lib/utils/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 -Run npm install -g npm@124.0.0-beta.99999 to update! +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/utils/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: -Run \`npm install -g npm@124.0.0-beta.99999\` to update! +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 ` diff --git a/test/lib/commands/audit.js b/test/lib/commands/audit.js index 9a57a02184ea1..51abae13322cc 100644 --- a/test/lib/commands/audit.js +++ b/test/lib/commands/audit.js @@ -1860,7 +1860,7 @@ t.test('audit signatures', async t => { ) }) - t.test('with invalid signtaures and color output enabled', async t => { + t.test('with invalid signatures and color output enabled', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { prefixDir: installWithValidSigs, config: { color: 'always' }, @@ -1875,7 +1875,7 @@ t.test('audit signatures', async t => { t.match( joinedOutput(), // eslint-disable-next-line no-control-regex - /\u001b\[1m\u001b\[31minvalid\u001b\[39m\u001b\[22m registry signature/ + /\u001b\[91minvalid\u001b\[39m registry signature/ ) t.matchSnapshot(joinedOutput()) }) diff --git a/test/lib/commands/help-search.js b/test/lib/commands/help-search.js index 8da725fad7692..354fb0291eb2f 100644 --- a/test/lib/commands/help-search.js +++ b/test/lib/commands/help-search.js @@ -71,7 +71,7 @@ t.test('npm help-search long output with color', async t => { const chalk = await import('chalk').then(v => v.default) - const highlightedText = chalk.bgBlack.red('help-search') + const highlightedText = chalk.blue('help-search') t.equal( output.split('\n').some(line => line.includes(highlightedText)), true, diff --git a/test/lib/commands/view.js b/test/lib/commands/view.js index 0bbba8b2bda6a..c50668791bbe5 100644 --- a/test/lib/commands/view.js +++ b/test/lib/commands/view.js @@ -48,9 +48,7 @@ const packument = (nv, opts) => { dist: { shasum: '123', tarball: 'http://hm.blue.com/1.0.0.tgz', - integrity: '---', fileCount: 1, - unpackedSize: 1, }, }, '1.0.1': {