@pnpm/bins.remover 1100.0.19 → 1100.0.20
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/CHANGELOG.md +9 -0
- package/lib/removeBins.js +7 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @pnpm/remove-bins
|
|
2
2
|
|
|
3
|
+
## 1100.0.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Global installs now switch over atomically. The command shims in the global bin directory point at a stable per-package link rather than at the directory a particular install produced, so `pnpm add -g` and `pnpm update -g` activate a new version by moving that one link instead of rewriting every shim. A command can no longer be missing from `PATH` while an install is in progress, and a failed install leaves the previous version in place.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- @pnpm/pkg-manifest.reader@1100.0.16
|
|
11
|
+
|
|
3
12
|
## 1100.0.19
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/lib/removeBins.js
CHANGED
|
@@ -7,7 +7,7 @@ import { cmdExtension as CMD_EXTENSION } from 'cmd-extension';
|
|
|
7
7
|
import isWindows from 'is-windows';
|
|
8
8
|
async function removeOnWin(cmd) {
|
|
9
9
|
removalLogger.debug(cmd);
|
|
10
|
-
await Promise.
|
|
10
|
+
const results = await Promise.allSettled([
|
|
11
11
|
rimraf(cmd),
|
|
12
12
|
rimraf(`${cmd}.ps1`),
|
|
13
13
|
rimraf(`${cmd}${CMD_EXTENSION}`),
|
|
@@ -16,6 +16,12 @@ async function removeOnWin(cmd) {
|
|
|
16
16
|
// otherwise a stale `node.exe` survives on PATH after uninstall.
|
|
17
17
|
rimraf(`${cmd}.exe`),
|
|
18
18
|
]);
|
|
19
|
+
const errors = results.flatMap((result) => result.status === 'rejected' ? [result.reason] : []);
|
|
20
|
+
if (errors.length === 1)
|
|
21
|
+
throw errors[0];
|
|
22
|
+
if (errors.length > 1) {
|
|
23
|
+
throw new AggregateError(errors, `Failed to remove Windows bin shims for ${cmd}`);
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
26
|
async function removeOnNonWin(p) {
|
|
21
27
|
removalLogger.debug(p);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/bins.remover",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.20",
|
|
4
4
|
"description": "Remove bins from .bin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@pnpm/bins.resolver": "1100.0.14",
|
|
31
31
|
"@pnpm/core-loggers": "1100.3.2",
|
|
32
|
-
"@pnpm/pkg-manifest.reader": "1100.0.
|
|
32
|
+
"@pnpm/pkg-manifest.reader": "1100.0.16",
|
|
33
33
|
"@pnpm/types": "1101.9.0",
|
|
34
34
|
"@zkochan/rimraf": "^4.0.0",
|
|
35
35
|
"cmd-extension": "^2.0.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@pnpm/logger": "^1100.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@pnpm/bins.remover": "1100.0.
|
|
42
|
+
"@pnpm/bins.remover": "1100.0.20",
|
|
43
43
|
"@pnpm/logger": "1100.0.0",
|
|
44
44
|
"@types/is-windows": "^1.0.2",
|
|
45
45
|
"@types/ramda": "0.32.0"
|