mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Don't show npm lockfiles by default (#3611)
This commit is contained in:
		
				
					committed by
					
						 Colin Seymour
						Colin Seymour
					
				
			
			
				
	
			
			
			
						parent
						
							eb6a213921
						
					
				
				
					commit
					fba4babdcd
				
			| @@ -57,7 +57,7 @@ module Linguist | |||||||
|       composer_lock? || |       composer_lock? || | ||||||
|       node_modules? || |       node_modules? || | ||||||
|       go_vendor? || |       go_vendor? || | ||||||
|       npm_shrinkwrap? || |       npm_shrinkwrap_or_package_lock? || | ||||||
|       godeps? || |       godeps? || | ||||||
|       generated_by_zephir? || |       generated_by_zephir? || | ||||||
|       minified_files? || |       minified_files? || | ||||||
| @@ -326,11 +326,11 @@ module Linguist | |||||||
|       !!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(?<!-)\.)+(com|edu|gov|in|me|net|org|fm|io)/) |       !!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(?<!-)\.)+(com|edu|gov|in|me|net|org|fm|io)/) | ||||||
|     end |     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. |     # Returns true or false. | ||||||
|     def npm_shrinkwrap? |     def npm_shrinkwrap_or_package_lock? | ||||||
|       !!name.match(/npm-shrinkwrap\.json/) |       name.match(/npm-shrinkwrap\.json/) || name.match(/package-lock\.json/) | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     # Internal: Is the blob part of Godeps/, |     # Internal: Is the blob part of Godeps/, | ||||||
|   | |||||||
| @@ -58,6 +58,7 @@ class TestGenerated < Minitest::Test | |||||||
|  |  | ||||||
|     # npm shrinkwrap file |     # npm shrinkwrap file | ||||||
|     generated_sample_without_loading_data("Dummy/npm-shrinkwrap.json") |     generated_sample_without_loading_data("Dummy/npm-shrinkwrap.json") | ||||||
|  |     generated_sample_without_loading_data("Dummy/package-lock.json") | ||||||
|  |  | ||||||
|     # Godep saved dependencies |     # Godep saved dependencies | ||||||
|     generated_sample_without_loading_data("Godeps/Godeps.json") |     generated_sample_without_loading_data("Godeps/Godeps.json") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user