Commit 60f8c7a
committed
chore(release): v5.26.0
Tightens the GitHub fallback work from 5.25.x and rolls in supporting tooling. Highlights:
* `getLatestRelease`, `getReleaseAssetUrl`: silent transparent GraphQL fallback when REST returns 200 + empty body. The `logger.warn` / `logger.info` chatter is gone — the helpers are silent by design now (errors throw, success returns).
* New `nothrow` option on both helpers, mirroring the `whichSync({ nothrow })` convention from `@socketsecurity/lib/bin`. When true, returns `undefined` instead of throwing on the both-backends-degraded shape.
* Return-type cleanup: `null` → `undefined` everywhere we own the surface. Wire-shape types (REST/GraphQL JSON literals) keep `null` because that's what GitHub puts on the wire.
* Error messages tightened to the CLAUDE.md library-API style: terse, stable, callable-by-`instanceof`/`.message`. The verbose explanations live in the JSDoc.
* `tools/prim` audit gained a `redeclaration` finding kind. It now flags top-level `const ErrorCtor = Error` / `const JSONParse = JSON.parse` / `const ArrayIsArray = Array.isArray` and recommends importing from `./primordials` instead of redeclaring locally. `--coverage` includes redeclarations alongside covered call sites; `--gaps` excludes them. The audit found 14 pre-existing redeclarations in the package (out of scope for this release).
* socket-lib's own github.ts and releases/github.ts now import from `./primordials` instead of redeclaring locally — matches what the new audit recommends.
Tests: 154/154 pass across `github.test.mts` (97) and `releases-github.test.mts` (57). Coverage on `src/github.ts` is 19/19 functions, 80/96 branches, 126/135 statements. `src/releases/github.ts` is 27/29 functions, 105/172 branches (the missing branches are all in pre-existing `downloadAndExtractArchive` / `downloadAndExtractZip` not touched in this release).1 parent ee56c1f commit 60f8c7a
10 files changed
Lines changed: 603 additions & 271 deletions
File tree
- .git-hooks
- src
- releases
- test/unit
- tools/prim/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
8 | 33 | | |
9 | 34 | | |
10 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
| |||
390 | 385 | | |
391 | 386 | | |
392 | 387 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
400 | 391 | | |
401 | 392 | | |
| 393 | + | |
| 394 | + | |
402 | 395 | | |
403 | | - | |
| 396 | + | |
404 | 397 | | |
405 | 398 | | |
406 | 399 | | |
407 | 400 | | |
408 | 401 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
414 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
454 | | - | |
455 | | - | |
| 457 | + | |
| 458 | + | |
456 | 459 | | |
457 | | - | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
464 | 467 | | |
465 | 468 | | |
466 | 469 | | |
467 | | - | |
| 470 | + | |
468 | 471 | | |
469 | 472 | | |
470 | 473 | | |
| |||
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
529 | | - | |
| 532 | + | |
530 | 533 | | |
531 | 534 | | |
532 | | - | |
| 535 | + | |
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
| |||
549 | 552 | | |
550 | 553 | | |
551 | 554 | | |
552 | | - | |
| 555 | + | |
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
| |||
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
573 | | - | |
| 576 | + | |
574 | 577 | | |
575 | 578 | | |
576 | 579 | | |
577 | 580 | | |
578 | | - | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | | - | |
| 584 | + | |
582 | 585 | | |
583 | 586 | | |
584 | 587 | | |
| |||
588 | 591 | | |
589 | 592 | | |
590 | 593 | | |
591 | | - | |
| 594 | + | |
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| |||
781 | 784 | | |
782 | 785 | | |
783 | 786 | | |
784 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
785 | 795 | | |
786 | 796 | | |
787 | 797 | | |
| |||
0 commit comments