summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-09-28 17:42:23 +0200
committerOskar Nyberg <oskar@mullvad.net>2021-09-30 14:25:48 +0200
commite764979d1d4a8a780c10f956f71886ae11339b5e (patch)
treec127270da3cabd331d34f89f7a93469bd362ebf9
parent1333c8968e86570b9205bca5d7abf1eacae5812e (diff)
downloadmullvadvpn-e764979d1d4a8a780c10f956f71886ae11339b5e.tar.xz
mullvadvpn-e764979d1d4a8a780c10f956f71886ae11339b5e.zip
Replace uuid module with node 16.5's crypto.randomUUID()
-rw-r--r--gui/package-lock.json59
-rw-r--r--gui/package.json4
-rw-r--r--gui/src/main/index.ts4
3 files changed, 16 insertions, 51 deletions
diff --git a/gui/package-lock.json b/gui/package-lock.json
index 62d43ff6a8..aeef595d1e 100644
--- a/gui/package-lock.json
+++ b/gui/package-lock.json
@@ -24,8 +24,7 @@
"react-simple-maps": "^2.1.2",
"redux": "^4.0.5",
"sprintf-js": "^1.1.2",
- "styled-components": "^5.1.1",
- "uuid": "^3.0.1"
+ "styled-components": "^5.1.1"
},
"devDependencies": {
"@types/chai": "^4.1.7",
@@ -48,7 +47,6 @@
"@types/sprintf-js": "^1.1.2",
"@types/styled-components": "^5.1.4",
"@types/topojson-specification": "^1.0.1",
- "@types/uuid": "^3.4.4",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"browserify": "^17.0.0",
@@ -534,9 +532,9 @@
}
},
"node_modules/@grpc/grpc-js/node_modules/@types/node": {
- "version": "16.9.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz",
- "integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA=="
+ "version": "16.10.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
+ "integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w=="
},
"node_modules/@gulp-sourcemaps/identity-map": {
"version": "1.0.2",
@@ -992,9 +990,9 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "10.12.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.3.tgz",
- "integrity": "sha512-sfGmOtSMSbQ/AKG8V9xD1gmjquC9awIIZ/Kj309pHb2n3bcRAcGMQv5nJ6gCXZVsneGE4+ve8DXKRCsrg3TFzg==",
+ "version": "10.17.60",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
+ "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
"dev": true
},
"node_modules/@types/node-gettext": {
@@ -1126,15 +1124,6 @@
"@types/geojson": "*"
}
},
- "node_modules/@types/uuid": {
- "version": "3.4.4",
- "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz",
- "integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==",
- "dev": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
"node_modules/@types/verror": {
"version": "1.10.4",
"resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.4.tgz",
@@ -13142,14 +13131,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
- "node_modules/uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "bin": {
- "uuid": "bin/uuid"
- }
- },
"node_modules/v8-compile-cache": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
@@ -14126,9 +14107,9 @@
},
"dependencies": {
"@types/node": {
- "version": "16.9.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz",
- "integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA=="
+ "version": "16.10.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
+ "integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w=="
}
}
},
@@ -14510,9 +14491,9 @@
"dev": true
},
"@types/node": {
- "version": "10.12.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.3.tgz",
- "integrity": "sha512-sfGmOtSMSbQ/AKG8V9xD1gmjquC9awIIZ/Kj309pHb2n3bcRAcGMQv5nJ6gCXZVsneGE4+ve8DXKRCsrg3TFzg==",
+ "version": "10.17.60",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
+ "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
"dev": true
},
"@types/node-gettext": {
@@ -14644,15 +14625,6 @@
"@types/geojson": "*"
}
},
- "@types/uuid": {
- "version": "3.4.4",
- "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz",
- "integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==",
- "dev": true,
- "requires": {
- "@types/node": "*"
- }
- },
"@types/verror": {
"version": "1.10.4",
"resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.4.tgz",
@@ -24340,11 +24312,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
- "uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
- },
"v8-compile-cache": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
diff --git a/gui/package.json b/gui/package.json
index 4519fe7779..779740512d 100644
--- a/gui/package.json
+++ b/gui/package.json
@@ -26,8 +26,7 @@
"react-simple-maps": "^2.1.2",
"redux": "^4.0.5",
"sprintf-js": "^1.1.2",
- "styled-components": "^5.1.1",
- "uuid": "^3.0.1"
+ "styled-components": "^5.1.1"
},
"optionalDependencies": {
"grpc-tools": "^1.10.0",
@@ -54,7 +53,6 @@
"@types/sprintf-js": "^1.1.2",
"@types/styled-components": "^5.1.4",
"@types/topojson-specification": "^1.0.1",
- "@types/uuid": "^3.4.4",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"browserify": "^17.0.0",
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 8c0a003074..741fd2b62d 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -1,4 +1,5 @@
import { exec, execFile } from 'child_process';
+import { randomUUID } from 'crypto';
import {
app,
BrowserWindow,
@@ -15,7 +16,6 @@ import os from 'os';
import * as path from 'path';
import { sprintf } from 'sprintf-js';
import util from 'util';
-import * as uuid from 'uuid';
import config from '../config.json';
import { closeToExpiry, hasExpired } from '../shared/account-expiry';
import { IApplication } from '../shared/application-types';
@@ -1289,7 +1289,7 @@ class ApplicationMain {
});
IpcMainEventChannel.problemReport.handleCollectLogs((toRedact) => {
- const id = uuid.v4();
+ const id = randomUUID();
const reportPath = this.getProblemReportPath(id);
const executable = resolveBin('mullvad-problem-report');
const args = ['collect', '--output', reportPath];