@pnpm/default-reporter
Advanced tools
Comparing version 7.4.2 to 7.4.3
# @pnpm/default-reporter | ||
## 7.4.3 | ||
### Patch Changes | ||
- 220896511: Remove common-tags from dependencies. | ||
- Updated dependencies [db17f6f7b] | ||
- Updated dependencies [1146b76d2] | ||
- Updated dependencies [db17f6f7b] | ||
- @pnpm/config@10.0.0 | ||
- @pnpm/types@6.2.0 | ||
- @pnpm/core-loggers@4.1.2 | ||
## 7.4.2 | ||
@@ -4,0 +16,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_tags_1 = require("common-tags"); | ||
const most = require("most"); | ||
@@ -12,5 +11,5 @@ const prettyMilliseconds = require("pretty-ms"); | ||
const errorCode = log.error['httpStatusCode'] || log.error['status'] || log.error['errno'] || log.error['code']; | ||
const msg = common_tags_1.oneLine `${log.method} ${log.url} error (${errorCode}). | ||
Will retry in ${prettyMilliseconds(log.timeout, { verbose: true })}. | ||
${retriesLeft} retries left.`; | ||
const msg = `${log.method} ${log.url} error (${errorCode}). \ | ||
Will retry in ${prettyMilliseconds(log.timeout, { verbose: true })}. \ | ||
${retriesLeft} retries left.`; | ||
return most.of({ msg: formatWarn_1.default(msg) }); | ||
@@ -17,0 +16,0 @@ }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const chalk = require("chalk"); | ||
const commonTags = require("common-tags"); | ||
const R = require("ramda"); | ||
@@ -13,4 +12,2 @@ const StackTracey = require("stacktracey"); | ||
}; | ||
const stripIndent = commonTags.stripIndent; | ||
const stripIndents = commonTags.stripIndents; | ||
const highlight = chalk.yellow; | ||
@@ -74,7 +71,6 @@ const colorPath = chalk.gray; | ||
const meta = msg['packageMeta']; | ||
let output = stripIndent ` | ||
${formatErrorSummary(err.message)} | ||
let output = `\ | ||
${formatErrorSummary(err.message)} | ||
The latest release of ${meta.name} is "${meta['dist-tags'].latest}". | ||
` + constants_1.EOL; | ||
The latest release of ${meta.name} is "${meta['dist-tags'].latest}".${constants_1.EOL}`; | ||
if (!R.equals(R.keys(meta['dist-tags']), ['latest'])) { | ||
@@ -92,35 +88,30 @@ output += constants_1.EOL + 'Other releases are:' + constants_1.EOL; | ||
function reportUnexpectedStore(err, msg) { | ||
return stripIndent ` | ||
${formatErrorSummary(err.message)} | ||
return `${formatErrorSummary(err.message)} | ||
The dependencies at "${msg['modulesDir']}" are currently linked from the store at "${msg['expectedStorePath']}". | ||
The dependencies at "${msg['modulesDir']}" are currently linked from the store at "${msg['expectedStorePath']}". | ||
pnpm now wants to use the store at "${msg['actualStorePath']}" to link dependencies. | ||
pnpm now wants to use the store at "${msg['actualStorePath']}" to link dependencies. | ||
If you want to use the new store location, reinstall your dependencies with "pnpm install". | ||
If you want to use the new store location, reinstall your dependencies with "pnpm install". | ||
You may change the global store location by running "pnpm config set store-dir <dir>". | ||
(This error may happen if the node_modules was installed with a different major version of pnpm) | ||
`; | ||
You may change the global store location by running "pnpm config set store-dir <dir>". | ||
(This error may happen if the node_modules was installed with a different major version of pnpm)`; | ||
} | ||
function reportUnexpectedVirtualStoreDir(err, msg) { | ||
return stripIndent ` | ||
${formatErrorSummary(err.message)} | ||
return `${formatErrorSummary(err.message)} | ||
The dependencies at "${msg['modulesDir']}" are currently symlinked from the virtual store directory at "${msg['expected']}". | ||
The dependencies at "${msg['modulesDir']}" are currently symlinked from the virtual store directory at "${msg['expected']}". | ||
pnpm now wants to use the virtual store at "${msg['actual']}" to link dependencies from the store. | ||
pnpm now wants to use the virtual store at "${msg['actual']}" to link dependencies from the store. | ||
If you want to use the new virtual store location, reinstall your dependencies with "pnpm install". | ||
If you want to use the new virtual store location, reinstall your dependencies with "pnpm install". | ||
You may change the virtual store location by changing the value of the virtual-store-dir config. | ||
`; | ||
You may change the virtual store location by changing the value of the virtual-store-dir config.`; | ||
} | ||
function reportStoreBreakingChange(msg) { | ||
let output = stripIndent ` | ||
${formatErrorSummary(`The store used for the current node_modules is incomatible with the current version of pnpm`)} | ||
Store path: ${colorPath(msg['storePath'])} | ||
let output = `\ | ||
${formatErrorSummary(`The store used for the current node_modules is incomatible with the current version of pnpm`)} | ||
Store path: ${colorPath(msg['storePath'])} | ||
Run "pnpm install" to recreate node_modules. | ||
`; | ||
Run "pnpm install" to recreate node_modules.`; | ||
if (msg['additionalInformation']) { | ||
@@ -133,8 +124,7 @@ output += constants_1.EOL + constants_1.EOL + msg['additionalInformation']; | ||
function reportModulesBreakingChange(msg) { | ||
let output = stripIndent ` | ||
${formatErrorSummary(`The current version of pnpm is not compatible with the available node_modules structure`)} | ||
node_modules path: ${colorPath(msg['modulesPath'])} | ||
let output = `\ | ||
${formatErrorSummary(`The current version of pnpm is not compatible with the available node_modules structure`)} | ||
node_modules path: ${colorPath(msg['modulesPath'])} | ||
Run ${highlight('pnpm install')} to recreate node_modules. | ||
`; | ||
Run ${highlight('pnpm install')} to recreate node_modules.`; | ||
if (msg['additionalInformation']) { | ||
@@ -169,6 +159,3 @@ output += constants_1.EOL + constants_1.EOL + msg['additionalInformation']; | ||
if (prettyStack) { | ||
return stripIndents ` | ||
${formatErrorSummary(errorMessage)} | ||
${prettyStack} | ||
`; | ||
return `${formatErrorSummary(errorMessage)}${constants_1.EOL}${prettyStack}`; | ||
} | ||
@@ -182,17 +169,15 @@ } | ||
function reportModifiedDependency(msg) { | ||
return stripIndent ` | ||
${formatErrorSummary('Packages in the store have been mutated')} | ||
return `\ | ||
${formatErrorSummary('Packages in the store have been mutated')} | ||
These packages are modified: | ||
${msg['modified'].map((pkgPath) => colorPath(pkgPath)).join(constants_1.EOL)} | ||
These packages are modified: | ||
${msg['modified'].map((pkgPath) => colorPath(pkgPath)).join(constants_1.EOL)} | ||
You can run ${highlight('pnpm install')} to refetch the modified packages | ||
`; | ||
You can run ${highlight('pnpm install')} to refetch the modified packages`; | ||
} | ||
function reportLockfileBreakingChange(err, msg) { | ||
return stripIndent ` | ||
${formatErrorSummary(err.message)} | ||
return `\ | ||
${formatErrorSummary(err.message)} | ||
Run with the ${highlight('--force')} parameter to recreate the lockfile. | ||
`; | ||
Run with the ${highlight('--force')} parameter to recreate the lockfile.`; | ||
} | ||
@@ -207,20 +192,19 @@ function formatRecursiveCommandSummary(msg) { | ||
function reportBadTarballSize(err, msg) { | ||
return stripIndent ` | ||
${formatErrorSummary(err.message)} | ||
return `\ | ||
${formatErrorSummary(err.message)} | ||
Seems like you have internet connection issues. | ||
Try running the same command again. | ||
If that doesn't help, try one of the following: | ||
Seems like you have internet connection issues. | ||
Try running the same command again. | ||
If that doesn't help, try one of the following: | ||
- Set a bigger value for the \`fetch-retries\` config. | ||
To check the current value of \`fetch-retries\`, run \`pnpm get fetch-retries\`. | ||
To set a new value, run \`pnpm set fetch-retries <number>\`. | ||
- Set a bigger value for the \`fetch-retries\` config. | ||
To check the current value of \`fetch-retries\`, run \`pnpm get fetch-retries\`. | ||
To set a new value, run \`pnpm set fetch-retries <number>\`. | ||
- Set \`network-concurrency\` to 1. | ||
This change will slow down installation times, so it is recommended to | ||
delete the config once the internet connection is good again: \`pnpm config delete network-concurrency\` | ||
- Set \`network-concurrency\` to 1. | ||
This change will slow down installation times, so it is recommended to | ||
delete the config once the internet connection is good again: \`pnpm config delete network-concurrency\` | ||
NOTE: You may also override configs via flags. | ||
For instance, \`pnpm install --fetch-retries 5 --network-concurrency 1\` | ||
`; | ||
NOTE: You may also override configs via flags. | ||
For instance, \`pnpm install --fetch-retries 5 --network-concurrency 1\``; | ||
} | ||
@@ -239,14 +223,13 @@ function reportLifecycleError(msg) { | ||
if (msg.wanted.pnpm) { | ||
output += stripIndent ` | ||
${formatErrorSummary(`Your pnpm version is incompatible with "${msg.packageId}".`)} | ||
output += `\ | ||
${formatErrorSummary(`Your pnpm version is incompatible with "${msg.packageId}".`)} | ||
Expected version: ${msg.wanted.pnpm} | ||
Got: ${msg.current.pnpm} | ||
Expected version: ${msg.wanted.pnpm} | ||
Got: ${msg.current.pnpm} | ||
This is happening because the package's manifest has an engines.pnpm field specified. | ||
To fix this issue, install the required pnpm version globally. | ||
This is happening because the package's manifest has an engines.pnpm field specified. | ||
To fix this issue, install the required pnpm version globally. | ||
To install the latest version of pnpm, run "pnpm i -g pnpm". | ||
To check your pnpm version, run "pnpm -v". | ||
`; | ||
To install the latest version of pnpm, run "pnpm i -g pnpm". | ||
To check your pnpm version, run "pnpm -v".`; | ||
} | ||
@@ -256,11 +239,10 @@ if (msg.wanted.node) { | ||
output += constants_1.EOL + constants_1.EOL; | ||
output += stripIndent ` | ||
${formatErrorSummary(`Your Node version is incompatible with "${msg.packageId}".`)} | ||
output += `\ | ||
${formatErrorSummary(`Your Node version is incompatible with "${msg.packageId}".`)} | ||
Expected version: ${msg.wanted.node} | ||
Got: ${msg.current.node} | ||
Expected version: ${msg.wanted.node} | ||
Got: ${msg.current.node} | ||
This is happening because the package's manifest has an engines.node field specified. | ||
To fix this issue, install the required Node version. | ||
`; | ||
This is happening because the package's manifest has an engines.node field specified. | ||
To fix this issue, install the required Node version.`; | ||
} | ||
@@ -267,0 +249,0 @@ return output || formatErrorSummary(err.message); |
{ | ||
"name": "@pnpm/default-reporter", | ||
"version": "7.4.2", | ||
"version": "7.4.3", | ||
"description": "The default reporter of pnpm", | ||
@@ -33,10 +33,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@pnpm/config": "9.2.0", | ||
"@pnpm/core-loggers": "4.1.1", | ||
"@pnpm/config": "10.0.0", | ||
"@pnpm/core-loggers": "4.1.2", | ||
"@pnpm/error": "1.2.0", | ||
"@pnpm/types": "6.1.0", | ||
"@pnpm/types": "6.2.0", | ||
"@zkochan/zen-push": "1.0.0", | ||
"ansi-diff": "^1.1.1", | ||
"chalk": "^4.1.0", | ||
"common-tags": "^1.8.0", | ||
"most": "^1.8.1", | ||
@@ -57,3 +56,2 @@ "normalize-path": "^3.0.0", | ||
"@pnpm/logger": "3.2.2", | ||
"@types/common-tags": "^1.8.0", | ||
"@types/normalize-path": "^3.0.0", | ||
@@ -60,0 +58,0 @@ "@types/pretty-time": "^1.1.0", |
18
10
71544
1645
+ Added@pnpm/config@10.0.0(transitive)
+ Added@pnpm/core-loggers@4.1.2(transitive)
+ Added@pnpm/error@1.4.0(transitive)
+ Added@pnpm/global-bin-dir@1.2.6(transitive)
+ Added@pnpm/types@6.2.0(transitive)
+ Addedcan-write-to-dir@1.1.1(transitive)
+ Addedcrypto-random-string@2.0.0(transitive)
+ Addedpath-name@1.0.0(transitive)
+ Addedpath-temp@2.1.0(transitive)
+ Addedunique-string@2.0.0(transitive)
- Removedcommon-tags@^1.8.0
- Removed@pnpm/config@9.2.0(transitive)
- Removed@pnpm/core-loggers@4.1.1(transitive)
- Removed@pnpm/types@6.1.0(transitive)
- Removedcommon-tags@1.8.2(transitive)
Updated@pnpm/config@10.0.0
Updated@pnpm/core-loggers@4.1.2
Updated@pnpm/types@6.2.0