lirantal / lockfile-lint

Lint an npm or yarn lockfile to analyze and detect security issues
Apache License 2.0
781 stars 35 forks source link

Correct `--integrity-exclude` package name matching logic #190

Closed ericcornelissen closed 7 months ago

ericcornelissen commented 7 months ago

Description

Update the matching logic for --integrity-exclude to check the excluded package name against the package identifier used internally. Update the corresponding test suite with more realistic mocking data. Add an extra test case to ensure package names aren't matched partially.

Types of changes

Related Issue

Followup to #188

Motivation and Context

n/a

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

docs don't apply; no new cute animal picture, sorry

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9c03af3) 98.01% compared to head (8546344) 98.01%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #190 +/- ## ======================================= Coverage 98.01% 98.01% ======================================= Files 13 13 Lines 403 403 Branches 96 96 ======================================= Hits 395 395 Misses 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.