Skip to content

Commit a1962a6

Browse files
committed
Replace uuid with crypto.randomUUID()
1 parent 89d709d commit a1962a6

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

package-lock.json

Lines changed: 1 addition & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
"@actions/http-client": "^2.2.1",
3737
"@actions/io": "^1.0.2",
3838
"@actions/tool-cache": "^2.0.2",
39-
"semver": "^7.6.3",
40-
"uuid": "^11.1.0"
39+
"semver": "^7.6.3"
4140
},
4241
"devDependencies": {
4342
"@types/jest": "^29.5.14",

src/distributions/base-distribution.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {v4 as uuidv4} from 'uuid';
21
import * as tc from '@actions/tool-cache';
32
import * as hc from '@actions/http-client';
43
import * as core from '@actions/core';
@@ -185,7 +184,7 @@ export default abstract class BaseDistribution {
185184
const osArch: string = this.translateArchToDistUrl(arch);
186185

187186
// Create temporary folder to download to
188-
const tempDownloadFolder = `temp_${uuidv4()}`;
187+
const tempDownloadFolder = `temp_${crypto.randomUUID()}`;
189188
const tempDirectory = process.env['RUNNER_TEMP'] || '';
190189
assert.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');
191190
const tempDir: string = path.join(tempDirectory, tempDownloadFolder);

0 commit comments

Comments
 (0)