@pnpm/error 1000.1.0 → 1100.0.0
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.
- package/lib/index.js +5 -11
- package/package.json +11 -11
- package/lib/index.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.LockfileMissingDependencyError = exports.FetchError = exports.PnpmError = void 0;
|
|
4
|
-
const constants_1 = require("@pnpm/constants");
|
|
5
|
-
class PnpmError extends Error {
|
|
1
|
+
import { WANTED_LOCKFILE } from '@pnpm/constants';
|
|
2
|
+
export class PnpmError extends Error {
|
|
6
3
|
code;
|
|
7
4
|
hint;
|
|
8
5
|
attempts;
|
|
@@ -15,8 +12,7 @@ class PnpmError extends Error {
|
|
|
15
12
|
this.attempts = opts?.attempts;
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
|
|
19
|
-
class FetchError extends PnpmError {
|
|
15
|
+
export class FetchError extends PnpmError {
|
|
20
16
|
response;
|
|
21
17
|
request;
|
|
22
18
|
constructor(request, response, hint) {
|
|
@@ -43,7 +39,6 @@ class FetchError extends PnpmError {
|
|
|
43
39
|
this.response = response;
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
|
-
exports.FetchError = FetchError;
|
|
47
42
|
function hideAuthInformation(authHeaderValue) {
|
|
48
43
|
const [authType, token] = authHeaderValue.split(' ');
|
|
49
44
|
if (token == null)
|
|
@@ -53,14 +48,13 @@ function hideAuthInformation(authHeaderValue) {
|
|
|
53
48
|
}
|
|
54
49
|
return `${authType} ${token.substring(0, 4)}[hidden]`;
|
|
55
50
|
}
|
|
56
|
-
class LockfileMissingDependencyError extends PnpmError {
|
|
51
|
+
export class LockfileMissingDependencyError extends PnpmError {
|
|
57
52
|
constructor(depPath) {
|
|
58
|
-
const message = `Broken lockfile: no entry for '${depPath}' in ${
|
|
53
|
+
const message = `Broken lockfile: no entry for '${depPath}' in ${WANTED_LOCKFILE}`;
|
|
59
54
|
super('LOCKFILE_MISSING_DEPENDENCY', message, {
|
|
60
55
|
hint: 'This issue is probably caused by a badly resolved merge conflict.\n' +
|
|
61
56
|
'To fix the lockfile, run \'pnpm install --no-frozen-lockfile\'.',
|
|
62
57
|
});
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
|
-
exports.LockfileMissingDependencyError = LockfileMissingDependencyError;
|
|
66
60
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/error",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1100.0.0",
|
|
4
4
|
"description": "An error class for pnpm errors",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
7
|
-
"
|
|
7
|
+
"pnpm11",
|
|
8
8
|
"error"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"funding": "https://opencollective.com/pnpm",
|
|
12
|
-
"repository": "https://github.com/pnpm/pnpm/tree/main/
|
|
13
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/
|
|
12
|
+
"repository": "https://github.com/pnpm/pnpm/tree/main/core/error",
|
|
13
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/core/error#readme",
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
16
16
|
},
|
|
17
|
-
"type": "
|
|
17
|
+
"type": "module",
|
|
18
18
|
"main": "lib/index.js",
|
|
19
19
|
"types": "lib/index.d.ts",
|
|
20
20
|
"exports": {
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"!*.map"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pnpm/constants": "
|
|
28
|
+
"@pnpm/constants": "1100.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@pnpm/error": "
|
|
31
|
+
"@pnpm/error": "1100.0.0"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
34
|
+
"node": ">=22.13"
|
|
35
35
|
},
|
|
36
36
|
"jest": {
|
|
37
37
|
"preset": "@pnpm/jest-config"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
41
|
+
"test": "pn compile && pn .test",
|
|
42
|
+
"compile": "tsgo --build && pn lint --fix",
|
|
43
|
+
".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AAEjD,MAAa,SAAU,SAAQ,KAAK;IAClB,IAAI,CAAQ;IACZ,IAAI,CAAS;IACtB,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,SAAS,CAAuD;IACvE,YACE,IAAY,EACZ,OAAe,EACf,IAIC;QAED,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,CAAA;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,EAAE,QAAQ,CAAA;IAChC,CAAC;CACF;AApBD,8BAoBC;AAMD,MAAa,UAAW,SAAQ,SAAS;IACvB,QAAQ,CAAoB;IAC5B,OAAO,CAAmB;IAE1C,YACE,OAA0B,EA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