Replace uuid with crypto.randomUUID() (#1378)

* Replace uuid with crypto.randomUUID()

* chore: license cache

* chore: update files in dist

* fix: edits during resolve
This commit is contained in:
Trivikram Kamat
2026-02-26 11:09:52 -08:00
committed by GitHub
parent 774c1d6296
commit c882bffdbd
4 changed files with 4 additions and 638 deletions

View File

@@ -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);