@pnpm/get-context 1001.0.1 → 1001.0.2
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/package.json +8 -8
- package/lib/checkCompatibility/BreakingChangeError.d.ts +0 -12
- package/lib/checkCompatibility/BreakingChangeError.js +0 -14
- package/lib/checkCompatibility/BreakingChangeError.js.map +0 -1
- package/lib/checkCompatibility/ErrorRelatedSources.d.ts +0 -5
- package/lib/checkCompatibility/ErrorRelatedSources.js +0 -3
- package/lib/checkCompatibility/ErrorRelatedSources.js.map +0 -1
- package/lib/checkCompatibility/ModulesBreakingChangeError.d.ts +0 -9
- package/lib/checkCompatibility/ModulesBreakingChangeError.js +0 -18
- package/lib/checkCompatibility/ModulesBreakingChangeError.js.map +0 -1
- package/lib/checkCompatibility/UnexpectedStoreError.d.ts +0 -11
- package/lib/checkCompatibility/UnexpectedStoreError.js +0 -14
- package/lib/checkCompatibility/UnexpectedStoreError.js.map +0 -1
- package/lib/checkCompatibility/UnexpectedVirtualStoreDirError.d.ts +0 -11
- package/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js +0 -14
- package/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js.map +0 -1
- package/lib/checkCompatibility/index.d.ts +0 -6
- package/lib/checkCompatibility/index.js +0 -37
- package/lib/checkCompatibility/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/get-context",
|
|
3
|
-
"version": "1001.0.
|
|
3
|
+
"version": "1001.0.2",
|
|
4
4
|
"description": "Gets context information about a project",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/pkg-manager/get-context#readme",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/ramda": "0.29.12",
|
|
27
|
-
"@pnpm/get-context": "1001.0.
|
|
27
|
+
"@pnpm/get-context": "1001.0.2",
|
|
28
28
|
"@pnpm/logger": "1000.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"ci-info": "^3.9.0",
|
|
35
35
|
"path-absolute": "^1.0.1",
|
|
36
36
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
37
|
-
"@pnpm/core-loggers": "1000.0.0",
|
|
38
|
-
"@pnpm/lockfile.fs": "1001.1.0",
|
|
39
|
-
"@pnpm/modules-yaml": "1000.0.0",
|
|
40
|
-
"@pnpm/read-projects-context": "1000.0.2",
|
|
41
37
|
"@pnpm/constants": "1001.0.0",
|
|
42
|
-
"@pnpm/
|
|
43
|
-
"@pnpm/
|
|
38
|
+
"@pnpm/core-loggers": "1000.1.0",
|
|
39
|
+
"@pnpm/modules-yaml": "1000.1.0",
|
|
40
|
+
"@pnpm/read-projects-context": "1000.0.3",
|
|
41
|
+
"@pnpm/types": "1000.0.0",
|
|
42
|
+
"@pnpm/lockfile.fs": "1001.1.0",
|
|
43
|
+
"@pnpm/resolver-base": "1000.1.0"
|
|
44
44
|
},
|
|
45
45
|
"funding": "https://opencollective.com/pnpm",
|
|
46
46
|
"exports": {
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PnpmError } from '@pnpm/error';
|
|
2
|
-
import { type ErrorRelatedSources } from './ErrorRelatedSources';
|
|
3
|
-
export type BreakingChangeErrorOptions = ErrorRelatedSources & {
|
|
4
|
-
code: string;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class BreakingChangeError extends PnpmError {
|
|
8
|
-
relatedIssue?: number;
|
|
9
|
-
relatedPR?: number;
|
|
10
|
-
additionalInformation?: string;
|
|
11
|
-
constructor(opts: BreakingChangeErrorOptions);
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BreakingChangeError = void 0;
|
|
4
|
-
const error_1 = require("@pnpm/error");
|
|
5
|
-
class BreakingChangeError extends error_1.PnpmError {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super(opts.code, opts.message);
|
|
8
|
-
this.relatedIssue = opts.relatedIssue;
|
|
9
|
-
this.relatedPR = opts.relatedPR;
|
|
10
|
-
this.additionalInformation = opts.additionalInformation;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.BreakingChangeError = BreakingChangeError;
|
|
14
|
-
//# sourceMappingURL=BreakingChangeError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BreakingChangeError.js","sourceRoot":"","sources":["../../src/checkCompatibility/BreakingChangeError.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAQvC,MAAa,mBAAoB,SAAQ,iBAAS;IAIhD,YAAa,IAAgC;QAC3C,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;QAC/B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAA;IACzD,CAAC;CACF;AAVD,kDAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorRelatedSources.js","sourceRoot":"","sources":["../../src/checkCompatibility/ErrorRelatedSources.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BreakingChangeError } from './BreakingChangeError';
|
|
2
|
-
import { type ErrorRelatedSources } from './ErrorRelatedSources';
|
|
3
|
-
export type ModulesBreakingChangeErrorOptions = ErrorRelatedSources & {
|
|
4
|
-
modulesPath: string;
|
|
5
|
-
};
|
|
6
|
-
export declare class ModulesBreakingChangeError extends BreakingChangeError {
|
|
7
|
-
modulesPath: string;
|
|
8
|
-
constructor(opts: ModulesBreakingChangeErrorOptions);
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModulesBreakingChangeError = void 0;
|
|
4
|
-
const BreakingChangeError_1 = require("./BreakingChangeError");
|
|
5
|
-
class ModulesBreakingChangeError extends BreakingChangeError_1.BreakingChangeError {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
additionalInformation: opts.additionalInformation,
|
|
9
|
-
code: 'MODULES_BREAKING_CHANGE',
|
|
10
|
-
message: `The node_modules structure at "${opts.modulesPath}" is not compatible with the current pnpm version. Run "pnpm install --force" to recreate node_modules.`,
|
|
11
|
-
relatedIssue: opts.relatedIssue,
|
|
12
|
-
relatedPR: opts.relatedPR,
|
|
13
|
-
});
|
|
14
|
-
this.modulesPath = opts.modulesPath;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.ModulesBreakingChangeError = ModulesBreakingChangeError;
|
|
18
|
-
//# sourceMappingURL=ModulesBreakingChangeError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesBreakingChangeError.js","sourceRoot":"","sources":["../../src/checkCompatibility/ModulesBreakingChangeError.ts"],"names":[],"mappings":";;;AAAA,+DAA2D;AAO3D,MAAa,0BAA2B,SAAQ,yCAAmB;IAEjE,YAAa,IAAuC;QAClD,KAAK,CAAC;YACJ,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,IAAI,EAAE,yBAAyB;YAC/B,OAAO,EAAE,kCAAkC,IAAI,CAAC,WAAW,yGAAyG;YACpK,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;QACF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;IACrC,CAAC;CACF;AAZD,gEAYC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PnpmError } from '@pnpm/error';
|
|
2
|
-
export declare class UnexpectedStoreError extends PnpmError {
|
|
3
|
-
expectedStorePath: string;
|
|
4
|
-
actualStorePath: string;
|
|
5
|
-
modulesDir: string;
|
|
6
|
-
constructor(opts: {
|
|
7
|
-
expectedStorePath: string;
|
|
8
|
-
actualStorePath: string;
|
|
9
|
-
modulesDir: string;
|
|
10
|
-
});
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnexpectedStoreError = void 0;
|
|
4
|
-
const error_1 = require("@pnpm/error");
|
|
5
|
-
class UnexpectedStoreError extends error_1.PnpmError {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super('UNEXPECTED_STORE', 'Unexpected store location');
|
|
8
|
-
this.expectedStorePath = opts.expectedStorePath;
|
|
9
|
-
this.actualStorePath = opts.actualStorePath;
|
|
10
|
-
this.modulesDir = opts.modulesDir;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.UnexpectedStoreError = UnexpectedStoreError;
|
|
14
|
-
//# sourceMappingURL=UnexpectedStoreError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnexpectedStoreError.js","sourceRoot":"","sources":["../../src/checkCompatibility/UnexpectedStoreError.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,MAAa,oBAAqB,SAAQ,iBAAS;IAIjD,YACE,IAIC;QAED,KAAK,CAAC,kBAAkB,EAAE,2BAA2B,CAAC,CAAA;QACtD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAA;QAC/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;IACnC,CAAC;CACF;AAhBD,oDAgBC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PnpmError } from '@pnpm/error';
|
|
2
|
-
export declare class UnexpectedVirtualStoreDirError extends PnpmError {
|
|
3
|
-
expected: string;
|
|
4
|
-
actual: string;
|
|
5
|
-
modulesDir: string;
|
|
6
|
-
constructor(opts: {
|
|
7
|
-
expected: string;
|
|
8
|
-
actual: string;
|
|
9
|
-
modulesDir: string;
|
|
10
|
-
});
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnexpectedVirtualStoreDirError = void 0;
|
|
4
|
-
const error_1 = require("@pnpm/error");
|
|
5
|
-
class UnexpectedVirtualStoreDirError extends error_1.PnpmError {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super('UNEXPECTED_VIRTUAL_STORE', 'Unexpected virtual store location');
|
|
8
|
-
this.expected = opts.expected;
|
|
9
|
-
this.actual = opts.actual;
|
|
10
|
-
this.modulesDir = opts.modulesDir;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.UnexpectedVirtualStoreDirError = UnexpectedVirtualStoreDirError;
|
|
14
|
-
//# sourceMappingURL=UnexpectedVirtualStoreDirError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnexpectedVirtualStoreDirError.js","sourceRoot":"","sources":["../../src/checkCompatibility/UnexpectedVirtualStoreDirError.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,MAAa,8BAA+B,SAAQ,iBAAS;IAI3D,YACE,IAIC;QAED,KAAK,CAAC,0BAA0B,EAAE,mCAAmC,CAAC,CAAA;QACtE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;IACnC,CAAC;CACF;AAhBD,wEAgBC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkCompatibility = checkCompatibility;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const constants_1 = require("@pnpm/constants");
|
|
9
|
-
const ModulesBreakingChangeError_1 = require("./ModulesBreakingChangeError");
|
|
10
|
-
const UnexpectedStoreError_1 = require("./UnexpectedStoreError");
|
|
11
|
-
const UnexpectedVirtualStoreDirError_1 = require("./UnexpectedVirtualStoreDirError");
|
|
12
|
-
function checkCompatibility(modules, opts) {
|
|
13
|
-
if (!modules.layoutVersion || modules.layoutVersion !== constants_1.LAYOUT_VERSION) {
|
|
14
|
-
throw new ModulesBreakingChangeError_1.ModulesBreakingChangeError({
|
|
15
|
-
modulesPath: opts.modulesDir,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
// Important: comparing paths with path.relative()
|
|
19
|
-
// is the only way to compare paths correctly on Windows
|
|
20
|
-
// as of Node.js 4-9
|
|
21
|
-
// See related issue: https://github.com/pnpm/pnpm/issues/996
|
|
22
|
-
if (!modules.storeDir || path_1.default.relative(modules.storeDir, opts.storeDir) !== '') {
|
|
23
|
-
throw new UnexpectedStoreError_1.UnexpectedStoreError({
|
|
24
|
-
actualStorePath: opts.storeDir,
|
|
25
|
-
expectedStorePath: modules.storeDir,
|
|
26
|
-
modulesDir: opts.modulesDir,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
if (modules.virtualStoreDir && path_1.default.relative(modules.virtualStoreDir, opts.virtualStoreDir) !== '') {
|
|
30
|
-
throw new UnexpectedVirtualStoreDirError_1.UnexpectedVirtualStoreDirError({
|
|
31
|
-
actual: opts.virtualStoreDir,
|
|
32
|
-
expected: modules.virtualStoreDir,
|
|
33
|
-
modulesDir: opts.modulesDir,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkCompatibility/index.ts"],"names":[],"mappings":";;;;;AAOA,gDA+BC;AAtCD,gDAAuB;AACvB,+CAAgD;AAEhD,6EAAyE;AACzE,iEAA6D;AAC7D,qFAAiF;AAEjF,SAAgB,kBAAkB,CAChC,OAAgB,EAChB,IAIC;IAED,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,aAAa,KAAK,0BAAc,EAAE,CAAC;QACvE,MAAM,IAAI,uDAA0B,CAAC;YACnC,WAAW,EAAE,IAAI,CAAC,UAAU;SAC7B,CAAC,CAAA;IACJ,CAAC;IACD,kDAAkD;IAClD,wDAAwD;IACxD,oBAAoB;IACpB,6DAA6D;IAC7D,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QAC/E,MAAM,IAAI,2CAAoB,CAAC;YAC7B,eAAe,EAAE,IAAI,CAAC,QAAQ;YAC9B,iBAAiB,EAAE,OAAO,CAAC,QAAQ;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,eAAe,IAAI,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC;QACnG,MAAM,IAAI,+DAA8B,CAAC;YACvC,MAAM,EAAE,IAAI,CAAC,eAAe;YAC5B,QAAQ,EAAE,OAAO,CAAC,eAAe;YACjC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
|