Repository navigation
Commit b4224f0
Stop attesting npm-family pins pnpm or a user patch overrides
VEX discovery attested two kinds of npm-family pins that the hosted and
vendored writers refuse, so the statement could cover bytes the install
never uses.
N1, pnpm gitBranchLockfile (#556): with the setting on and a
pnpm-lock.<branch>.yaml present, pnpm installs the branch from that lock.
Hosted withholds the root and member locks and refuses every pnpm pin;
vendored refuses the project. Discovery now runs the same detection
(utils::pnpm_workspace::git_branch_locks, via a new git_branch_locks_in
that skips the environment, as discovery already does for the lockfile
setting) and, only while the lockfile setting is on and outside Rush,
marks every ref of the root and member pnpm locks
UnattestedKind::PnpmGitBranchLock.
N2, user-patched npm / Bun packages (#711, #367): hosted leaves a package
the project patches itself unwired and never confirms it; vendored
refuses. Hosted's npm gate is factored into patch::redirect::NpmUserPatches
(package.json patchedDependencies keys plus non-null lock-entry `patched`
records in any present npm lock), which the hosted rewriter and npm
discovery now share. Bun discovery applies the rewriters' per-dependency
rule (bun_lock_text::patched_dependency_key over the manifest keys, plus
bun.lock's mirrored keys for the text lock) against each ref's hosted URL
or vendored tarball. Matching refs are marked
UnattestedKind::UserPatchedDependency.
Both keep the ref (rollback / remove / list still find a pre-fix pin and
the ledgers keep the wiring live, since no re-run can clear the evidence)
and only vex omits it, as vex_pnpm_git_branch_lockfile /
vex_npm_patched_dependency. CLI_CONTRACT.md documents both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7bde3ba commit b4224f0
7 files changed
Lines changed: 586 additions & 52 deletions
File tree
- crates
- socket-patch-cli
- src/commands
- socket-patch-core/src
- patch/redirect
- utils
- vex/discover
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
| |||
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
271 | 288 | | |
272 | 289 | | |
273 | 290 | | |
| |||
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
421 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
422 | 441 | | |
423 | 442 | | |
424 | 443 | | |
| |||
1762 | 1781 | | |
1763 | 1782 | | |
1764 | 1783 | | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1765 | 1811 | | |
1766 | 1812 | | |
1767 | 1813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
| 1305 | + | |
| 1306 | + | |
1309 | 1307 | | |
1310 | 1308 | | |
1311 | 1309 | | |
1312 | 1310 | | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1334 | 1316 | | |
1335 | 1317 | | |
1336 | 1318 | | |
1337 | 1319 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
| 1320 | + | |
1351 | 1321 | | |
1352 | 1322 | | |
1353 | 1323 | | |
| |||
1440 | 1410 | | |
1441 | 1411 | | |
1442 | 1412 | | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 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 | + | |
1443 | 1477 | | |
1444 | 1478 | | |
1445 | 1479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
778 | 786 | | |
779 | 787 | | |
780 | 788 | | |
| |||
808 | 816 | | |
809 | 817 | | |
810 | 818 | | |
811 | | - | |
| 819 | + | |
812 | 820 | | |
813 | 821 | | |
814 | 822 | | |
| |||
0 commit comments