@pnpm/hooks.pnpmfile 1100.0.26 → 1100.0.28
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 +22 -0
- package/lib/requireHooks.d.ts +7 -0
- package/lib/requireHooks.js +5 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pnpm/pnpmfile
|
|
2
2
|
|
|
3
|
+
## 1100.0.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The `importPackage` pnpmfile hook is deprecated. pnpm now prints a warning when a pnpmfile defines it, and the hook will be removed in the next major version. It also opts the installation out of the parallel package importer, making installation slower. If you rely on this hook, comment on [#14101](https://github.com/pnpm/pnpm/issues/14101).
|
|
8
|
+
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- @pnpm/core-loggers@1100.3.3
|
|
11
|
+
- @pnpm/error@1100.1.3
|
|
12
|
+
- @pnpm/hooks.types@1101.0.0
|
|
13
|
+
- @pnpm/lockfile.types@1100.0.20
|
|
14
|
+
- @pnpm/store.controller-types@1101.1.2
|
|
15
|
+
- @pnpm/types@1102.0.0
|
|
16
|
+
|
|
17
|
+
## 1100.0.27
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies:
|
|
22
|
+
- @pnpm/error@1100.1.2
|
|
23
|
+
- @pnpm/store.controller-types@1101.1.1
|
|
24
|
+
|
|
3
25
|
## 1100.0.26
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/lib/requireHooks.d.ts
CHANGED
|
@@ -16,6 +16,13 @@ export interface CookedHooks {
|
|
|
16
16
|
customResolvers?: CustomResolver[];
|
|
17
17
|
customFetchers?: CustomFetcher[];
|
|
18
18
|
calculatePnpmfileChecksum?: () => Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether a `readPackage` hook came from a pnpmfile the checksum does not
|
|
21
|
+
* cover (the global pnpmfile) — its drift is invisible to
|
|
22
|
+
* `pnpmfileChecksum` comparisons, so nothing downstream may treat the
|
|
23
|
+
* checksum as proof the hooks are unchanged.
|
|
24
|
+
*/
|
|
25
|
+
hasUntrackedReadPackageHook?: boolean;
|
|
19
26
|
}
|
|
20
27
|
export interface RequireHooksResult {
|
|
21
28
|
hooks: CookedHooks;
|
package/lib/requireHooks.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { hookLogger } from '@pnpm/core-loggers';
|
|
2
2
|
import { createHashFromMultipleFiles } from '@pnpm/crypto.hash';
|
|
3
|
-
import { PnpmError } from '@pnpm/error';
|
|
3
|
+
import { PnpmError, redactAndSanitize } from '@pnpm/error';
|
|
4
|
+
import { globalWarn } from '@pnpm/logger';
|
|
4
5
|
import { pathAbsolute } from 'path-absolute';
|
|
5
6
|
import { requirePnpmfile } from './requirePnpmfile.js';
|
|
6
7
|
export async function requireHooks(prefix, opts) {
|
|
@@ -73,6 +74,7 @@ export async function requireHooks(prefix, opts) {
|
|
|
73
74
|
filterLog: [],
|
|
74
75
|
updateConfig: [],
|
|
75
76
|
};
|
|
77
|
+
cookedHooks.hasUntrackedReadPackageHook = entries.some((entry) => entry.hooks?.readPackage != null && !entry.includeInChecksum);
|
|
76
78
|
// calculate combined checksum for all included files
|
|
77
79
|
if (entries.some((entry) => entry.hooks != null)) {
|
|
78
80
|
cookedHooks.calculatePnpmfileChecksum = async () => {
|
|
@@ -146,6 +148,8 @@ export async function requireHooks(prefix, opts) {
|
|
|
146
148
|
}
|
|
147
149
|
importProvider = file;
|
|
148
150
|
cookedHooks.importPackage = fileHooks.importPackage;
|
|
151
|
+
globalWarn(`The "importPackage" hook (defined in ${redactAndSanitize(file)}) is deprecated and will be removed in the next major version of pnpm. ` +
|
|
152
|
+
'It keeps working until then, but it opts the installation out of the parallel package importer, making it slower.');
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
// Process top-level resolvers and fetchers exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/hooks.pnpmfile",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.28",
|
|
4
4
|
"description": "Reading a .pnpmfile.cjs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"!*.map"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pnpm/core-loggers": "1100.3.
|
|
30
|
+
"@pnpm/core-loggers": "1100.3.3",
|
|
31
31
|
"@pnpm/crypto.hash": "1100.0.2",
|
|
32
|
-
"@pnpm/error": "1100.1.
|
|
33
|
-
"@pnpm/hooks.types": "
|
|
34
|
-
"@pnpm/lockfile.types": "1100.0.
|
|
35
|
-
"@pnpm/store.controller-types": "1101.1.
|
|
36
|
-
"@pnpm/types": "
|
|
32
|
+
"@pnpm/error": "1100.1.3",
|
|
33
|
+
"@pnpm/hooks.types": "1101.0.0",
|
|
34
|
+
"@pnpm/lockfile.types": "1100.0.20",
|
|
35
|
+
"@pnpm/store.controller-types": "1101.1.2",
|
|
36
|
+
"@pnpm/types": "1102.0.0",
|
|
37
37
|
"chalk": "^6.0.0",
|
|
38
38
|
"path-absolute": "^2.0.0"
|
|
39
39
|
},
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jest/globals": "30.4.1",
|
|
45
|
-
"@pnpm/fetching.fetcher-base": "1100.2.
|
|
46
|
-
"@pnpm/hooks.pnpmfile": "1100.0.
|
|
45
|
+
"@pnpm/fetching.fetcher-base": "1100.2.8",
|
|
46
|
+
"@pnpm/hooks.pnpmfile": "1100.0.28",
|
|
47
47
|
"@pnpm/logger": "1100.0.0",
|
|
48
48
|
"@pnpm/test-fixtures": "1100.0.1"
|
|
49
49
|
},
|