mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add npm-shrinkwrap.json to generated files (#3048)
This file is generated by the `npm shrinkwrap` command. It's large, generated, and has a noisey diff. One similar file, php composer lock files, is already ignored. Closes https://github.com/github/linguist/issues/3045
This commit is contained in:
		
				
					committed by
					
						 Arfon Smith
						Arfon Smith
					
				
			
			
				
	
			
			
			
						parent
						
							baf56666d4
						
					
				
				
					commit
					c471990aa3
				
			| @@ -56,6 +56,7 @@ module Linguist | ||||
|       generated_net_specflow_feature_file? || | ||||
|       composer_lock? || | ||||
|       node_modules? || | ||||
|       npm_shrinkwrap? || | ||||
|       godeps? || | ||||
|       generated_by_zephir? || | ||||
|       minified_files? || | ||||
| @@ -303,6 +304,13 @@ module Linguist | ||||
|       !!name.match(/node_modules\//) | ||||
|     end | ||||
|  | ||||
|     # Internal: Is the blob a generated npm shrinkwrap file. | ||||
|     # | ||||
|     # Returns true or false. | ||||
|     def npm_shrinkwrap? | ||||
|       !!name.match(/npm-shrinkwrap\.json/) | ||||
|     end | ||||
|  | ||||
|     # Internal: Is the blob part of Godeps/, | ||||
|     # which are not meant for humans in pull requests. | ||||
|     # | ||||
|   | ||||
| @@ -51,6 +51,9 @@ class TestGenerated < Minitest::Test | ||||
|     # Node modules | ||||
|     generated_sample_without_loading_data("Dummy/node_modules/foo.js") | ||||
|  | ||||
|     # npm shrinkwrap file | ||||
|     generated_sample_without_loading_data("Dummy/npm-shrinkwrap.json") | ||||
|  | ||||
|     # Godep saved dependencies | ||||
|     generated_sample_without_loading_data("Godeps/Godeps.json") | ||||
|     generated_sample_without_loading_data("Godeps/_workspace/src/github.com/kr/s3/sign.go") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user