Commit a8e666e
authored
fix(arborist): condition to include name field in package-lock fixed (#7602)
When metadata is committed for the first time when there is no
package-lock, when target node has the same name field value as target
package name and link node also share the same name field, name field is
omitted from lock file, in subsequent times when there is already a lock
file, it reads target node with name field derived from realpath value
of the node and included in lock file. this creates mismatch of lock
file between installs.
This PR adds additional condition to check if name derived from realpath
is the same name as package and adds the name property.
Fixes: #71661 parent 55639ef commit a8e666e
File tree
3 files changed
+66
-2
lines changed- workspaces/arborist
- lib
- tap-snapshots/test
- test
3 files changed
+66
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | | - | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
| |||
401 | 406 | | |
402 | 407 | | |
403 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
404 | 417 | | |
405 | 418 | | |
406 | 419 | | |
| |||
466 | 479 | | |
467 | 480 | | |
468 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
469 | 489 | | |
470 | 490 | | |
471 | 491 | | |
| |||
477 | 497 | | |
478 | 498 | | |
479 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
480 | 511 | | |
481 | 512 | | |
482 | 513 | | |
| |||
549 | 580 | | |
550 | 581 | | |
551 | 582 | | |
| 583 | + | |
552 | 584 | | |
553 | 585 | | |
554 | 586 | | |
| |||
572 | 604 | | |
573 | 605 | | |
574 | 606 | | |
| 607 | + | |
575 | 608 | | |
576 | 609 | | |
577 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
433 | 458 | | |
434 | 459 | | |
435 | 460 | | |
| |||
520 | 545 | | |
521 | 546 | | |
522 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
523 | 552 | | |
524 | 553 | | |
525 | 554 | | |
| |||
0 commit comments