Skip to content

Commit

Permalink
Improve naming of a method
Browse files Browse the repository at this point in the history
Since we have `ignore` settings, this may lead code reader into thinking
we actually support skipping lockfiles through `dependabot.yml`. This is
just trying to respect a package manager specific setting, so let's
rename it to reduce confusion.
  • Loading branch information
deivid-rodriguez committed Apr 28, 2023
1 parent 843e728 commit d0bbc6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def package_json
def package_lock
return @package_lock if defined?(@package_lock)

@package_lock = fetch_file_if_present("package-lock.json") unless ignore_package_lock?
@package_lock = fetch_file_if_present("package-lock.json") unless skip_package_lock?
end

def yarn_lock
Expand Down Expand Up @@ -490,7 +490,7 @@ def parsed_shrinkwrap
{}
end

def ignore_package_lock?
def skip_package_lock?
return false unless npmrc

npmrc.content.match?(/^package-lock\s*=\s*false/)
Expand Down

0 comments on commit d0bbc6b

Please sign in to comment.