Skip to content

Commit

Permalink
Merge pull request #153 from ctavan/use-v4-instead-of-v1-uuids
Browse files Browse the repository at this point in the history
Use v4 instead of v1 uuids
  • Loading branch information
ejfox authored Sep 8, 2020
2 parents dc0f0ea + 65863b5 commit 3a999e0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions electron/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const {app, BrowserWindow, Menu, ipcMain} = require("electron");
// Module to control application life.
// Module to create native browser window.
var defaultMenu = require("electron-default-menu");
var uuid = require("uuid");
var uuidV4 = require("uuid/v4");
// We can listen to messages from the renderer here:
var fs = require("fs");

Expand Down Expand Up @@ -126,7 +126,7 @@ function createWindow() {
var filename = test.filename;
if(!filename) {
// we need to create a filename
filename = uuid.v1();
filename = uuidV4();
}
fs.writeFile(savedTestsStorage + "/" + filename, JSON.stringify(test));
});
Expand Down
6 changes: 3 additions & 3 deletions electron/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var ipc = require("electron").ipcRenderer;
// libraries required to run test inline
// var requireFromString = require("require-from-string");
var DataprooferTest = require("dataproofertest-js");
var uuid = require("uuid");
var uuidV4 = require("uuid/v4");

console.log("dataproofer app version", require("./package.json").version);
console.log("dataproofer lib version", require("dataproofer").version);
Expand Down Expand Up @@ -84,7 +84,7 @@ function duplicateTest(test) {
var newTest = {
name: test.name() + " copy",
description: test.description(),
filename: uuid.v1(),
filename: uuidV4(),
local: true,
active: true,
methodology: test._methodology.toString()
Expand Down Expand Up @@ -689,7 +689,7 @@ function renderTestEditor(test) {
// saving without passing in the filename will inform the server
// to generate a new filename
/*
var newTestFile = save(uuid.v1());
var newTestFile = save(uuidV4());
var newTest = loadTest(newTestFile);
SUITES[0].tests.push(newTest); // assuming the first suite is always local
renderCurrentStep(); // we should only be here on step 2
Expand Down
11 changes: 8 additions & 3 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"simple-statistics": "^1.0.1",
"tipsy": "^1.0.0",
"tipsy-browserify": "^1.0.0",
"uuid": "^2.0.1"
"uuid": "^3.3.2"
},
"devDependencies": {
"babel-eslint": "^6.0.2",
Expand Down

0 comments on commit 3a999e0

Please sign in to comment.