Repository navigation
Commit 1e63b45
* Start fix for #1965
Assisted-by: Claude Code:claude-opus-5-5
* Test npm overrides that swap in a URL spec
A registry range that the root package.json overrides with a remote
tarball URL, git or path spec is installed by npm from that spec, not
from the lock's resolved URL. These tests show the copy is not yet
treated as a non-registry install, so hosted and vendored scans rewire
it and VEX attests a patch that npm ci never installs (#1965).
Assisted-by: Claude Code:claude-opus-5-5
* Skip npm copies an override sends to a URL
When the root package.json overrides a registry range with a remote
tarball URL, git or path spec, npm installs that spec and ignores the
lock's resolved URL. Hosted and vendored scans now treat such a copy
like any other non-registry install: hosted skips it with
redirect_npm_non_registry_entry_skipped, vendored refuses it, and VEX
no longer attests a patch that npm ci never installs.
When the winning override can't be decided exactly, any rule for the
package with a non-registry value keeps the copy unpatched and
reported, matching the module's cautious rule for unclear cases.
Fixes #1965
Assisted-by: Claude Code:claude-opus-5-5
* Keep URL-overridden npm copies unwindable
Test the hosted rewriter, the vendored lock writer and VEX lockfile
discovery against a registry range that the root overrides send to a
remote tarball URL: hosted skips it loudly, vendored refuses it, and
VEX attests nothing (#1965).
A pin an older release wrote at such a copy is still the rewriters'
own output, so VEX discovery keeps it shadowed and rollback and remove
can still unwind it.
Assisted-by: Claude Code:claude-opus-5-5
* E2E: hosted npm skips a URL-overridden copy
Real npm installs a local foo that depends on left-pad ^1.3.0 while
the root overrides send left-pad to a remote tarball URL. The hosted
scan now skips that copy with redirect_npm_non_registry_entry_skipped,
leaves the lock byte-identical and attests nothing (#1965).
Assisted-by: Claude Code:claude-opus-5-5
* Look up npm URL overrides only when one exists
Settle registry edges whose package has no non-registry override rule
before walking the dependent's chain, so large locks with an unrelated
overrides block don't pay a per-edge search.
Assisted-by: Claude Code:claude-opus-5-5
* Match npm overrides scoped to a workspace member
npm reaches a workspace member through the root's link edge, so an
override keyed by the member's name applies to its dependencies. The
override lookup now starts a dependent's ancestor chain with its
workspace member, so a URL override scoped to a member skips that
member's copy instead of rewiring and attesting it. Found in review.
Assisted-by: Claude Code:claude-opus-5-5
* Name npm workspace members as npm does
A member without a name field keeps its @scope/ folder parent, and only
the root-level link entry names a member: a nested link to the same
folder may be an alias. Member-scoped overrides now match the member's
real name. Found in review.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 568e376 commit 1e63b45
5 files changed
Lines changed: 887 additions & 43 deletions
File tree
- crates
- socket-patch-cli/tests
- socket-patch-core/src
- patch/redirect
- vendor
- vex/discover
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21340 | 21340 | | |
21341 | 21341 | | |
21342 | 21342 | | |
| 21343 | + | |
| 21344 | + | |
| 21345 | + | |
| 21346 | + | |
| 21347 | + | |
| 21348 | + | |
| 21349 | + | |
| 21350 | + | |
| 21351 | + | |
| 21352 | + | |
| 21353 | + | |
| 21354 | + | |
| 21355 | + | |
| 21356 | + | |
| 21357 | + | |
| 21358 | + | |
| 21359 | + | |
| 21360 | + | |
| 21361 | + | |
| 21362 | + | |
| 21363 | + | |
| 21364 | + | |
| 21365 | + | |
| 21366 | + | |
| 21367 | + | |
| 21368 | + | |
| 21369 | + | |
| 21370 | + | |
| 21371 | + | |
| 21372 | + | |
| 21373 | + | |
| 21374 | + | |
| 21375 | + | |
| 21376 | + | |
| 21377 | + | |
| 21378 | + | |
| 21379 | + | |
| 21380 | + | |
| 21381 | + | |
| 21382 | + | |
| 21383 | + | |
| 21384 | + | |
| 21385 | + | |
| 21386 | + | |
| 21387 | + | |
| 21388 | + | |
| 21389 | + | |
| 21390 | + | |
| 21391 | + | |
| 21392 | + | |
| 21393 | + | |
| 21394 | + | |
| 21395 | + | |
| 21396 | + | |
| 21397 | + | |
| 21398 | + | |
| 21399 | + | |
| 21400 | + | |
| 21401 | + | |
| 21402 | + | |
| 21403 | + | |
| 21404 | + | |
| 21405 | + | |
| 21406 | + | |
| 21407 | + | |
| 21408 | + | |
| 21409 | + | |
| 21410 | + | |
| 21411 | + | |
| 21412 | + | |
| 21413 | + | |
| 21414 | + | |
| 21415 | + | |
| 21416 | + | |
| 21417 | + | |
| 21418 | + | |
| 21419 | + | |
| 21420 | + | |
| 21421 | + | |
| 21422 | + | |
| 21423 | + | |
21343 | 21424 | | |
21344 | 21425 | | |
21345 | 21426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2825 | 2825 | | |
2826 | 2826 | | |
2827 | 2827 | | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
2828 | 2878 | | |
2829 | 2879 | | |
2830 | 2880 | | |
| |||
0 commit comments