mirror of
				https://github.com/Swatinem/rust-cache.git
				synced 2025-10-31 23:43:47 +00:00 
			
		
		
		
	chore: use linefix to ensure platform line endings (#135)
Use linefix so that when developing changes the results of npm run prepare always have unix line endings so git diff commands don't show line ending changes for the ncc generated files.
This commit is contained in:
		
							parent
							
								
									def0926359
								
							
						
					
					
						commit
						68aeeba167
					
				
							
								
								
									
										2
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							| @ -31,7 +31,7 @@ jobs: | ||||
| 
 | ||||
|       - name: Compare the expected and actual dist/ directories | ||||
|         run: | | ||||
|           if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||||
|           if [ "$(git diff dist/ | wc -l)" -gt "0" ]; then | ||||
|             echo "Detected uncommitted changes after build. See status below:" | ||||
|             git diff | ||||
|             exit 1 | ||||
|  | ||||
							
								
								
									
										16
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										16
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -17,6 +17,7 @@ | ||||
|       }, | ||||
|       "devDependencies": { | ||||
|         "@vercel/ncc": "^0.36.1", | ||||
|         "linefix": "^0.1.1", | ||||
|         "typescript": "5.0.4" | ||||
|       }, | ||||
|       "funding": { | ||||
| @ -414,6 +415,15 @@ | ||||
|         "node": ">=4" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/linefix": { | ||||
|       "version": "0.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/linefix/-/linefix-0.1.1.tgz", | ||||
|       "integrity": "sha512-fHYLcNWUGTs3QjR8GD8tzHmkVbIoTbjcB5MLXs1Iu1cZazTvcUKaCiuarDM0jVygLnpxLTVbbihLJevKARmqrA==", | ||||
|       "dev": true, | ||||
|       "bin": { | ||||
|         "linefix": "bin/fix.js" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/mime-db": { | ||||
|       "version": "1.52.0", | ||||
|       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", | ||||
| @ -918,6 +928,12 @@ | ||||
|       "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", | ||||
|       "integrity": "sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==" | ||||
|     }, | ||||
|     "linefix": { | ||||
|       "version": "0.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/linefix/-/linefix-0.1.1.tgz", | ||||
|       "integrity": "sha512-fHYLcNWUGTs3QjR8GD8tzHmkVbIoTbjcB5MLXs1Iu1cZazTvcUKaCiuarDM0jVygLnpxLTVbbihLJevKARmqrA==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "mime-db": { | ||||
|       "version": "1.52.0", | ||||
|       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", | ||||
|  | ||||
| @ -30,9 +30,10 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@vercel/ncc": "^0.36.1", | ||||
|     "linefix": "^0.1.1", | ||||
|     "typescript": "5.0.4" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts" | ||||
|     "prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist" | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user