Skip to content

Commit

Permalink
Merge pull request #120 from crazy-max/remove-uuid
Browse files Browse the repository at this point in the history
remove uuid package and switch to crypto
  • Loading branch information
crazy-max authored Oct 28, 2024
2 parents 7bb5657 + 0692aee commit 26145a5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 27 deletions.
24 changes: 12 additions & 12 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "^0.40.0",
"uuid": "^10.0.0"
"@docker/actions-toolkit": "^0.40.0"
},
"devDependencies": {
"@types/node": "^20.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as crypto from 'crypto';
import os from 'os';
import path from 'path';
import * as uuid from 'uuid';
import * as core from '@actions/core';
import * as actionsToolkit from '@docker/actions-toolkit';
import {Install} from '@docker/actions-toolkit/lib/docker/install';
Expand All @@ -13,7 +13,7 @@ actionsToolkit.run(
// main
async () => {
const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4().slice(0, 8)}`);
const runDir = path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);

if (input.context == 'default') {
throw new Error(`'default' context cannot be used.`);
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3374,7 +3374,6 @@ __metadata:
ts-jest: ^29.1.1
ts-node: ^10.9.1
typescript: ^5.2.2
uuid: ^10.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -7107,15 +7106,6 @@ __metadata:
languageName: node
linkType: hard

"uuid@npm:^10.0.0":
version: 10.0.0
resolution: "uuid@npm:10.0.0"
bin:
uuid: dist/bin/uuid
checksum: 4b81611ade2885d2313ddd8dc865d93d8dccc13ddf901745edca8f86d99bc46d7a330d678e7532e7ebf93ce616679fb19b2e3568873ac0c14c999032acb25869
languageName: node
linkType: hard

"uuid@npm:^3.3.2, uuid@npm:^3.3.3":
version: 3.4.0
resolution: "uuid@npm:3.4.0"
Expand Down

0 comments on commit 26145a5

Please sign in to comment.