mirror of
				https://github.com/actions/setup-node.git
				synced 2025-10-31 16:23:34 +00:00 
			
		
		
		
	Replace uuid with crypto.randomUUID()
This commit is contained in:
		
							parent
							
								
									89d709d423
								
							
						
					
					
						commit
						a1962a642f
					
				
							
								
								
									
										16
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										16
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -17,8 +17,7 @@ | ||||
|         "@actions/http-client": "^2.2.1", | ||||
|         "@actions/io": "^1.0.2", | ||||
|         "@actions/tool-cache": "^2.0.2", | ||||
|         "semver": "^7.6.3", | ||||
|         "uuid": "^11.1.0" | ||||
|         "semver": "^7.6.3" | ||||
|       }, | ||||
|       "devDependencies": { | ||||
|         "@types/jest": "^29.5.14", | ||||
| @ -5683,19 +5682,6 @@ | ||||
|         "punycode": "^2.1.0" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/uuid": { | ||||
|       "version": "11.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", | ||||
|       "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", | ||||
|       "funding": [ | ||||
|         "https://github.com/sponsors/broofa", | ||||
|         "https://github.com/sponsors/ctavan" | ||||
|       ], | ||||
|       "license": "MIT", | ||||
|       "bin": { | ||||
|         "uuid": "dist/esm/bin/uuid" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/v8-to-istanbul": { | ||||
|       "version": "9.1.3", | ||||
|       "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", | ||||
|  | ||||
| @ -36,8 +36,7 @@ | ||||
|     "@actions/http-client": "^2.2.1", | ||||
|     "@actions/io": "^1.0.2", | ||||
|     "@actions/tool-cache": "^2.0.2", | ||||
|     "semver": "^7.6.3", | ||||
|     "uuid": "^11.1.0" | ||||
|     "semver": "^7.6.3" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^29.5.14", | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
| import {v4 as uuidv4} from 'uuid'; | ||||
| import * as tc from '@actions/tool-cache'; | ||||
| import * as hc from '@actions/http-client'; | ||||
| import * as core from '@actions/core'; | ||||
| @ -185,7 +184,7 @@ export default abstract class BaseDistribution { | ||||
|     const osArch: string = this.translateArchToDistUrl(arch); | ||||
| 
 | ||||
|     // Create temporary folder to download to
 | ||||
|     const tempDownloadFolder = `temp_${uuidv4()}`; | ||||
|     const tempDownloadFolder = `temp_${crypto.randomUUID()}`; | ||||
|     const tempDirectory = process.env['RUNNER_TEMP'] || ''; | ||||
|     assert.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined'); | ||||
|     const tempDir: string = path.join(tempDirectory, tempDownloadFolder); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user