mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Don't show npm lockfiles by default (#3611)
This commit is contained in:
committed by
Colin Seymour
parent
eb6a213921
commit
fba4babdcd
@@ -57,7 +57,7 @@ module Linguist
|
||||
composer_lock? ||
|
||||
node_modules? ||
|
||||
go_vendor? ||
|
||||
npm_shrinkwrap? ||
|
||||
npm_shrinkwrap_or_package_lock? ||
|
||||
godeps? ||
|
||||
generated_by_zephir? ||
|
||||
minified_files? ||
|
||||
@@ -326,11 +326,11 @@ module Linguist
|
||||
!!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/,
|
||||
|
||||
@@ -58,6 +58,7 @@ class TestGenerated < Minitest::Test
|
||||
|
||||
# npm shrinkwrap file
|
||||
generated_sample_without_loading_data("Dummy/npm-shrinkwrap.json")
|
||||
generated_sample_without_loading_data("Dummy/package-lock.json")
|
||||
|
||||
# Godep saved dependencies
|
||||
generated_sample_without_loading_data("Godeps/Godeps.json")
|
||||
|
||||
Reference in New Issue
Block a user