@pnpm/plugin-commands-installation 13.2.4 → 13.2.6
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AllowedDeprecatedVersions, type PackageExtension, type PeerDependencyRules, type ProjectManifest } from '@pnpm/types';
|
|
2
|
+
export declare function getOptionsFromRootManifest(manifestDir: string, manifest: ProjectManifest): {
|
|
3
|
+
allowedDeprecatedVersions?: AllowedDeprecatedVersions;
|
|
4
|
+
allowNonAppliedPatches?: boolean;
|
|
5
|
+
overrides?: Record<string, string>;
|
|
6
|
+
neverBuiltDependencies?: string[];
|
|
7
|
+
onlyBuiltDependencies?: string[];
|
|
8
|
+
onlyBuiltDependenciesFile?: string;
|
|
9
|
+
packageExtensions?: Record<string, PackageExtension>;
|
|
10
|
+
patchedDependencies?: Record<string, string>;
|
|
11
|
+
peerDependencyRules?: PeerDependencyRules;
|
|
12
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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.getOptionsFromRootManifest = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const error_1 = require("@pnpm/error");
|
|
9
|
+
const map_1 = __importDefault(require("ramda/src/map"));
|
|
10
|
+
function getOptionsFromRootManifest(manifestDir, manifest) {
|
|
11
|
+
// We read Yarn's resolutions field for compatibility
|
|
12
|
+
// but we really replace the version specs to any other version spec, not only to exact versions,
|
|
13
|
+
// so we cannot call it resolutions
|
|
14
|
+
const overrides = (0, map_1.default)(createVersionReferencesReplacer(manifest), manifest.pnpm?.overrides ?? manifest.resolutions ?? {});
|
|
15
|
+
const neverBuiltDependencies = manifest.pnpm?.neverBuiltDependencies;
|
|
16
|
+
const onlyBuiltDependencies = manifest.pnpm?.onlyBuiltDependencies;
|
|
17
|
+
const onlyBuiltDependenciesFile = manifest.pnpm?.onlyBuiltDependenciesFile;
|
|
18
|
+
const packageExtensions = manifest.pnpm?.packageExtensions;
|
|
19
|
+
const peerDependencyRules = manifest.pnpm?.peerDependencyRules;
|
|
20
|
+
const allowedDeprecatedVersions = manifest.pnpm?.allowedDeprecatedVersions;
|
|
21
|
+
const allowNonAppliedPatches = manifest.pnpm?.allowNonAppliedPatches;
|
|
22
|
+
const patchedDependencies = manifest.pnpm?.patchedDependencies;
|
|
23
|
+
const settings = {
|
|
24
|
+
allowedDeprecatedVersions,
|
|
25
|
+
allowNonAppliedPatches,
|
|
26
|
+
overrides,
|
|
27
|
+
neverBuiltDependencies,
|
|
28
|
+
packageExtensions,
|
|
29
|
+
peerDependencyRules,
|
|
30
|
+
patchedDependencies,
|
|
31
|
+
};
|
|
32
|
+
if (onlyBuiltDependencies) {
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
settings['onlyBuiltDependencies'] = onlyBuiltDependencies;
|
|
35
|
+
}
|
|
36
|
+
if (onlyBuiltDependenciesFile) {
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
settings['onlyBuiltDependenciesFile'] = path_1.default.join(manifestDir, onlyBuiltDependenciesFile);
|
|
39
|
+
}
|
|
40
|
+
return settings;
|
|
41
|
+
}
|
|
42
|
+
exports.getOptionsFromRootManifest = getOptionsFromRootManifest;
|
|
43
|
+
function createVersionReferencesReplacer(manifest) {
|
|
44
|
+
const allDeps = {
|
|
45
|
+
...manifest.devDependencies,
|
|
46
|
+
...manifest.dependencies,
|
|
47
|
+
...manifest.optionalDependencies,
|
|
48
|
+
};
|
|
49
|
+
return replaceVersionReferences.bind(null, allDeps);
|
|
50
|
+
}
|
|
51
|
+
function replaceVersionReferences(dep, spec) {
|
|
52
|
+
if (!(spec[0] === '$'))
|
|
53
|
+
return spec;
|
|
54
|
+
const dependencyName = spec.slice(1);
|
|
55
|
+
const newSpec = dep[dependencyName];
|
|
56
|
+
if (newSpec)
|
|
57
|
+
return newSpec;
|
|
58
|
+
throw new error_1.PnpmError('CANNOT_RESOLVE_OVERRIDE_VERSION', `Cannot resolve version ${spec} in overrides. The direct dependencies don't have dependency "${dependencyName}".`);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=getOptionsFromRootManifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOptionsFromRootManifest.js","sourceRoot":"","sources":["../src/getOptionsFromRootManifest.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,uCAAuC;AAOvC,wDAAqC;AAErC,SAAgB,0BAA0B,CAAE,WAAmB,EAAE,QAAyB;IAWxF,qDAAqD;IACrD,iGAAiG;IACjG,mCAAmC;IACnC,MAAM,SAAS,GAAG,IAAA,aAAS,EACzB,+BAA+B,CAAC,QAAQ,CAAC,EACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,QAAQ,CAAC,WAAW,IAAI,EAAE,CACvD,CAAA;IACD,MAAM,sBAAsB,GAAG,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACpE,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAA;IAClE,MAAM,yBAAyB,GAAG,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAA;IAC1E,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAC1D,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;IAC9D,MAAM,yBAAyB,GAAG,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAA;IAC1E,MAAM,sBAAsB,GAAG,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACpE,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;IAC9D,MAAM,QAAQ,GAAG;QACf,yBAAyB;QACzB,sBAAsB;QACtB,SAAS;QACT,sBAAsB;QACtB,iBAAiB;QACjB,mBAAmB;QACnB,mBAAmB;KACpB,CAAA;IACD,IAAI,qBAAqB,EAAE;QACzB,mBAAmB;QACnB,QAAQ,CAAC,uBAAuB,CAAC,GAAG,qBAAqB,CAAA;KAC1D;IACD,IAAI,yBAAyB,EAAE;QAC7B,mBAAmB;QACnB,QAAQ,CAAC,2BAA2B,CAAC,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,yBAAyB,CAAC,CAAA;KAC1F;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AA5CD,gEA4CC;AAED,SAAS,+BAA+B,CAAE,QAAyB;IACjE,MAAM,OAAO,GAAG;QACd,GAAG,QAAQ,CAAC,eAAe;QAC3B,GAAG,QAAQ,CAAC,YAAY;QACxB,GAAG,QAAQ,CAAC,oBAAoB;KACjC,CAAA;IACD,OAAO,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACrD,CAAC;AAED,SAAS,wBAAwB,CAAE,GAA2B,EAAE,IAAY;IAC1E,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACnC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACpC,MAAM,OAAO,GAAG,GAAG,CAAC,cAAc,CAAC,CAAA;IACnC,IAAI,OAAO;QAAE,OAAO,OAAO,CAAA;IAC3B,MAAM,IAAI,iBAAS,CACjB,iCAAiC,EACjC,0BAA0B,IAAI,iEAAiE,cAAc,IAAI,CAClH,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/plugin-commands-installation",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.6",
|
|
4
4
|
"description": "Commands for installation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"write-json-file": "^4.3.0",
|
|
40
40
|
"write-pkg": "4.0.0",
|
|
41
41
|
"write-yaml-file": "^5.0.0",
|
|
42
|
-
"@pnpm/assert-project": "2.3.39",
|
|
43
42
|
"@pnpm/modules-yaml": "12.1.3",
|
|
44
|
-
"@pnpm/plugin-commands-installation": "13.2.
|
|
43
|
+
"@pnpm/plugin-commands-installation": "13.2.6",
|
|
44
|
+
"@pnpm/test-fixtures": "0.1.12",
|
|
45
45
|
"@pnpm/prepare": "0.0.82",
|
|
46
|
-
"@pnpm/
|
|
46
|
+
"@pnpm/assert-project": "2.3.39"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@pnpm/colorize-semver-diff": "^1.0.1",
|
|
@@ -67,32 +67,32 @@
|
|
|
67
67
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
68
68
|
"render-help": "^1.0.3",
|
|
69
69
|
"version-selector-type": "^3.0.0",
|
|
70
|
-
"@pnpm/cli-utils": "2.0.24",
|
|
71
|
-
"@pnpm/command": "4.0.0",
|
|
72
|
-
"@pnpm/common-cli-options-help": "1.0.0",
|
|
73
70
|
"@pnpm/config": "20.0.0",
|
|
71
|
+
"@pnpm/command": "4.0.0",
|
|
74
72
|
"@pnpm/constants": "7.1.1",
|
|
75
|
-
"@pnpm/
|
|
76
|
-
"@pnpm/
|
|
73
|
+
"@pnpm/cli-utils": "2.0.24",
|
|
74
|
+
"@pnpm/common-cli-options-help": "1.0.0",
|
|
75
|
+
"@pnpm/core": "13.0.2",
|
|
77
76
|
"@pnpm/error": "5.0.2",
|
|
78
|
-
"@pnpm/filter-workspace-packages": "7.1.4",
|
|
79
77
|
"@pnpm/find-workspace-dir": "6.0.2",
|
|
80
78
|
"@pnpm/graceful-fs": "3.2.0",
|
|
81
79
|
"@pnpm/lockfile-types": "5.1.2",
|
|
82
|
-
"@pnpm/
|
|
80
|
+
"@pnpm/filter-workspace-packages": "7.1.4",
|
|
83
81
|
"@pnpm/matcher": "5.0.0",
|
|
84
|
-
"@pnpm/outdated": "13.0.
|
|
85
|
-
"@pnpm/package-store": "19.0.
|
|
82
|
+
"@pnpm/outdated": "13.0.25",
|
|
83
|
+
"@pnpm/package-store": "19.0.6",
|
|
86
84
|
"@pnpm/parse-wanted-dependency": "5.0.0",
|
|
87
|
-
"@pnpm/plugin-commands-rebuild": "9.2.
|
|
88
|
-
"@pnpm/pnpmfile": "5.0.14",
|
|
85
|
+
"@pnpm/plugin-commands-rebuild": "9.2.6",
|
|
89
86
|
"@pnpm/read-project-manifest": "5.0.7",
|
|
87
|
+
"@pnpm/pnpmfile": "5.0.14",
|
|
90
88
|
"@pnpm/resolver-base": "10.0.3",
|
|
91
|
-
"@pnpm/sort-packages": "5.0.
|
|
92
|
-
"@pnpm/store-connection-manager": "7.0.7",
|
|
89
|
+
"@pnpm/sort-packages": "5.0.6",
|
|
93
90
|
"@pnpm/types": "9.3.0",
|
|
94
|
-
"@pnpm/
|
|
95
|
-
"@pnpm/workspace.pkgs-graph": "2.0.8"
|
|
91
|
+
"@pnpm/store-connection-manager": "7.0.9",
|
|
92
|
+
"@pnpm/workspace.pkgs-graph": "2.0.8",
|
|
93
|
+
"@pnpm/dedupe.check": "1.0.4",
|
|
94
|
+
"@pnpm/manifest-utils": "5.0.4",
|
|
95
|
+
"@pnpm/workspace.find-packages": "1.0.14"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@pnpm/logger": "^5.0.0"
|