Skip to content

Commit 26145a5

Browse files
authored
Merge pull request #120 from crazy-max/remove-uuid
remove uuid package and switch to crypto
2 parents 7bb5657 + 0692aee commit 26145a5

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

dist/index.js

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"packageManager": "[email protected]",
2828
"dependencies": {
2929
"@actions/core": "^1.11.1",
30-
"@docker/actions-toolkit": "^0.40.0",
31-
"uuid": "^10.0.0"
30+
"@docker/actions-toolkit": "^0.40.0"
3231
},
3332
"devDependencies": {
3433
"@types/node": "^20.6.0",

src/main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import * as crypto from 'crypto';
12
import os from 'os';
23
import path from 'path';
3-
import * as uuid from 'uuid';
44
import * as core from '@actions/core';
55
import * as actionsToolkit from '@docker/actions-toolkit';
66
import {Install} from '@docker/actions-toolkit/lib/docker/install';
@@ -13,7 +13,7 @@ actionsToolkit.run(
1313
// main
1414
async () => {
1515
const input: context.Inputs = context.getInputs();
16-
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4().slice(0, 8)}`);
16+
const runDir = path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);
1717

1818
if (input.context == 'default') {
1919
throw new Error(`'default' context cannot be used.`);

yarn.lock

-10
Original file line numberDiff line numberDiff line change
@@ -3374,7 +3374,6 @@ __metadata:
33743374
ts-jest: ^29.1.1
33753375
ts-node: ^10.9.1
33763376
typescript: ^5.2.2
3377-
uuid: ^10.0.0
33783377
languageName: unknown
33793378
linkType: soft
33803379

@@ -7107,15 +7106,6 @@ __metadata:
71077106
languageName: node
71087107
linkType: hard
71097108

7110-
"uuid@npm:^10.0.0":
7111-
version: 10.0.0
7112-
resolution: "uuid@npm:10.0.0"
7113-
bin:
7114-
uuid: dist/bin/uuid
7115-
checksum: 4b81611ade2885d2313ddd8dc865d93d8dccc13ddf901745edca8f86d99bc46d7a330d678e7532e7ebf93ce616679fb19b2e3568873ac0c14c999032acb25869
7116-
languageName: node
7117-
linkType: hard
7118-
71197109
"uuid@npm:^3.3.2, uuid@npm:^3.3.3":
71207110
version: 3.4.0
71217111
resolution: "uuid@npm:3.4.0"

0 commit comments

Comments
 (0)