Bug fix: Parse NPM lock files that contain engine object arrays
What does this MR do and why?
Resolved a bug in the engine responsible for scanning package-lock.json files in the npm lock file scanner. Only one format of the engines field is currently parsed correctly.
The scanner currently supports the simple string format:
"engines": {
"node": ">=14.0.0"
}
This MR add support for this valid format also:
"engines": [
{
"name": "cordova",
"version": ">=3.0.0"
}
]
Related issues
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.