lib/linguist/generated.rb in github-linguist-5.0.10 vs lib/linguist/generated.rb in github-linguist-5.0.11
- old
+ new
@@ -55,11 +55,11 @@
generated_net_designer_file? ||
generated_net_specflow_feature_file? ||
composer_lock? ||
node_modules? ||
go_vendor? ||
- npm_shrinkwrap? ||
+ npm_shrinkwrap_or_package_lock? ||
godeps? ||
generated_by_zephir? ||
minified_files? ||
has_source_map? ||
source_map? ||
@@ -324,14 +324,14 @@
# Returns true or false.
def go_vendor?
!!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(?<!-)\.)+(com|edu|gov|in|me|net|org|fm|io)/)
end
- # Internal: Is the blob a generated npm shrinkwrap file?
+ # Internal: Is the blob a generated npm shrinkwrap or package lock file?
#
# Returns true or false.
- def npm_shrinkwrap?
- !!name.match(/npm-shrinkwrap\.json/)
+ def npm_shrinkwrap_or_package_lock?
+ name.match(/npm-shrinkwrap\.json/) || name.match(/package-lock\.json/)
end
# Internal: Is the blob part of Godeps/,
# which are not meant for humans in pull requests.
#