@pnpm/tools.plugin-commands-self-updater 1000.1.33 → 1000.1.35
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/installPnpmToTools.js +10 -3
- package/lib/installPnpmToTools.js.map +1 -1
- package/package.json +13 -11
|
@@ -11,9 +11,12 @@ const exec_pnpm_cli_runner_1 = require("@pnpm/exec.pnpm-cli-runner");
|
|
|
11
11
|
const tools_path_1 = require("@pnpm/tools.path");
|
|
12
12
|
const rimraf_1 = require("@zkochan/rimraf");
|
|
13
13
|
const path_temp_1 = require("path-temp");
|
|
14
|
-
const
|
|
14
|
+
const semver_1 = __importDefault(require("semver"));
|
|
15
|
+
const symlink_dir_1 = __importDefault(require("symlink-dir"));
|
|
15
16
|
async function installPnpmToTools(pnpmVersion, opts) {
|
|
16
|
-
|
|
17
|
+
// We have moved pnpm to esm and that prevents us from using pkg to bundle pnpm to an executable.
|
|
18
|
+
// Related issue: https://github.com/yao-pkg/pkg/issues/16
|
|
19
|
+
const currentPkgName = semver_1.default.gt(pnpmVersion, '11.0.0-alpha') ? 'pnpm' : (0, cli_meta_1.getCurrentPackageName)();
|
|
17
20
|
const dir = (0, tools_path_1.getToolDirPath)({
|
|
18
21
|
pnpmHomeDir: opts.pnpmHomeDir,
|
|
19
22
|
tool: {
|
|
@@ -47,7 +50,11 @@ async function installPnpmToTools(pnpmVersion, opts) {
|
|
|
47
50
|
'--config.node-linker=hoisted',
|
|
48
51
|
'--config.bin=bin',
|
|
49
52
|
], { cwd: stage });
|
|
50
|
-
|
|
53
|
+
// We need the operation of installing pnpm to be atomic.
|
|
54
|
+
// However, we cannot use a rename as that breaks the command shim created for pnpm.
|
|
55
|
+
// Hence, we use a symlink.
|
|
56
|
+
// In future we may switch back to rename if we will move Node.js out of the pnpm subdirectory.
|
|
57
|
+
symlink_dir_1.default.sync(stage, dir);
|
|
51
58
|
}
|
|
52
59
|
catch (err) {
|
|
53
60
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installPnpmToTools.js","sourceRoot":"","sources":["../src/installPnpmToTools.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"installPnpmToTools.js","sourceRoot":"","sources":["../src/installPnpmToTools.ts"],"names":[],"mappings":";;;;;AAiBA,gDAsDC;AAvED,4CAAmB;AACnB,gDAAuB;AACvB,6CAAsD;AACtD,qEAAuD;AACvD,iDAAiD;AACjD,4CAAgD;AAChD,yCAAoD;AACpD,oDAA2B;AAC3B,8DAAoC;AAS7B,KAAK,UAAU,kBAAkB,CAAE,WAAmB,EAAE,IAA8B;IAC3F,iGAAiG;IACjG,0DAA0D;IAC1D,MAAM,cAAc,GAAG,gBAAM,CAAC,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,gCAAqB,GAAE,CAAA;IAChG,MAAM,GAAG,GAAG,IAAA,2BAAc,EAAC;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,WAAW;SACrB;KACF,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACpC,MAAM,cAAc,GAAG,YAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC5C,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO;YACL,cAAc;YACd,OAAO,EAAE,GAAG;YACZ,MAAM;SACP,CAAA;IACH,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,wBAAQ,EAAC,GAAG,CAAC,CAAA;IAC3B,YAAE,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACxC,YAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,CAAA;IACxD,IAAI,CAAC;QACH,gHAAgH;QAChH,2DAA2D;QAC3D,IAAA,iCAAU,EAAC;YACT,KAAK;YACL,GAAG,cAAc,IAAI,WAAW,EAAE;YAClC,kBAAkB;YAClB,yBAAyB;YACzB,mCAAmC;YACnC,wDAAwD;YACxD,yCAAyC;YACzC,8BAA8B;YAC9B,kBAAkB;SACnB,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;QAClB,yDAAyD;QACzD,oFAAoF;QACpF,2BAA2B;QAC3B,+FAA+F;QAC/F,qBAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAC7B,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,IAAA,aAAM,EAAC,KAAK,CAAC,CAAA;QACf,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC,CAAC,+BAA+B;QAC1C,MAAM,GAAG,CAAA;IACX,CAAC;IACD,OAAO;QACL,cAAc;QACd,OAAO,EAAE,GAAG;QACZ,MAAM;KACP,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/tools.plugin-commands-self-updater",
|
|
3
|
-
"version": "1000.1.
|
|
3
|
+
"version": "1000.1.35",
|
|
4
4
|
"description": "A command for updating pnpm itself",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -27,17 +27,18 @@
|
|
|
27
27
|
"@zkochan/rimraf": "^3.0.2",
|
|
28
28
|
"path-temp": "^2.1.0",
|
|
29
29
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
30
|
-
"rename-overwrite": "^6.0.2",
|
|
31
30
|
"render-help": "^1.0.3",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@pnpm/cli-meta": "1000.0.
|
|
35
|
-
"@pnpm/
|
|
31
|
+
"semver": "^7.7.1",
|
|
32
|
+
"symlink-dir": "^6.0.5",
|
|
33
|
+
"@pnpm/cli-meta": "1000.0.13",
|
|
34
|
+
"@pnpm/cli-utils": "1001.2.12",
|
|
35
|
+
"@pnpm/client": "1001.1.8",
|
|
36
|
+
"@pnpm/config": "1004.6.2",
|
|
36
37
|
"@pnpm/exec.pnpm-cli-runner": "1000.0.1",
|
|
38
|
+
"@pnpm/link-bins": "1000.3.1",
|
|
39
|
+
"@pnpm/read-project-manifest": "1001.2.1",
|
|
37
40
|
"@pnpm/error": "1000.0.5",
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/tools.path": "1000.0.0",
|
|
40
|
-
"@pnpm/link-bins": "1000.3.0"
|
|
41
|
+
"@pnpm/tools.path": "1000.0.0"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -46,11 +47,12 @@
|
|
|
46
47
|
"@jest/globals": "29.7.0",
|
|
47
48
|
"@types/cross-spawn": "^6.0.6",
|
|
48
49
|
"@types/ramda": "0.29.12",
|
|
50
|
+
"@types/semver": "7.5.3",
|
|
49
51
|
"cross-spawn": "^7.0.6",
|
|
50
52
|
"nock": "13.3.4",
|
|
51
53
|
"@pnpm/env.path": "1000.0.0",
|
|
52
|
-
"@pnpm/prepare": "1000.0.
|
|
53
|
-
"@pnpm/tools.plugin-commands-self-updater": "1000.1.
|
|
54
|
+
"@pnpm/prepare": "1000.0.7",
|
|
55
|
+
"@pnpm/tools.plugin-commands-self-updater": "1000.1.35"
|
|
54
56
|
},
|
|
55
57
|
"engines": {
|
|
56
58
|
"node": ">=18.12"
|