@pnpm/hooks.read-package-hook 1100.2.4 → 1100.2.5
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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @pnpm/hooks.read-package-hook
|
|
2
2
|
|
|
3
|
+
## 1100.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed an issue where package overrides were written into the metadata cache, causing removed overrides to keep applying on subsequent installs [pnpm/pnpm#13918](https://github.com/pnpm/pnpm/issues/13918).
|
|
8
|
+
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- @pnpm/config.parse-overrides@1100.1.4
|
|
11
|
+
- @pnpm/error@1100.1.3
|
|
12
|
+
- @pnpm/types@1102.0.0
|
|
13
|
+
|
|
3
14
|
## 1100.2.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VersionOverride as VersionOverrideBase } from '@pnpm/config.parse-overrides';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReadPackageHook } from '@pnpm/types';
|
|
3
3
|
export type VersionOverrideWithoutRawSelector = Omit<VersionOverrideBase, 'selector'>;
|
|
4
4
|
export interface CreateVersionsOverriderOptions {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { isValidPeerRange } from '@pnpm/deps.peer-range';
|
|
3
|
+
import { DEPENDENCIES_OR_PEER_FIELDS } from '@pnpm/types';
|
|
3
4
|
import normalizePath from 'normalize-path';
|
|
4
5
|
import { partition } from 'ramda';
|
|
5
6
|
import semver from 'semver';
|
|
@@ -30,11 +31,19 @@ export function createVersionsOverrider(overrides, rootDir, opts) {
|
|
|
30
31
|
return (parentPkg.name === manifest.name &&
|
|
31
32
|
(!parentPkg.bareSpecifier || semver.satisfies(manifest.version, parentPkg.bareSpecifier)));
|
|
32
33
|
});
|
|
33
|
-
|
|
34
|
+
// The manifest may come from a shared cache, so the fields the overrides
|
|
35
|
+
// rewrite are cloned instead of mutated in place.
|
|
36
|
+
const clonedManifest = { ...manifest };
|
|
37
|
+
for (const depsField of DEPENDENCIES_OR_PEER_FIELDS) {
|
|
38
|
+
if (manifest[depsField] != null) {
|
|
39
|
+
clonedManifest[depsField] = { ...manifest[depsField] };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
overrideDepsOfPkg({ manifest: clonedManifest, dir }, versionOverridesWithParent, genericVersionOverrides, {
|
|
34
43
|
convergeVersions,
|
|
35
44
|
convergeDeclaredRanges: opts?.convergeDeclaredRanges,
|
|
36
45
|
});
|
|
37
|
-
return
|
|
46
|
+
return clonedManifest;
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
49
|
function splitOverrides(overrides, rootDir) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/hooks.read-package-hook",
|
|
3
|
-
"version": "1100.2.
|
|
3
|
+
"version": "1100.2.5",
|
|
4
4
|
"description": "Creates the default package reader hook used by pnpm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@pnpm/config.matcher": "1100.0.2",
|
|
31
|
-
"@pnpm/config.parse-overrides": "1100.1.
|
|
31
|
+
"@pnpm/config.parse-overrides": "1100.1.4",
|
|
32
32
|
"@pnpm/deps.peer-range": "1100.1.1",
|
|
33
|
-
"@pnpm/error": "1100.1.
|
|
33
|
+
"@pnpm/error": "1100.1.3",
|
|
34
34
|
"@pnpm/resolving.parse-wanted-dependency": "1100.0.2",
|
|
35
|
-
"@pnpm/types": "
|
|
35
|
+
"@pnpm/types": "1102.0.0",
|
|
36
36
|
"@yarnpkg/extensions": "2.0.7",
|
|
37
37
|
"normalize-path": "^3.0.0",
|
|
38
38
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@jest/globals": "30.4.1",
|
|
43
|
-
"@pnpm/hooks.read-package-hook": "1100.2.
|
|
43
|
+
"@pnpm/hooks.read-package-hook": "1100.2.5",
|
|
44
44
|
"@types/normalize-path": "^3.0.2",
|
|
45
45
|
"@types/ramda": "0.32.0",
|
|
46
46
|
"@types/semver": "7.8.0",
|