@pnpm/resolving.git-resolver 1100.1.8 → 1100.1.10

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 ADDED
@@ -0,0 +1,1002 @@
1
+ # @pnpm/git-resolver
2
+
3
+ ## 1100.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - @pnpm/network.fetch@1100.1.6
9
+
10
+ ## 1100.1.9
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies:
15
+ - @pnpm/network.fetch@1100.1.5
16
+ - @pnpm/resolving.resolver-base@1100.5.2
17
+
18
+ ## 1100.1.8
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [dcabb78]
23
+ - @pnpm/resolving.resolver-base@1100.5.1
24
+
25
+ ## 1100.1.7
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [bae694f]
30
+ - Updated dependencies [05b95ab]
31
+ - Updated dependencies [852d537]
32
+ - @pnpm/resolving.resolver-base@1100.5.0
33
+ - @pnpm/network.fetch@1100.1.4
34
+ - @pnpm/error@1100.0.1
35
+
36
+ ## 1100.1.6
37
+
38
+ ### Patch Changes
39
+
40
+ - a31faa7: Updated dependency ranges. Notably:
41
+
42
+ - `@pnpm/logger` peer dependency range moved to `^1100.0.0`.
43
+ - `msgpackr` 1.11.8 → 2.0.4 (store index files remain byte-compatible in both directions).
44
+ - `open` ^7.4.2 → ^11.0.0, `memoize` ^10 → ^11, `cli-truncate` ^5 → ^6, `pidtree` ^0.6 → ^1.
45
+ - `@yarnpkg/core` 4.5.0 → 4.8.0, `@rushstack/worker-pool` 0.7.7 → 0.7.18, `@cyclonedx/cyclonedx-library` 10.0.0 → 10.1.0, `@pnpm/config.nerf-dart` ^1 → ^2, `@pnpm/log.group` 3.0.2 → 4.0.1, `@pnpm/util.lex-comparator` ^3 → ^4.
46
+
47
+ - Updated dependencies [a31faa7]
48
+ - @pnpm/network.fetch@1100.1.3
49
+ - @pnpm/resolving.resolver-base@1100.4.2
50
+
51
+ ## 1100.1.5
52
+
53
+ ### Patch Changes
54
+
55
+ - @pnpm/network.fetch@1100.1.2
56
+
57
+ ## 1100.1.4
58
+
59
+ ### Patch Changes
60
+
61
+ - @pnpm/network.fetch@1100.1.1
62
+ - @pnpm/resolving.resolver-base@1100.4.1
63
+
64
+ ## 1100.1.3
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [60a1eec]
69
+ - Updated dependencies [6d17b66]
70
+ - @pnpm/network.fetch@1100.1.0
71
+ - @pnpm/resolving.resolver-base@1100.4.0
72
+
73
+ ## 1100.1.2
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [b1fa2d5]
78
+ - @pnpm/network.fetch@1100.0.8
79
+
80
+ ## 1100.1.1
81
+
82
+ ### Patch Changes
83
+
84
+ - @pnpm/network.fetch@1100.0.7
85
+ - @pnpm/resolving.resolver-base@1100.3.1
86
+
87
+ ## 1100.1.0
88
+
89
+ ### Minor Changes
90
+
91
+ - 1627943: `pnpm outdated` and `pnpm update --interactive` now report Node.js, Deno, and Bun runtimes installed as project dependencies (`runtime:` specifiers). Previously these were silently skipped because the npm specifier parser did not understand the `runtime:` protocol, so runtime versions never appeared in the outdated table or the interactive update picker.
92
+
93
+ Internally, the outdated check is now resolver-driven: `@pnpm/resolving.resolver-base` defines a `ResolveLatestFunction` shape (with `LatestQuery` input — `{ wantedDependency, compatible? }` — and `LatestInfo` result — `{ latestManifest? }`), and every protocol resolver (npm, jsr, named-registry, git, tarball, local, node/bun/deno runtimes) exports its own `resolveLatest*` function alongside its `resolve*`. `@pnpm/resolving.default-resolver` composes them into a single dispatcher, exposed through `@pnpm/installing.client` as `createResolver(...).resolveLatest`.
94
+
95
+ Each resolver decides whether it owns the dep and what "latest" means for its protocol; the outdated command derives `current` / `wanted` display values from the lockfile snapshot (`pkgSnapshot.version` for semver protocols, raw ref for URL-shaped ones) and uses raw ref equality for the "lockfile changed" check, so protocol knowledge stays inside each resolver instead of the command.
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [1627943]
100
+ - @pnpm/resolving.resolver-base@1100.3.0
101
+ - @pnpm/network.fetch@1100.0.6
102
+
103
+ ## 1100.0.8
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [4195766]
108
+ - Updated dependencies [31538bf]
109
+ - @pnpm/resolving.resolver-base@1100.2.0
110
+ - @pnpm/network.fetch@1100.0.5
111
+
112
+ ## 1100.0.7
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [18a464f]
117
+ - @pnpm/network.fetch@1100.0.4
118
+
119
+ ## 1100.0.6
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [20e7aff]
124
+ - @pnpm/network.fetch@1100.0.3
125
+ - @pnpm/resolving.resolver-base@1100.1.3
126
+
127
+ ## 1100.0.5
128
+
129
+ ### Patch Changes
130
+
131
+ - a57f7bd: Fixed installation of GitLab-hosted dependencies. pnpm now downloads the tarball from `https://gitlab.com/<user>/<project>/-/archive/<sha>/<project>-<sha>.tar.gz` instead of the GitLab API endpoint that contained an encoded slash (`%2F`) between user and project. The encoded slash both triggered `406 Not Acceptable` responses from GitLab and produced virtual store directory names that Node refused to import (`ERR_INVALID_MODULE_SPECIFIER`) [#11533](https://github.com/pnpm/pnpm/issues/11533).
132
+
133
+ ## 1100.0.4
134
+
135
+ ### Patch Changes
136
+
137
+ - 27425d7: Pin the integrity of git-hosted tarballs (codeload.github.com, gitlab.com, bitbucket.org) in the lockfile so that subsequent installs detect a tampered or substituted tarball and refuse to install it. Previously the lockfile only stored the tarball URL for git dependencies, so a compromised git host or a man-in-the-middle could serve arbitrary code on later installs without lockfile changes.
138
+
139
+ A new `gitHosted: true` field is recorded on git-hosted tarball resolutions in the lockfile, letting every reader/writer route them by a single typed check instead of pattern-matching the tarball URL in each call site. Lockfiles written by older pnpm versions are enriched on load (URL fallback) so the field can be relied on uniformly across the codebase.
140
+
141
+ - Updated dependencies [27425d7]
142
+ - @pnpm/resolving.resolver-base@1100.1.2
143
+
144
+ ## 1100.0.3
145
+
146
+ ### Patch Changes
147
+
148
+ - 184ce26: Fix the package name in README.md.
149
+ - Updated dependencies [184ce26]
150
+ - @pnpm/resolving.resolver-base@1100.1.1
151
+ - @pnpm/network.fetch@1100.0.2
152
+
153
+ ## 1100.0.2
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [72c1e05]
158
+ - @pnpm/resolving.resolver-base@1100.1.0
159
+
160
+ ## 1100.0.1
161
+
162
+ ### Patch Changes
163
+
164
+ - @pnpm/network.fetch@1100.0.1
165
+ - @pnpm/resolving.resolver-base@1100.0.1
166
+
167
+ ## 1002.0.0
168
+
169
+ ### Major Changes
170
+
171
+ - 491a84f: This package is now pure ESM.
172
+ - 7d2fd48: Node.js v18, 19, 20, and 21 support discontinued.
173
+
174
+ ### Minor Changes
175
+
176
+ - ec7c5d7: Support plain `http://` and `https://` URLs ending with `.git` as git repository dependencies.
177
+
178
+ Previously, URLs like `https://gitea.example.org/user/repo.git#commit` were not recognized as git repositories because they lacked the `git+` prefix (e.g., `git+https://`). This caused issues when installing dependencies from self-hosted git servers like Gitea or Forgejo that don't provide tarball downloads.
179
+
180
+ Changes:
181
+
182
+ - The git resolver now runs before the tarball resolver, ensuring git URLs are handled by the correct resolver
183
+ - The git resolver now recognizes plain `http://` and `https://` URLs ending in `.git` as git repositories
184
+ - Removed the `isRepository` check from the tarball resolver since it's no longer needed with the new resolver order
185
+
186
+ Fixes #10468
187
+
188
+ ### Patch Changes
189
+
190
+ - 01760da: Fix installation of Git dependencies using annotated tags [#10335](https://github.com/pnpm/pnpm/issues/10335).
191
+
192
+ Previously, pnpm would store the annotated tag object's SHA in the lockfile instead of the actual commit SHA. This caused `ERR_PNPM_GIT_CHECKOUT_FAILED` errors because the checked-out commit hash didn't match the stored tag object hash.
193
+
194
+ - c5fbdde: Always resolve git references to full commits and ensure `HEAD` points to the commit after checkout [#10310](https://github.com/pnpm/pnpm/pull/10310).
195
+ - Updated dependencies [facdd71]
196
+ - Updated dependencies [9b0a460]
197
+ - Updated dependencies [491a84f]
198
+ - Updated dependencies [0dfa8b8]
199
+ - Updated dependencies [7d2fd48]
200
+ - Updated dependencies [50fbeca]
201
+ - Updated dependencies [bb8baa7]
202
+ - Updated dependencies [6c480a4]
203
+ - Updated dependencies [10bc391]
204
+ - Updated dependencies [38b8e35]
205
+ - Updated dependencies [831f574]
206
+ - Updated dependencies [9d3f00b]
207
+ - Updated dependencies [6b3d87a]
208
+ - @pnpm/resolving.resolver-base@1006.0.0
209
+ - @pnpm/error@1001.0.0
210
+ - @pnpm/network.fetch@1001.0.0
211
+
212
+ ## 1001.1.5
213
+
214
+ ### Patch Changes
215
+
216
+ - Updated dependencies [7c1382f]
217
+ - @pnpm/resolver-base@1005.1.0
218
+ - @pnpm/fetch@1000.2.6
219
+
220
+ ## 1001.1.4
221
+
222
+ ### Patch Changes
223
+
224
+ - @pnpm/fetch@1000.2.5
225
+ - @pnpm/resolver-base@1005.0.1
226
+
227
+ ## 1001.1.3
228
+
229
+ ### Patch Changes
230
+
231
+ - Updated dependencies [87d3aa8]
232
+ - @pnpm/fetch@1000.2.4
233
+
234
+ ## 1001.1.2
235
+
236
+ ### Patch Changes
237
+
238
+ - Updated dependencies [86b33e9]
239
+ - Updated dependencies [d1edf73]
240
+ - Updated dependencies [f91922c]
241
+ - @pnpm/resolver-base@1005.0.0
242
+
243
+ ## 1001.1.1
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies [1a07b8f]
248
+ - @pnpm/resolver-base@1004.1.0
249
+ - @pnpm/fetch@1000.2.3
250
+
251
+ ## 1001.1.0
252
+
253
+ ### Minor Changes
254
+
255
+ - 2721291: Create different resolver result types which provide more information.
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [2721291]
260
+ - Updated dependencies [6acf819]
261
+ - @pnpm/resolver-base@1004.0.0
262
+
263
+ ## 1001.0.2
264
+
265
+ ### Patch Changes
266
+
267
+ - 5055399: Fixed the problem of path loss caused by parsing URL address. Fixes a regression shipped in pnpm v10.11 via [#9502](https://github.com/pnpm/pnpm/pull/9502).
268
+
269
+ ## 1001.0.1
270
+
271
+ ### Patch Changes
272
+
273
+ - 6b6ccf9: Remove `url.parse` usage to fix warning on Node.js 24 [#9492](https://github.com/pnpm/pnpm/issues/9492).
274
+ - Updated dependencies [09cf46f]
275
+ - @pnpm/fetch@1000.2.2
276
+ - @pnpm/resolver-base@1003.0.1
277
+
278
+ ## 1001.0.0
279
+
280
+ ### Major Changes
281
+
282
+ - 8a9f3a4: `pref` renamed to `bareSpecifier`.
283
+ - 5b73df1: Renamed `normalizedPref` to `specifiers`.
284
+
285
+ ### Patch Changes
286
+
287
+ - Updated dependencies [8a9f3a4]
288
+ - Updated dependencies [5b73df1]
289
+ - Updated dependencies [9c3dd03]
290
+ - @pnpm/resolver-base@1003.0.0
291
+ - @pnpm/fetch@1000.2.1
292
+
293
+ ## 1000.0.11
294
+
295
+ ### Patch Changes
296
+
297
+ - Updated dependencies [81f441c]
298
+ - @pnpm/resolver-base@1002.0.0
299
+
300
+ ## 1000.0.10
301
+
302
+ ### Patch Changes
303
+
304
+ - Updated dependencies [72cff38]
305
+ - Updated dependencies [750ae7d]
306
+ - @pnpm/resolver-base@1001.0.0
307
+ - @pnpm/fetch@1000.2.0
308
+
309
+ ## 1000.0.9
310
+
311
+ ### Patch Changes
312
+
313
+ - @pnpm/fetch@1000.1.6
314
+ - @pnpm/resolver-base@1000.2.1
315
+
316
+ ## 1000.0.8
317
+
318
+ ### Patch Changes
319
+
320
+ - Updated dependencies [3d52365]
321
+ - @pnpm/resolver-base@1000.2.0
322
+
323
+ ## 1000.0.7
324
+
325
+ ### Patch Changes
326
+
327
+ - @pnpm/fetch@1000.1.5
328
+ - @pnpm/resolver-base@1000.1.4
329
+
330
+ ## 1000.0.6
331
+
332
+ ### Patch Changes
333
+
334
+ - @pnpm/fetch@1000.1.4
335
+ - @pnpm/resolver-base@1000.1.3
336
+
337
+ ## 1000.0.5
338
+
339
+ ### Patch Changes
340
+
341
+ - d6a4ff1: Proxy settings should be respected, when resolving Git-hosted dependencies [#6530](https://github.com/pnpm/pnpm/issues/6530).
342
+
343
+ ## 1000.0.4
344
+
345
+ ### Patch Changes
346
+
347
+ - @pnpm/fetch@1000.1.3
348
+ - @pnpm/resolver-base@1000.1.2
349
+
350
+ ## 1000.0.3
351
+
352
+ ### Patch Changes
353
+
354
+ - @pnpm/fetch@1000.1.2
355
+ - @pnpm/resolver-base@1000.1.1
356
+
357
+ ## 1000.0.2
358
+
359
+ ### Patch Changes
360
+
361
+ - b100962: Do not fall back to SSH, when resolving a git-hosted package if `git ls-remote` works via HTTPS [#8906](https://github.com/pnpm/pnpm/pull/8906).
362
+ - @pnpm/fetch@1000.1.1
363
+
364
+ ## 1000.0.1
365
+
366
+ ### Patch Changes
367
+
368
+ - Updated dependencies [6483b64]
369
+ - Updated dependencies [b0f3c71]
370
+ - @pnpm/resolver-base@1000.1.0
371
+ - @pnpm/fetch@1000.1.0
372
+
373
+ ## 9.0.8
374
+
375
+ ### Patch Changes
376
+
377
+ - @pnpm/fetch@8.0.7
378
+ - @pnpm/resolver-base@13.0.4
379
+
380
+ ## 9.0.7
381
+
382
+ ### Patch Changes
383
+
384
+ - @pnpm/fetch@8.0.6
385
+ - @pnpm/resolver-base@13.0.3
386
+
387
+ ## 9.0.6
388
+
389
+ ### Patch Changes
390
+
391
+ - @pnpm/fetch@8.0.5
392
+ - @pnpm/resolver-base@13.0.2
393
+
394
+ ## 9.0.5
395
+
396
+ ### Patch Changes
397
+
398
+ - @pnpm/fetch@8.0.4
399
+ - @pnpm/resolver-base@13.0.1
400
+
401
+ ## 9.0.4
402
+
403
+ ### Patch Changes
404
+
405
+ - Updated dependencies [dd00eeb]
406
+ - @pnpm/resolver-base@13.0.0
407
+ - @pnpm/fetch@8.0.3
408
+
409
+ ## 9.0.3
410
+
411
+ ### Patch Changes
412
+
413
+ - @pnpm/fetch@8.0.2
414
+ - @pnpm/resolver-base@12.0.2
415
+
416
+ ## 9.0.2
417
+
418
+ ### Patch Changes
419
+
420
+ - @pnpm/fetch@8.0.1
421
+ - @pnpm/resolver-base@12.0.1
422
+
423
+ ## 9.0.1
424
+
425
+ ### Patch Changes
426
+
427
+ - c969f37: Lockfiles that have git-hosted dependencies specified should be correctly converted to the new lockfile format [#7990](https://github.com/pnpm/pnpm/issues/7990).
428
+
429
+ ## 9.0.0
430
+
431
+ ### Major Changes
432
+
433
+ - 43cdd87: Node.js v16 support dropped. Use at least Node.js v18.12.
434
+
435
+ ### Minor Changes
436
+
437
+ - b13d2dc: It is now possible to install only a subdirectory from a Git repository.
438
+
439
+ For example, `pnpm add github:user/repo#path:packages/foo` will add a dependency from the `packages/foo` subdirectory.
440
+
441
+ This new parameter may be combined with other supported parameters separated by `&`. For instance, the next command will install the same package from the `dev` branch: `pnpm add github:user/repo#dev&path:packages/bar`.
442
+
443
+ Related issue: [#4765](https://github.com/pnpm/pnpm/issues/4765).
444
+ Related PR: [#7487](https://github.com/pnpm/pnpm/pull/7487).
445
+
446
+ ### Patch Changes
447
+
448
+ - 985381c: Install gitlab-hosted packages correctly, when they are specified by commit or branch [#7603](https://github.com/pnpm/pnpm/issues/7603).
449
+ - Updated dependencies [7733f3a]
450
+ - Updated dependencies [43cdd87]
451
+ - Updated dependencies [b13d2dc]
452
+ - @pnpm/fetch@8.0.0
453
+ - @pnpm/resolver-base@12.0.0
454
+
455
+ ## 8.0.12
456
+
457
+ ### Patch Changes
458
+
459
+ - Updated dependencies [31054a63e]
460
+ - @pnpm/resolver-base@11.1.0
461
+
462
+ ## 8.0.11
463
+
464
+ ### Patch Changes
465
+
466
+ - @pnpm/resolver-base@11.0.2
467
+ - @pnpm/fetch@7.0.7
468
+
469
+ ## 8.0.10
470
+
471
+ ### Patch Changes
472
+
473
+ - @pnpm/resolver-base@11.0.1
474
+ - @pnpm/fetch@7.0.6
475
+
476
+ ## 8.0.9
477
+
478
+ ### Patch Changes
479
+
480
+ - Updated dependencies [4c2450208]
481
+ - @pnpm/resolver-base@11.0.0
482
+
483
+ ## 8.0.8
484
+
485
+ ### Patch Changes
486
+
487
+ - @pnpm/resolver-base@10.0.4
488
+ - @pnpm/fetch@7.0.5
489
+
490
+ ## 8.0.7
491
+
492
+ ### Patch Changes
493
+
494
+ - @pnpm/resolver-base@10.0.3
495
+ - @pnpm/fetch@7.0.4
496
+
497
+ ## 8.0.6
498
+
499
+ ### Patch Changes
500
+
501
+ - 22bbe9255: Pass the right scheme to `git ls-remote` in order to prevent a fallback to `git+ssh` that would result in a 'host key verification failed' issue [#6806](https://github.com/pnpm/pnpm/issues/6806)
502
+
503
+ ## 8.0.5
504
+
505
+ ### Patch Changes
506
+
507
+ - de9b6c20d: Temporarily revert the fix to [#6805](https://github.com/pnpm/pnpm/issues/6805) to fix the regression it caused [#6827](https://github.com/pnpm/pnpm/issues/6827).
508
+
509
+ ## 8.0.4
510
+
511
+ ### Patch Changes
512
+
513
+ - 6fe0b60e6: Fixed a bug in which pnpm passed the wrong scheme to `git ls-remote`, causing a fallback to `git+ssh` and resulting in a 'host key verification failed' issue [#6805](https://github.com/pnpm/pnpm/issues/6805)
514
+ - @pnpm/resolver-base@10.0.2
515
+ - @pnpm/fetch@7.0.3
516
+
517
+ ## 8.0.3
518
+
519
+ ### Patch Changes
520
+
521
+ - @pnpm/resolver-base@10.0.1
522
+ - @pnpm/fetch@7.0.2
523
+
524
+ ## 8.0.2
525
+
526
+ ### Patch Changes
527
+
528
+ - Updated dependencies [8228c2cb1]
529
+ - @pnpm/fetch@7.0.1
530
+
531
+ ## 8.0.1
532
+
533
+ ### Patch Changes
534
+
535
+ - c0760128d: bump semver to 7.4.0
536
+
537
+ ## 8.0.0
538
+
539
+ ### Major Changes
540
+
541
+ - eceaa8b8b: Node.js 14 support dropped.
542
+
543
+ ### Patch Changes
544
+
545
+ - 28796377c: Fix git-hosted dependencies referenced via `git+ssh` that use semver selectors [#6239](https://github.com/pnpm/pnpm/pull/6239).
546
+ - Updated dependencies [eceaa8b8b]
547
+ - @pnpm/resolver-base@10.0.0
548
+ - @pnpm/fetch@7.0.0
549
+
550
+ ## 7.0.7
551
+
552
+ ### Patch Changes
553
+
554
+ - Updated dependencies [673e23060]
555
+ - Updated dependencies [9fa6c7404]
556
+ - @pnpm/fetch@6.0.6
557
+
558
+ ## 7.0.6
559
+
560
+ ### Patch Changes
561
+
562
+ - Updated dependencies [029143cff]
563
+ - Updated dependencies [029143cff]
564
+ - @pnpm/resolver-base@9.2.0
565
+
566
+ ## 7.0.5
567
+
568
+ ### Patch Changes
569
+
570
+ - @pnpm/resolver-base@9.1.5
571
+ - @pnpm/fetch@6.0.5
572
+
573
+ ## 7.0.4
574
+
575
+ ### Patch Changes
576
+
577
+ - Updated dependencies [a9d59d8bc]
578
+ - @pnpm/fetch@6.0.4
579
+
580
+ ## 7.0.3
581
+
582
+ ### Patch Changes
583
+
584
+ - @pnpm/resolver-base@9.1.4
585
+ - @pnpm/fetch@6.0.3
586
+
587
+ ## 7.0.2
588
+
589
+ ### Patch Changes
590
+
591
+ - @pnpm/fetch@6.0.2
592
+
593
+ ## 7.0.1
594
+
595
+ ### Patch Changes
596
+
597
+ - @pnpm/resolver-base@9.1.3
598
+ - @pnpm/fetch@6.0.1
599
+
600
+ ## 7.0.0
601
+
602
+ ### Major Changes
603
+
604
+ - 043d988fc: Breaking change to the API. Defaul export is not used.
605
+ - f884689e0: Require `@pnpm/logger` v5.
606
+
607
+ ### Patch Changes
608
+
609
+ - Updated dependencies [043d988fc]
610
+ - Updated dependencies [f884689e0]
611
+ - @pnpm/fetch@6.0.0
612
+
613
+ ## 6.1.7
614
+
615
+ ### Patch Changes
616
+
617
+ - @pnpm/fetch@5.0.10
618
+
619
+ ## 6.1.6
620
+
621
+ ### Patch Changes
622
+
623
+ - @pnpm/resolver-base@9.1.2
624
+ - @pnpm/fetch@5.0.9
625
+
626
+ ## 6.1.5
627
+
628
+ ### Patch Changes
629
+
630
+ - @pnpm/resolver-base@9.1.1
631
+ - @pnpm/fetch@5.0.8
632
+
633
+ ## 6.1.4
634
+
635
+ ### Patch Changes
636
+
637
+ - Updated dependencies [23984abd1]
638
+ - @pnpm/resolver-base@9.1.0
639
+
640
+ ## 6.1.3
641
+
642
+ ### Patch Changes
643
+
644
+ - 39c040127: upgrade various dependencies
645
+
646
+ ## 6.1.2
647
+
648
+ ### Patch Changes
649
+
650
+ - @pnpm/resolver-base@9.0.6
651
+ - @pnpm/fetch@5.0.7
652
+
653
+ ## 6.1.1
654
+
655
+ ### Patch Changes
656
+
657
+ - Updated dependencies [e018a8b14]
658
+ - @pnpm/fetch@5.0.6
659
+
660
+ ## 6.1.0
661
+
662
+ ### Minor Changes
663
+
664
+ - 449ccef09: Add `refs/` to git resolution prefixes
665
+
666
+ ## 6.0.6
667
+
668
+ ### Patch Changes
669
+
670
+ - @pnpm/resolver-base@9.0.5
671
+ - @pnpm/fetch@5.0.5
672
+
673
+ ## 6.0.5
674
+
675
+ ### Patch Changes
676
+
677
+ - @pnpm/resolver-base@9.0.4
678
+ - @pnpm/fetch@5.0.4
679
+
680
+ ## 6.0.4
681
+
682
+ ### Patch Changes
683
+
684
+ - Updated dependencies [9d5bf09c0]
685
+ - @pnpm/fetch@5.0.3
686
+ - @pnpm/resolver-base@9.0.3
687
+
688
+ ## 6.0.3
689
+
690
+ ### Patch Changes
691
+
692
+ - @pnpm/resolver-base@9.0.2
693
+ - @pnpm/fetch@5.0.2
694
+
695
+ ## 6.0.2
696
+
697
+ ### Patch Changes
698
+
699
+ - 0fa446d10: Resolve commits from GitHub via https.
700
+
701
+ ## 6.0.1
702
+
703
+ ### Patch Changes
704
+
705
+ - @pnpm/resolver-base@9.0.1
706
+ - @pnpm/fetch@5.0.1
707
+
708
+ ## 6.0.0
709
+
710
+ ### Major Changes
711
+
712
+ - 542014839: Node.js 12 is not supported.
713
+
714
+ ### Patch Changes
715
+
716
+ - Updated dependencies [542014839]
717
+ - @pnpm/fetch@5.0.0
718
+ - @pnpm/resolver-base@9.0.0
719
+
720
+ ## 5.1.17
721
+
722
+ ### Patch Changes
723
+
724
+ - @pnpm/resolver-base@8.1.6
725
+ - @pnpm/fetch@4.2.5
726
+
727
+ ## 5.1.16
728
+
729
+ ### Patch Changes
730
+
731
+ - @pnpm/resolver-base@8.1.5
732
+ - @pnpm/fetch@4.2.4
733
+
734
+ ## 5.1.15
735
+
736
+ ### Patch Changes
737
+
738
+ - @pnpm/resolver-base@8.1.4
739
+ - @pnpm/fetch@4.2.3
740
+
741
+ ## 5.1.14
742
+
743
+ ### Patch Changes
744
+
745
+ - @pnpm/resolver-base@8.1.3
746
+ - @pnpm/fetch@4.2.2
747
+
748
+ ## 5.1.13
749
+
750
+ ### Patch Changes
751
+
752
+ - c94104472: Don't make unnecessary retries when fetching Git-hosted packages [#2731](https://github.com/pnpm/pnpm/pull/2731).
753
+ - @pnpm/fetch@4.2.1
754
+ - @pnpm/resolver-base@8.1.2
755
+
756
+ ## 5.1.12
757
+
758
+ ### Patch Changes
759
+
760
+ - Updated dependencies [f1c194ded]
761
+ - @pnpm/fetch@4.2.0
762
+
763
+ ## 5.1.11
764
+
765
+ ### Patch Changes
766
+
767
+ - Updated dependencies [12ee3c144]
768
+ - @pnpm/fetch@4.1.6
769
+
770
+ ## 5.1.10
771
+
772
+ ### Patch Changes
773
+
774
+ - @pnpm/resolver-base@8.1.1
775
+ - @pnpm/fetch@4.1.5
776
+
777
+ ## 5.1.9
778
+
779
+ ### Patch Changes
780
+
781
+ - 7da65bd7a: Don't break URLs with ports.
782
+
783
+ ## 5.1.8
784
+
785
+ ### Patch Changes
786
+
787
+ - Updated dependencies [4ab87844a]
788
+ - @pnpm/resolver-base@8.1.0
789
+ - @pnpm/fetch@4.1.4
790
+
791
+ ## 5.1.7
792
+
793
+ ### Patch Changes
794
+
795
+ - Updated dependencies [782ef2490]
796
+ - @pnpm/fetch@4.1.3
797
+
798
+ ## 5.1.6
799
+
800
+ ### Patch Changes
801
+
802
+ - 930e104da: Git URLs containing a colon should work.
803
+ - @pnpm/fetch@4.1.2
804
+
805
+ ## 5.1.5
806
+
807
+ ### Patch Changes
808
+
809
+ - 04b7f6086: Use safe-execa instead of execa to prevent binary planting attacks on Windows.
810
+
811
+ ## 5.1.4
812
+
813
+ ### Patch Changes
814
+
815
+ - Updated dependencies [bab172385]
816
+ - @pnpm/fetch@4.1.1
817
+
818
+ ## 5.1.3
819
+
820
+ ### Patch Changes
821
+
822
+ - Updated dependencies [eadf0e505]
823
+ - @pnpm/fetch@4.1.0
824
+
825
+ ## 5.1.2
826
+
827
+ ### Patch Changes
828
+
829
+ - @pnpm/resolver-base@8.0.4
830
+ - @pnpm/fetch@4.0.2
831
+
832
+ ## 5.1.1
833
+
834
+ ### Patch Changes
835
+
836
+ - @pnpm/resolver-base@8.0.3
837
+ - @pnpm/fetch@4.0.1
838
+
839
+ ## 5.1.0
840
+
841
+ ### Minor Changes
842
+
843
+ - 69ffc4099: It should be possible to install a Git-hosted dependency that names the default branch not "master".
844
+
845
+ ## 5.0.2
846
+
847
+ ### Patch Changes
848
+
849
+ - Updated dependencies [e7d9cd187]
850
+ - Updated dependencies [eeff424bd]
851
+ - @pnpm/fetch@4.0.0
852
+ - @pnpm/resolver-base@8.0.2
853
+
854
+ ## 5.0.1
855
+
856
+ ### Patch Changes
857
+
858
+ - Updated dependencies [05baaa6e7]
859
+ - @pnpm/fetch@3.1.0
860
+ - @pnpm/resolver-base@8.0.1
861
+
862
+ ## 5.0.0
863
+
864
+ ### Major Changes
865
+
866
+ - 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
867
+
868
+ ### Patch Changes
869
+
870
+ - Updated dependencies [97b986fbc]
871
+ - @pnpm/fetch@3.0.0
872
+ - @pnpm/resolver-base@8.0.0
873
+
874
+ ## 4.1.12
875
+
876
+ ### Patch Changes
877
+
878
+ - @pnpm/fetch@2.1.11
879
+
880
+ ## 4.1.11
881
+
882
+ ### Patch Changes
883
+
884
+ - @pnpm/resolver-base@7.1.1
885
+ - @pnpm/fetch@2.1.10
886
+
887
+ ## 4.1.10
888
+
889
+ ### Patch Changes
890
+
891
+ - 32c9ef4be: execa updated to v5.
892
+
893
+ ## 4.1.9
894
+
895
+ ### Patch Changes
896
+
897
+ - @pnpm/fetch@2.1.9
898
+
899
+ ## 4.1.8
900
+
901
+ ### Patch Changes
902
+
903
+ - Updated dependencies [263f5d813]
904
+ - @pnpm/fetch@2.1.8
905
+
906
+ ## 4.1.7
907
+
908
+ ### Patch Changes
909
+
910
+ - Updated dependencies [8698a7060]
911
+ - @pnpm/resolver-base@7.1.0
912
+
913
+ ## 4.1.6
914
+
915
+ ### Patch Changes
916
+
917
+ - @pnpm/resolver-base@7.0.5
918
+ - @pnpm/fetch@2.1.7
919
+
920
+ ## 4.1.5
921
+
922
+ ### Patch Changes
923
+
924
+ - @pnpm/resolver-base@7.0.4
925
+ - @pnpm/fetch@2.1.6
926
+
927
+ ## 4.1.4
928
+
929
+ ### Patch Changes
930
+
931
+ - @pnpm/fetch@2.1.5
932
+
933
+ ## 4.1.3
934
+
935
+ ### Patch Changes
936
+
937
+ - Updated dependencies [3981f5558]
938
+ - @pnpm/fetch@2.1.4
939
+
940
+ ## 4.1.2
941
+
942
+ ### Patch Changes
943
+
944
+ - @pnpm/fetch@2.1.3
945
+
946
+ ## 4.1.1
947
+
948
+ ### Patch Changes
949
+
950
+ - @pnpm/fetch@2.1.2
951
+
952
+ ## 4.1.0
953
+
954
+ ### Minor Changes
955
+
956
+ - 2ebcfc38a: Installation of private Git-hosted repositories via HTTPS, using an auth token.
957
+
958
+ ### Patch Changes
959
+
960
+ - 7b98d16c8: Update lru-cache to v6
961
+ - @pnpm/fetch@2.1.1
962
+
963
+ ## 4.0.16
964
+
965
+ ### Patch Changes
966
+
967
+ - Updated dependencies [71aeb9a38]
968
+ - @pnpm/fetch@2.1.0
969
+
970
+ ## 4.0.15
971
+
972
+ ### Patch Changes
973
+
974
+ - @pnpm/resolver-base@7.0.3
975
+ - @pnpm/fetch@2.0.2
976
+
977
+ ## 4.0.14
978
+
979
+ ### Patch Changes
980
+
981
+ - @pnpm/resolver-base@7.0.2
982
+ - @pnpm/fetch@2.0.1
983
+
984
+ ## 4.0.13
985
+
986
+ ### Patch Changes
987
+
988
+ - Updated dependencies [2ebb7af33]
989
+ - @pnpm/fetch@2.0.0
990
+
991
+ ## 4.0.12
992
+
993
+ ### Patch Changes
994
+
995
+ - @pnpm/fetch@1.0.4
996
+ - @pnpm/resolver-base@7.0.1
997
+
998
+ ## 4.0.12-alpha.0
999
+
1000
+ ### Patch Changes
1001
+
1002
+ - @pnpm/resolver-base@7.0.1-alpha.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/resolving.git-resolver",
3
- "version": "1100.1.8",
3
+ "version": "1100.1.10",
4
4
  "description": "Resolver for git-hosted packages",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -29,20 +29,20 @@
29
29
  "!*.map"
30
30
  ],
31
31
  "dependencies": {
32
+ "@pnpm/error": "1100.0.1",
33
+ "@pnpm/network.fetch": "1100.1.6",
34
+ "@pnpm/resolving.resolver-base": "1100.5.2",
32
35
  "graceful-git": "^5.0.0",
33
36
  "hosted-git-info": "npm:@pnpm/hosted-git-info@1.0.0",
34
- "semver": "^7.8.4",
35
- "@pnpm/network.fetch": "1100.1.4",
36
- "@pnpm/error": "1100.0.1",
37
- "@pnpm/resolving.resolver-base": "1100.5.1"
37
+ "semver": "^7.8.4"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@jest/globals": "30.4.1",
41
+ "@pnpm/resolving.git-resolver": "1100.1.10",
41
42
  "@types/hosted-git-info": "^3.0.5",
42
43
  "@types/is-windows": "^1.0.2",
43
44
  "@types/semver": "7.7.1",
44
- "is-windows": "^1.0.2",
45
- "@pnpm/resolving.git-resolver": "1100.1.8"
45
+ "is-windows": "^1.0.2"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=22.13"
@@ -1,6 +0,0 @@
1
- import type { PkgResolutionId } from '@pnpm/resolving.resolver-base';
2
- export declare function createGitHostedPkgId({ repo, commit, path }: {
3
- repo: string;
4
- commit: string;
5
- path?: string;
6
- }): PkgResolutionId;
@@ -1,21 +0,0 @@
1
- export function createGitHostedPkgId({ repo, commit, path }) {
2
- const normalizedRepo = normalizeGitRepoForPkgResolutionId(repo);
3
- let id = `${normalizedRepo.includes('://') ? '' : 'https://'}${normalizedRepo}#${commit}`;
4
- if (!id.startsWith('git+'))
5
- id = `git+${id}`;
6
- if (path) {
7
- id += `&path:${path}`;
8
- }
9
- return id;
10
- }
11
- function normalizeGitRepoForPkgResolutionId(repo) {
12
- // Only scp-style shorthand (`user@host:path`) needs rewriting. A repo that
13
- // already carries a URL scheme (e.g. `ssh://user@host:2222/path`) is left
14
- // alone — its `@host:port` would otherwise match the scp pattern and get
15
- // mangled into `ssh://ssh://…`.
16
- if (repo.includes('://'))
17
- return repo;
18
- const scp = /^([^@\s]+@[^:\s]+):(.+)$/.exec(repo);
19
- return scp == null ? repo : `ssh://${scp[1]}/${scp[2]}`;
20
- }
21
- //# sourceMappingURL=createGitHostedPkgId.js.map
package/lib/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { DispatcherOptions } from '@pnpm/network.fetch';
2
- import type { GitResolution, LatestInfo, LatestQuery, ResolveOptions, ResolveResult, TarballResolution } from '@pnpm/resolving.resolver-base';
3
- import { createGitHostedPkgId } from './createGitHostedPkgId.js';
4
- import { type HostedPackageSpec } from './parseBareSpecifier.js';
5
- export { createGitHostedPkgId };
6
- export type { HostedPackageSpec };
7
- export interface GitResolveResult extends ResolveResult {
8
- normalizedBareSpecifier?: string;
9
- resolution: GitResolution | TarballResolution;
10
- resolvedVia: 'git-repository';
11
- }
12
- export type GitResolver = (wantedDependency: {
13
- bareSpecifier: string;
14
- }, opts?: Pick<ResolveOptions, 'currentPkg' | 'update'>) => Promise<GitResolveResult | null>;
15
- export declare function createGitResolver(opts: DispatcherOptions): GitResolver;
16
- export declare function resolveLatestFromGit(query: LatestQuery): Promise<LatestInfo | undefined>;
@@ -1,16 +0,0 @@
1
- import { type DispatcherOptions } from '@pnpm/network.fetch';
2
- export interface HostedPackageSpec {
3
- fetchSpec: string;
4
- hosted?: {
5
- type: string;
6
- user: string;
7
- project: string;
8
- committish: string;
9
- tarball: () => string | undefined;
10
- };
11
- normalizedBareSpecifier: string;
12
- gitCommittish: string | null;
13
- gitRange?: string;
14
- path?: string;
15
- }
16
- export declare function parseBareSpecifier(bareSpecifier: string, opts: DispatcherOptions): null | (() => Promise<HostedPackageSpec>);
@@ -1,177 +0,0 @@
1
- // cspell:ignore sshurl
2
- import urlLib, { URL } from 'node:url';
3
- import { fetchWithDispatcher } from '@pnpm/network.fetch';
4
- import { gracefulGit as git } from 'graceful-git';
5
- import HostedGit from 'hosted-git-info';
6
- const gitProtocols = new Set([
7
- 'git',
8
- 'git+http',
9
- 'git+https',
10
- 'git+rsync',
11
- 'git+ftp',
12
- 'git+file',
13
- 'git+ssh',
14
- 'ssh',
15
- ]);
16
- export function parseBareSpecifier(bareSpecifier, opts) {
17
- const hosted = HostedGit.fromUrl(bareSpecifier);
18
- if (hosted != null) {
19
- return () => fromHostedGit(hosted, opts);
20
- }
21
- const colonsPos = bareSpecifier.indexOf(':');
22
- if (colonsPos === -1)
23
- return null;
24
- const protocol = bareSpecifier.slice(0, colonsPos);
25
- // Also detect http/https URLs ending in .git as git repositories
26
- const isGitUrl = gitProtocols.has(protocol.toLocaleLowerCase()) ||
27
- ((protocol === 'http' || protocol === 'https') && /\.git(?:#|$)/.test(bareSpecifier));
28
- if (protocol && isGitUrl) {
29
- const correctBareSpecifier = correctUrl(bareSpecifier);
30
- const url = new URL(correctBareSpecifier);
31
- if (!url?.protocol)
32
- return null;
33
- const hash = (url.hash?.length > 1) ? decodeURIComponent(url.hash.slice(1)) : null;
34
- return async () => ({
35
- fetchSpec: urlToFetchSpec(url),
36
- normalizedBareSpecifier: bareSpecifier,
37
- ...parseGitParams(hash),
38
- });
39
- }
40
- return null;
41
- }
42
- function urlToFetchSpec(url) {
43
- url.hash = '';
44
- const fetchSpec = urlLib.format(url);
45
- if (fetchSpec.startsWith('git+')) {
46
- return fetchSpec.slice(4);
47
- }
48
- return fetchSpec;
49
- }
50
- async function fromHostedGit(hosted, dispatcherOptions) {
51
- let fetchSpec = null;
52
- // try git/https url before fallback to ssh url
53
- const gitHttpsUrl = hosted.https({ noCommittish: true, noGitPlus: true });
54
- if (gitHttpsUrl && await isRepoPublic(gitHttpsUrl, dispatcherOptions) && await accessRepository(gitHttpsUrl)) {
55
- fetchSpec = gitHttpsUrl;
56
- }
57
- else {
58
- const gitSshUrl = hosted.ssh({ noCommittish: true });
59
- if (gitSshUrl && await accessRepository(gitSshUrl)) {
60
- fetchSpec = gitSshUrl;
61
- }
62
- }
63
- if (!fetchSpec) {
64
- const httpsUrl = hosted.https({ noGitPlus: true, noCommittish: true });
65
- if (httpsUrl) {
66
- if ((hosted.auth || !await isRepoPublic(httpsUrl, dispatcherOptions)) && await accessRepository(httpsUrl)) {
67
- return {
68
- fetchSpec: httpsUrl,
69
- hosted: {
70
- ...hosted,
71
- _fill: hosted._fill,
72
- tarball: undefined,
73
- },
74
- normalizedBareSpecifier: `git+${httpsUrl}`,
75
- ...parseGitParams(hosted.committish),
76
- };
77
- }
78
- else {
79
- try {
80
- // when git ls-remote private repo, it asks for login credentials.
81
- // use HTTP HEAD request to test whether this is a private repo, to avoid login prompt.
82
- // this is very similar to yarn classic's behavior.
83
- // npm instead tries git ls-remote directly which prompts user for login credentials.
84
- // HTTP HEAD on https://domain/user/repo, strip out ".git"
85
- const response = await fetchWithDispatcher(httpsUrl.replace(/\.git$/, ''), { method: 'HEAD', redirect: 'manual', retry: { retries: 0 }, dispatcherOptions });
86
- if (response.ok) {
87
- fetchSpec = httpsUrl;
88
- }
89
- }
90
- catch {
91
- // ignore
92
- }
93
- }
94
- }
95
- }
96
- if (!fetchSpec) {
97
- // use ssh url for likely private repo
98
- fetchSpec = hosted.sshurl({ noCommittish: true });
99
- }
100
- return {
101
- fetchSpec: fetchSpec,
102
- hosted: {
103
- ...hosted,
104
- tarballtemplate: hosted.type === 'gitlab' ? gitlabTarballTemplate : hosted.tarballtemplate,
105
- _fill: hosted._fill,
106
- tarball: hosted.tarball,
107
- },
108
- normalizedBareSpecifier: hosted.shortcut(),
109
- ...parseGitParams(hosted.committish),
110
- };
111
- }
112
- // hosted-git-info's default GitLab tarball URL contains an encoded slash
113
- // (`%2F`) which survives into the virtual store directory name and makes
114
- // Node refuse to import the package (ERR_INVALID_MODULE_SPECIFIER).
115
- function gitlabTarballTemplate({ domain, user, project, committish }) {
116
- const ref = committish ? encodeURIComponent(committish) : 'HEAD';
117
- return `https://${domain}/${user}/${project}/-/archive/${ref}/${project}-${ref}.tar.gz`;
118
- }
119
- async function isRepoPublic(httpsUrl, dispatcherOptions) {
120
- try {
121
- const response = await fetchWithDispatcher(httpsUrl.replace(/\.git$/, ''), { method: 'HEAD', redirect: 'manual', retry: { retries: 0 }, dispatcherOptions });
122
- return response.ok;
123
- }
124
- catch {
125
- return false;
126
- }
127
- }
128
- async function accessRepository(repository) {
129
- try {
130
- await git(['ls-remote', '--exit-code', repository, 'HEAD'], { retries: 0 });
131
- return true;
132
- }
133
- catch {
134
- return false;
135
- }
136
- }
137
- function parseGitParams(committish) {
138
- const result = { gitCommittish: null };
139
- if (!committish) {
140
- return result;
141
- }
142
- const params = committish.split('&');
143
- for (const param of params) {
144
- if (param.length >= 7 && param.slice(0, 7) === 'semver:') {
145
- result.gitRange = param.slice(7);
146
- }
147
- else if (param.slice(0, 5) === 'path:') {
148
- result.path = param.slice(5);
149
- }
150
- else {
151
- result.gitCommittish = param;
152
- }
153
- }
154
- return result;
155
- }
156
- // handle SCP-like URLs
157
- // see https://github.com/yarnpkg/yarn/blob/5682d55/src/util/git.js#L103
158
- function correctUrl(gitUrl) {
159
- let _gitUrl = gitUrl.replace(/^git\+/, '');
160
- if (_gitUrl.startsWith('ssh://')) {
161
- const hashIndex = _gitUrl.indexOf('#');
162
- let hash = '';
163
- if (hashIndex !== -1) {
164
- hash = _gitUrl.slice(hashIndex);
165
- _gitUrl = _gitUrl.slice(0, hashIndex);
166
- }
167
- const [auth, ...pathname] = _gitUrl.slice(6).split('/');
168
- const [, host] = auth.split('@');
169
- if (host.includes(':') && !/:\d+$/.test(host)) {
170
- const authArr = auth.split(':');
171
- const protocol = gitUrl.split('://')[0];
172
- gitUrl = `${protocol}://${authArr.slice(0, -1).join(':') + '/' + authArr[authArr.length - 1]}${pathname.length ? '/' + pathname.join('/') : ''}${hash}`;
173
- }
174
- }
175
- return gitUrl;
176
- }
177
- //# sourceMappingURL=parseBareSpecifier.js.map