@teambit/pnpm 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,8 @@ class BitErrorWithRichMessage extends _bitError().BitError {
|
|
|
27
27
|
}
|
|
28
28
|
exports.BitErrorWithRichMessage = BitErrorWithRichMessage;
|
|
29
29
|
function pnpmErrorToBitError(err) {
|
|
30
|
-
const
|
|
30
|
+
const msg = renderErrorMessage(err);
|
|
31
|
+
const newErr = new BitErrorWithRichMessage(msg, msg);
|
|
31
32
|
newErr.cause = err;
|
|
32
33
|
return newErr;
|
|
33
34
|
}
|
|
@@ -36,11 +37,27 @@ function renderErrorMessage(err) {
|
|
|
36
37
|
if ((_err$code = err.code) !== null && _err$code !== void 0 && _err$code.startsWith('ERR_PNPM_FETCH_')) {
|
|
37
38
|
// On fetching errors, pnpm adds information to the error object about the used auth headers.
|
|
38
39
|
// This information is safe to print as the tokens are obfuscated.
|
|
39
|
-
|
|
40
|
+
let output = `${err.message}
|
|
40
41
|
|
|
41
42
|
${err.hint}`;
|
|
43
|
+
if (err.pkgsStack != null) {
|
|
44
|
+
if (err.pkgsStack.length > 0) {
|
|
45
|
+
output += `\n\n${formatPkgsStack(err.pkgsStack)}`;
|
|
46
|
+
} else if (err.prefix) {
|
|
47
|
+
output += `\n\nThis error happened while installing a direct dependency of ${err.prefix}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return output;
|
|
42
51
|
}
|
|
43
52
|
return err.message;
|
|
44
53
|
}
|
|
54
|
+
function formatPkgsStack(pkgsStack) {
|
|
55
|
+
return `This error happened while installing the dependencies of \
|
|
56
|
+
${pkgsStack[0].name}@${pkgsStack[0].version}\
|
|
57
|
+
${pkgsStack.slice(1).map(({
|
|
58
|
+
name,
|
|
59
|
+
version
|
|
60
|
+
}) => `\n at ${name}@${version}`).join('')}`;
|
|
61
|
+
}
|
|
45
62
|
|
|
46
63
|
//# sourceMappingURL=pnpm-error-to-bit-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","BitErrorWithRichMessage","BitError","constructor","message","richMessage","report","exports","pnpmErrorToBitError","err","
|
|
1
|
+
{"version":3,"names":["_bitError","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","BitErrorWithRichMessage","BitError","constructor","message","richMessage","report","exports","pnpmErrorToBitError","err","msg","renderErrorMessage","newErr","cause","_err$code","code","startsWith","output","pkgsStack","length","formatPkgsStack","prefix","name","version","slice","map","join"],"sources":["pnpm-error-to-bit-error.ts"],"sourcesContent":["import { PnpmError } from '@pnpm/error';\nimport { BitError } from '@teambit/bit-error';\n\nexport class BitErrorWithRichMessage extends BitError {\n private richMessage: string;\n constructor(message: string, richMessage: string) {\n super(message);\n this.richMessage = richMessage;\n }\n public report() {\n return this.richMessage;\n }\n}\n\nexport function pnpmErrorToBitError(err: PnpmError): BitError {\n const msg = renderErrorMessage(err);\n const newErr = new BitErrorWithRichMessage(msg, msg);\n newErr.cause = err;\n return newErr;\n}\n\nfunction renderErrorMessage(err: PnpmError): string {\n if (err.code?.startsWith('ERR_PNPM_FETCH_')) {\n // On fetching errors, pnpm adds information to the error object about the used auth headers.\n // This information is safe to print as the tokens are obfuscated.\n let output = `${err.message}\n\n${err.hint}`;\n if (err.pkgsStack != null) {\n if (err.pkgsStack.length > 0) {\n output += `\\n\\n${formatPkgsStack(err.pkgsStack)}`;\n } else if (err.prefix) {\n output += `\\n\\nThis error happened while installing a direct dependency of ${err.prefix as string}`;\n }\n }\n return output;\n }\n return err.message;\n}\n\nfunction formatPkgsStack(pkgsStack: Array<{ id: string; name: string; version: string }>) {\n return `This error happened while installing the dependencies of \\\n${pkgsStack[0].name}@${pkgsStack[0].version}\\\n${pkgsStack\n .slice(1)\n .map(({ name, version }) => `\\n at ${name}@${version}`)\n .join('')}`;\n}\n"],"mappings":";;;;;;;AACA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAEvC,MAAMU,uBAAuB,SAASC,oBAAQ,CAAC;EAEpDC,WAAWA,CAACC,OAAe,EAAEC,WAAmB,EAAE;IAChD,KAAK,CAACD,OAAO,CAAC;IAAC1B,eAAA;IACf,IAAI,CAAC2B,WAAW,GAAGA,WAAW;EAChC;EACOC,MAAMA,CAAA,EAAG;IACd,OAA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ACtDG,IAAI,CAAC,EAAE,CAAE,EAAC;AACb"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_pnpm@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_pnpm@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_pnpm@1.0.25/dist/pnpm.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_pnpm@1.0.25/dist/pnpm.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/pnpm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/dependencies/pnpm",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.dependencies",
|
|
8
8
|
"name": "pnpm",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.25"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@pnpm/config": "
|
|
12
|
+
"@pnpm/config": "20.0.0",
|
|
13
13
|
"credentials-by-uri": "2.0.0",
|
|
14
14
|
"lodash": "4.17.21",
|
|
15
15
|
"nerf-dart": "1.0.0",
|
|
16
16
|
"@pnpm/logger": "5.0.0",
|
|
17
|
-
"@pnpm/client": "10.0.
|
|
18
|
-
"@pnpm/core": "
|
|
19
|
-
"@pnpm/default-reporter": "12.4.
|
|
17
|
+
"@pnpm/client": "10.0.29",
|
|
18
|
+
"@pnpm/core": "13.0.1",
|
|
19
|
+
"@pnpm/default-reporter": "12.4.3",
|
|
20
20
|
"@pnpm/modules-yaml": "12.1.3",
|
|
21
|
-
"@pnpm/package-store": "19.0.
|
|
21
|
+
"@pnpm/package-store": "19.0.6",
|
|
22
22
|
"@pnpm/pick-registry-for-package": "5.0.3",
|
|
23
|
-
"@pnpm/plugin-commands-rebuild": "9.2.
|
|
24
|
-
"@pnpm/sort-packages": "5.0.
|
|
25
|
-
"@pnpm/store-connection-manager": "7.0.
|
|
23
|
+
"@pnpm/plugin-commands-rebuild": "9.2.5",
|
|
24
|
+
"@pnpm/sort-packages": "5.0.6",
|
|
25
|
+
"@pnpm/store-connection-manager": "7.0.8",
|
|
26
26
|
"@pnpm/types": "9.3.0",
|
|
27
|
-
"@pnpm/worker": "0.3.
|
|
28
|
-
"@pnpm/workspace.pkgs-graph": "2.0.
|
|
27
|
+
"@pnpm/worker": "0.3.5",
|
|
28
|
+
"@pnpm/workspace.pkgs-graph": "2.0.8",
|
|
29
29
|
"fs-extra": "10.0.0",
|
|
30
30
|
"parse-package-name": "0.1.0",
|
|
31
31
|
"semver": "7.5.2",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@babel/runtime": "7.20.0",
|
|
37
37
|
"@teambit/harmony": "0.4.6",
|
|
38
38
|
"@teambit/ui-foundation.ui.use-box.menu": "1.0.5",
|
|
39
|
-
"@teambit/dependency-resolver": "1.0.
|
|
40
|
-
"@teambit/logger": "0.0.
|
|
39
|
+
"@teambit/dependency-resolver": "1.0.25",
|
|
40
|
+
"@teambit/logger": "0.0.892",
|
|
41
41
|
"@teambit/bit-error": "0.0.404",
|
|
42
|
-
"@teambit/cli": "0.0.
|
|
43
|
-
"@teambit/component": "1.0.
|
|
44
|
-
"@teambit/ui": "1.0.
|
|
42
|
+
"@teambit/cli": "0.0.799",
|
|
43
|
+
"@teambit/component": "1.0.25",
|
|
44
|
+
"@teambit/ui": "1.0.25"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/lodash": "4.14.165",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@teambit/dependencies.aspect-docs.pnpm": "0.0.162"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@teambit/legacy": "1.0.
|
|
59
|
+
"@teambit/legacy": "1.0.578",
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
62
62
|
},
|