Skip to content

fix(ls): restore 100% coverage on release/v11 after #9633#9636

Merged
owlstronaut merged 1 commit into
npm:release/v11from
manzoorwanijk:fix/ls-linked-store-dev-edge-coverage-v11
Jun 24, 2026
Merged

fix(ls): restore 100% coverage on release/v11 after #9633#9636
owlstronaut merged 1 commit into
npm:release/v11from
manzoorwanijk:fix/ls-linked-store-dev-edge-coverage-v11

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Contributor

Restores the global 100% coverage gate on release/v11, which broke after #9633.

filterLinkedStrategyEdges in lib/commands/ls.js skips dev edges on non-root (store) packages — a guard added in #9095 to suppress false UNMET DEPENDENCY output in the linked strategy. #9633 fixed the root cause (store packages no longer load devDependencies as required edges), so the test suite no longer produces a store package with a dev edge, leaving that branch unexercised.

The guard is kept as defensive (a store package could still carry a dev edge in untested paths) and marked istanbul ignore, so behavior is unchanged. The full test suite passes at 100%.

This gap is invisible on direct pushes to release/v11 because the Test matrix only runs on PRs, so it surfaces on the first PR after #9633.

References

Follows up #9633

@manzoorwanijk manzoorwanijk marked this pull request as ready for review June 24, 2026 15:45
@manzoorwanijk manzoorwanijk requested review from a team as code owners June 24, 2026 15:45
@manzoorwanijk

Copy link
Copy Markdown
Contributor Author

CC: @owlstronaut

@owlstronaut owlstronaut merged commit 784cbe9 into npm:release/v11 Jun 24, 2026
20 checks passed
@manzoorwanijk manzoorwanijk deleted the fix/ls-linked-store-dev-edge-coverage-v11 branch June 24, 2026 17:08
owlstronaut pushed a commit that referenced this pull request Jun 24, 2026
Restores the global 100% coverage gate on `latest`, which broke after
#9626.

`filterLinkedStrategyEdges` in `lib/commands/ls.js` skips dev edges on
non-root packages — a guard added in #9095 to suppress false `UNMET
DEPENDENCY` output in the linked strategy. #9626 fixed the root cause
for store packages (they no longer load `devDependencies` as required
edges), so the store-based test no longer produces a dev edge, leaving
that branch unexercised.

Rather than ignore the line, this adds a regression test that genuinely
exercises the guard: arborist still loads dev edges for a `file:`-linked
transitive package, so listing one with `--all` under the linked
strategy reaches the guard at depth > 0 and confirms its devDependency
is suppressed instead of reported as `UNMET DEPENDENCY`. The full test
suite passes at 100%.

This is the `latest` counterpart of #9636, which restored coverage on
`release/v11` via an `istanbul ignore`.

## References

Follows up #9626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants