Skip to content

Commit

Permalink
Fix npm_and_yarn engine detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Jan 23, 2025
1 parent 2ec3b06 commit 403bf06
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/version_selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def setup(manifest_json, name)

# Only keep matching specs versions i.e. "20.21.2", "7.1.2",
# Additional specs can be added later
engine_versions.delete_if { |_key, value| !valid_extracted_version?(value) }
version = engine_versions.select { |engine, _value| engine.to_s.match(name) }
version = engine_versions.select { |engine, value| valid_extracted_version?(value) && engine.to_s.match(name) }

version
end
Expand Down

0 comments on commit 403bf06

Please sign in to comment.