Repository navigation
Commit 3d32b16
* Start fix for #1236
Assisted-by: Claude Code:claude-opus-5-5
* Stop yarn classic VEX attesting a renamed copy
yarn 1 locks a file: or url dependency under the name the project gave
it, so "lp2": "file:./lpdir" locks as lp2@file:./lpdir even when lpdir
is left-pad@1.3.0. VEX read the package name from that lock key only,
so it never saw that copy and attested left-pad not_affected while
node_modules/lp2 installed the unpatched bytes.
Classic discovery now reads such a copy for the package it really
holds (the directory's package.json, the tarball's manifest, or the
registry url's path), the way yarn berry has since #939, and that copy
contests the hosted or vendored pin in the same lock. Berry and
classic share one reader.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
* Name renamed yarn classic copies in scans
A hosted or vendored yarn classic scan only matched lock blocks by the
name in their key, so a copy of the patched package declared under
another dependency name ("lp2": "file:./lpdir", or a registry tarball
URL) was never mentioned: the scan exited 0 with no warning while that
copy kept installing unpatched.
Both scans now read such a copy for the package it really holds (the
directory's package.json, or the registry URL's path) and name it with
the same warnings a same-name copy gets
(redirect_yarn_classic_directory_skipped /
redirect_yarn_classic_non_registry_entry_skipped hosted,
vendor_link_entry_skipped / vendor_yarn_classic_non_registry_entry_
skipped vendored). The hosted run also keeps that patch out of the
in-run VEX's assumed-applied set. The registry copy is still pinned.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
* Test and document renamed yarn classic copies
Adds a real-yarn-1 end-to-end test: a project that declares
"lp2": "file:./lpdir" (lpdir being left-pad@1.3.0) beside the registry
left-pad. The hosted scan still pins the registry copy, names lp2, and
neither the in-run VEX nor a lock-only vex attests left-pad.
docs/ecosystems.md now says the file: directory rule holds whatever
dependency name the copy carries, and that a git copy under another
name records no package name in the lock and is not detected.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
* Strip package.json BOMs through the shared helper
The package.json name reader that moved into formats/yarn/source.rs
stripped a UTF-8 BOM inline, which the #905 architecture test forbids
outside formats::text. It now calls strip_bom_bytes.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
* Refuse vendoring a package only locked renamed
When every yarn.lock copy of a package was locked under another
dependency name ("lp2@file:./lpdir" being left-pad@1.3.0), vendoring
refused with vendor_lock_entry_not_found and told you to run
`yarn install`, which can't help: the package is installed, just not
under its own name.
It now refuses with vendor_lock_entry_not_rewritable naming those
copies, in the vendor loop and in its download plan alike, the same
way a lock holding only git or file: directory copies is refused.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
* Keep yarn install advice for a stale own-name block
The previous change turned "not found" into "not rewritable" whenever a
renamed copy of the package was locked. If the package also has a stale
block under its own name (no `resolved`), `yarn install` does re-lock
it, so the refusal now keeps the "not found" code and its
`yarn install` remedy in that case. That applies in the vendor loop and
in its download plan.
Refs #1236
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 83969ec commit 3d32b16
7 files changed
Lines changed: 815 additions & 108 deletions
File tree
- crates
- socket-patch-cli/tests
- socket-patch-core/src
- formats/yarn
- hosted
- patch/redirect
- vendor
- vex/discover
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1247 | 1247 | | |
1248 | 1248 | | |
1249 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1250 | 1378 | | |
1251 | 1379 | | |
1252 | 1380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
77 | 166 | | |
78 | 167 | | |
79 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
593 | 622 | | |
594 | 623 | | |
595 | 624 | | |
| |||
0 commit comments