@pnpm/fetching.binary-fetcher 1102.0.2 → 1102.0.4

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/package.json +10 -10
  3. package/lib/index.d.ts +0 -38
package/CHANGELOG.md ADDED
@@ -0,0 +1,253 @@
1
+ # @pnpm/fetching.binary-fetcher
2
+
3
+ ## 1102.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated `adm-zip` to prevent crafted ZIP archives from causing excessive memory allocation.
8
+
9
+ ## 1102.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies:
14
+ - @pnpm/fetching.fetcher-base@1100.2.2
15
+
16
+ ## 1102.0.2
17
+
18
+ ### Patch Changes
19
+
20
+ - @pnpm/fetching.fetcher-base@1100.2.1
21
+ - @pnpm/worker@1100.2.3
22
+
23
+ ## 1102.0.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [bae694f]
28
+ - Updated dependencies [852d537]
29
+ - @pnpm/fetching.fetcher-base@1100.2.0
30
+ - @pnpm/error@1100.0.1
31
+ - @pnpm/store.index@1100.2.1
32
+ - @pnpm/worker@1100.2.2
33
+
34
+ ## 1102.0.0
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [61810aa]
39
+ - Updated dependencies [681b593]
40
+ - Updated dependencies [a31faa7]
41
+ - @pnpm/store.index@1100.2.0
42
+ - @pnpm/worker@1100.2.0
43
+ - @pnpm/fetching.types@1100.0.2
44
+ - @pnpm/fetching.fetcher-base@1100.1.9
45
+
46
+ ## 1101.0.10
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [089484a]
51
+ - @pnpm/worker@1100.1.10
52
+ - @pnpm/fetching.fetcher-base@1100.1.8
53
+
54
+ ## 1101.0.9
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [3b76b8e]
59
+ - @pnpm/worker@1100.1.9
60
+ - @pnpm/fetching.fetcher-base@1100.1.7
61
+
62
+ ## 1101.0.8
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [aa6149d]
67
+ - @pnpm/worker@1100.1.8
68
+ - @pnpm/fetching.fetcher-base@1100.1.6
69
+
70
+ ## 1101.0.7
71
+
72
+ ### Patch Changes
73
+
74
+ - @pnpm/fetching.fetcher-base@1100.1.5
75
+ - @pnpm/worker@1100.1.7
76
+
77
+ ## 1101.0.6
78
+
79
+ ### Patch Changes
80
+
81
+ - @pnpm/fetching.fetcher-base@1100.1.4
82
+ - @pnpm/worker@1100.1.6
83
+
84
+ ## 1101.0.5
85
+
86
+ ### Patch Changes
87
+
88
+ - @pnpm/fetching.fetcher-base@1100.1.3
89
+ - @pnpm/worker@1100.1.4
90
+
91
+ ## 1101.0.4
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [0c67cb5]
96
+ - @pnpm/store.index@1100.1.0
97
+ - @pnpm/worker@1100.1.3
98
+
99
+ ## 1101.0.3
100
+
101
+ ### Patch Changes
102
+
103
+ - @pnpm/fetching.fetcher-base@1100.1.2
104
+ - @pnpm/worker@1100.1.2
105
+
106
+ ## 1101.0.2
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [184ce26]
111
+ - @pnpm/fetching.fetcher-base@1100.1.1
112
+ - @pnpm/fetching.types@1100.0.1
113
+ - @pnpm/worker@1100.1.1
114
+
115
+ ## 1101.0.1
116
+
117
+ ### Patch Changes
118
+
119
+ - dd23d19: Fix Windows Node.js runtime installs still extracting bundled `npm`, `npx`, and `corepack` when the archive contains explicit directory entries. `extractZipToTarget` now skips directory entries: AdmZip's `extractEntryTo` for a directory recurses over every descendant internally, which bypassed the `ignoreEntry` filter and re-materialized the files the filter was supposed to drop. File extraction creates parent directories implicitly, so skipping directory entries doesn't regress the install layout.
120
+
121
+ ## 1101.0.0
122
+
123
+ ### Minor Changes
124
+
125
+ - 421317c: Installing a Node.js runtime via `node@runtime:<version>` (including `pnpm env use` and `pnpm runtime set node`) no longer extracts the bundled `npm`, `npx`, and `corepack` from the Node.js archive. This cuts roughly half of the files pnpm has to hash, write to the CAS, and link during installation, making runtime installs noticeably faster. Users who still need `npm` can install it as a separate package.
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [421317c]
130
+ - @pnpm/fetching.fetcher-base@1100.1.0
131
+ - @pnpm/worker@1100.1.0
132
+
133
+ ## 1100.0.2
134
+
135
+ ### Patch Changes
136
+
137
+ - @pnpm/fetching.fetcher-base@1100.0.2
138
+ - @pnpm/worker@1100.0.2
139
+
140
+ ## 1100.0.1
141
+
142
+ ### Patch Changes
143
+
144
+ - @pnpm/fetching.fetcher-base@1100.0.1
145
+ - @pnpm/worker@1100.0.1
146
+
147
+ ## 1003.0.0
148
+
149
+ ### Major Changes
150
+
151
+ - 491a84f: This package is now pure ESM.
152
+ - 7d2fd48: Node.js v18, 19, 20, and 21 support discontinued.
153
+
154
+ ### Minor Changes
155
+
156
+ - 96704a1: Renamed `rawConfig` to `authConfig` on the `Config` interface. This field now only contains auth/registry data from `.npmrc` files. Non-auth settings are no longer written to it.
157
+
158
+ Added `nodeDownloadMirrors` setting to configure custom Node.js download mirrors in `pnpm-workspace.yaml`:
159
+
160
+ ```yaml
161
+ nodeDownloadMirrors:
162
+ release: https://my-mirror.example.com/download/release/
163
+ nightly: https://my-mirror.example.com/download/nightly/
164
+ ```
165
+
166
+ Replaced `rawConfig: object` with `userAgent?: string` in lifecycle hook options. Removed unused `rawConfig` from fetcher and prepare-package options.
167
+
168
+ Removed support for the npm `init-module` setting. Custom init scripts via `.pnpm-init.js` are no longer executed by `pnpm init`.
169
+
170
+ ### Patch Changes
171
+
172
+ - 3bf5e21: Runtime dependencies (node, bun, deno) are now added to the store with a package.json file.
173
+ - 260899d: Fix path traversal vulnerability in binary fetcher ZIP extraction
174
+
175
+ - Validate ZIP entry paths before extraction to prevent writing files outside target directory
176
+ - Validate BinaryResolution.prefix (basename) to prevent directory escape via crafted prefix
177
+ - Both attack vectors now throw `ERR_PNPM_PATH_TRAVERSAL` error
178
+
179
+ - 50fbeca: fix: preserve bundled `node_modules` from Node.js Windows zip so that npm/npx shims are created correctly on Windows.
180
+
181
+ The Windows Node.js distribution places npm inside a root-level `node_modules/` directory of the zip archive. `addFilesFromDir` was skipping root-level `node_modules` (to avoid treating a package's own npm dependencies as part of its content), which caused the bundled npm to be missing after installation. This prevented `pnpm env use` from creating the npm and npx shims on Windows.
182
+
183
+ Added an `includeNodeModules` option to `addFilesFromDir` and set it to `true` in the binary fetcher so that the complete Node.js distribution, including its bundled npm, is preserved.
184
+
185
+ - Updated dependencies [e2e0a32]
186
+ - Updated dependencies [7cec347]
187
+ - Updated dependencies [491a84f]
188
+ - Updated dependencies [50fbeca]
189
+ - Updated dependencies [ba065f6]
190
+ - Updated dependencies [3bf5e21]
191
+ - Updated dependencies [bb8baa7]
192
+ - Updated dependencies [ee9fe58]
193
+ - Updated dependencies [7d2fd48]
194
+ - Updated dependencies [56a59df]
195
+ - Updated dependencies [780af09]
196
+ - Updated dependencies [6c480a4]
197
+ - Updated dependencies [4893853]
198
+ - Updated dependencies [b7f0f21]
199
+ - Updated dependencies [831f574]
200
+ - Updated dependencies [98a0410]
201
+ - @pnpm/worker@1001.0.0
202
+ - @pnpm/fetching.types@1001.0.0
203
+ - @pnpm/fetching.fetcher-base@1002.0.0
204
+ - @pnpm/error@1001.0.0
205
+ - @pnpm/store.index@1000.0.0
206
+
207
+ ## 1002.0.0
208
+
209
+ ### Patch Changes
210
+
211
+ - Updated dependencies [8993f68]
212
+ - @pnpm/worker@1000.3.0
213
+ - @pnpm/fetcher-base@1001.0.2
214
+
215
+ ## 1001.0.0
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [06d2160]
220
+ - @pnpm/worker@1000.2.0
221
+
222
+ ## 1000.0.3
223
+
224
+ ### Patch Changes
225
+
226
+ - @pnpm/error@1000.0.5
227
+ - @pnpm/worker@1000.1.13
228
+
229
+ ## 1000.0.2
230
+
231
+ ### Patch Changes
232
+
233
+ - @pnpm/fetcher-base@1001.0.1
234
+ - @pnpm/worker@1000.1.12
235
+
236
+ ## 1000.0.1
237
+
238
+ ### Patch Changes
239
+
240
+ - 2b0d35f: `@pnpm/worker` should always be a peer dependency.
241
+
242
+ ## 1000.0.0
243
+
244
+ ### Major Changes
245
+
246
+ - d1edf73: Added support for binary fetcher.
247
+
248
+ ### Patch Changes
249
+
250
+ - Updated dependencies [d1edf73]
251
+ - @pnpm/fetcher-base@1001.0.0
252
+ - @pnpm/error@1000.0.4
253
+ - @pnpm/worker@1000.1.11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/fetching.binary-fetcher",
3
- "version": "1102.0.2",
3
+ "version": "1102.0.4",
4
4
  "description": "A fetcher for binary archives",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,25 +27,25 @@
27
27
  "!*.map"
28
28
  ],
29
29
  "dependencies": {
30
- "adm-zip": "^0.5.17",
31
- "is-subdir": "^2.0.0",
32
- "rename-overwrite": "^7.0.1",
33
- "ssri": "13.0.1",
34
- "tempy": "3.0.0",
35
30
  "@pnpm/error": "1100.0.1",
31
+ "@pnpm/fetching.fetcher-base": "1100.2.2",
36
32
  "@pnpm/fetching.types": "1100.0.2",
37
33
  "@pnpm/store.index": "1100.2.1",
38
- "@pnpm/fetching.fetcher-base": "1100.2.1"
34
+ "adm-zip": "^0.6.0",
35
+ "is-subdir": "^2.0.0",
36
+ "rename-overwrite": "^7.0.1",
37
+ "ssri": "13.0.1",
38
+ "tempy": "3.0.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@pnpm/worker": "^1100.2.3"
41
+ "@pnpm/worker": "^1100.2.5"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@jest/globals": "30.4.1",
45
+ "@pnpm/fetching.binary-fetcher": "1102.0.4",
45
46
  "@types/adm-zip": "^0.5.8",
46
47
  "@types/ssri": "^7.1.5",
47
- "tempy": "3.0.0",
48
- "@pnpm/fetching.binary-fetcher": "1102.0.2"
48
+ "tempy": "3.0.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=22.13"
package/lib/index.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import type { BinaryFetcher, FetchFunction } from '@pnpm/fetching.fetcher-base';
2
- import type { FetchFromRegistry } from '@pnpm/fetching.types';
3
- import type { StoreIndex } from '@pnpm/store.index';
4
- export interface CreateBinaryFetcherOptions {
5
- fetch: FetchFromRegistry;
6
- fetchFromRemoteTarball: FetchFunction;
7
- storeIndex: StoreIndex;
8
- offline?: boolean;
9
- /**
10
- * Per-package-name regex sources (compatible with `new RegExp(pattern)`) matching file
11
- * paths inside the downloaded archive that should be skipped during extraction.
12
- * The lookup key is `pkg.name`. For zip archives, paths are matched relative to the
13
- * archive's top-level directory (i.e. after the `prefix` has been stripped).
14
- */
15
- archiveFilters?: Record<string, string>;
16
- }
17
- export declare function createBinaryFetcher(ctx: CreateBinaryFetcherOptions): {
18
- binary: BinaryFetcher;
19
- };
20
- export interface AssetInfo {
21
- url: string;
22
- integrity: string;
23
- basename: string;
24
- /**
25
- * Regex matched against each zip entry's path relative to the archive's top-level basename.
26
- * Matching entries are skipped during extraction.
27
- */
28
- ignoreEntry?: RegExp;
29
- }
30
- /**
31
- * Downloads and unpacks a zip file containing a binary asset.
32
- *
33
- * @param fetchFromRegistry - Function to fetch resources from registry
34
- * @param assetInfo - Information about the binary asset
35
- * @param targetDir - Directory where the binary asset should be installed
36
- * @throws {PnpmError} When integrity verification fails or extraction fails
37
- */
38
- export declare function downloadAndUnpackZip(fetchFromRegistry: FetchFromRegistry, assetInfo: AssetInfo, targetDir: string): Promise<void>;