Skip to content

Commit 2150f2c

Browse files
authored
Merge pull request #3 from sketchdev/package-updates-202102
Dependency Updates
2 parents 10337cd + a4dc548 commit 2150f2c

File tree

4 files changed

+1635
-1971
lines changed

4 files changed

+1635
-1971
lines changed

lib/users/common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const moment = require('moment');
2-
const uuid = require('uuid/v4');
2+
const uuid = require('uuid');
33
const _ = require('lodash');
44
const crypto = require('crypto');
55
const util = require('util');
@@ -41,13 +41,13 @@ exports.buildEmail = (req, type, to, defaultSubject, defaultBody, tokens) => {
4141

4242
exports.buildEmailCodeWithExpiry = (name, expireDuration = 1, expireUnit = 'hour') => {
4343
const result = {};
44-
result[`${name}Code`] = uuid();
44+
result[`${name}Code`] = uuid.v4();
4545
result[`${name}ExpiresAt`] = moment().add(expireDuration, expireUnit).toDate();
4646
return result;
4747
};
4848

4949
exports.randomPassword = () => {
50-
return uuid();
50+
return uuid.v4();
5151
};
5252

5353
exports.hashPassword = async (doc, password) => {

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"main": "wrestler.js",
1212
"scripts": {
13-
"test": "yarn test-nedb && yarn test-mongo && yarn test-pg",
13+
"test": "yarn test-nedb && yarn test-pg && yarn test-mongo",
1414
"test-nedb": "NODE_ENV=test nyc mocha --recursive --exit --slow 150",
1515
"test-mongo": "NODE_ENV=test MONGO_DB_URI=mongodb://localhost:27017/wrestler MONGO_DB_NAME=wrestler nyc mocha --recursive --exit --slow 150",
1616
"test-pg": "NODE_ENV=test PG_CONNECTION_STRING=postgresql://localhost:5432/wrestler nyc mocha --recursive --exit --slow 150",
@@ -28,30 +28,29 @@
2828
},
2929
"license": "MIT",
3030
"dependencies": {
31-
"express-validator": "^5.3.0",
32-
"jsonwebtoken": "8.3.0",
33-
"knex": "0.15.2",
34-
"lodash": "4.17.10",
35-
"moment": "2.22.2",
31+
"express-validator": "^6.9.2",
32+
"jsonwebtoken": "8.5.1",
33+
"knex": "^0.21.17",
34+
"lodash": "^4.17.20",
35+
"moment": "^2.29.1",
3636
"mongodb": "^3.1.1",
3737
"nedb": "^1.8.0",
38-
"nodemailer": "4.6.8",
39-
"pg": "7.4.3",
40-
"uuid": "3.3.2",
41-
"validator": "^10.5.0"
38+
"nodemailer": "^6.4.17",
39+
"pg": "8.5.1",
40+
"uuid": "^8.3.2",
41+
"validator": "^13.5.2"
4242
},
4343
"devDependencies": {
4444
"chai": "^4.1.2",
45-
"coveralls": "3.0.2",
46-
"db-migrate": "0.11.4",
47-
"db-migrate-pg": "0.4.0",
48-
"dotenv": "^6.0.0",
49-
"eslint": "5.8.0",
45+
"coveralls": "3.1.0",
46+
"db-migrate": "0.11.12",
47+
"db-migrate-pg": "1.2.2",
48+
"dotenv": "^8.2.0",
5049
"express": "^4.16.3",
51-
"mocha": "^5.2.0",
50+
"mocha": "^8.2.1",
5251
"morgan": "^1.9.0",
53-
"nyc": "12.0.2",
54-
"sinon": "6.1.5",
55-
"supertest": "^3.1.0"
52+
"nyc": "^15.1.0",
53+
"sinon": "9.2.4",
54+
"supertest": "6.1.3"
5655
}
5756
}

test/setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const express = require('express');
22
const Wrestler = require('../wrestler');
33
const supertest = require('supertest');
44
const nodemailer = require('nodemailer');
5-
const uuid = require('uuid/v4');
5+
const uuid = require('uuid');
66
const _ = require('lodash');
77
const moment = require('moment');
88
const common = require('../lib/users/common');
@@ -177,7 +177,7 @@ class WrestlerTester {
177177
class WrestlerTesterBuilder {
178178

179179
constructor(options = {}) {
180-
const transport = { name: 'wrestler', version: '1', send: (mail, callback) => callback(null, { envelope: {}, messageId: uuid() }) };
180+
const transport = { name: 'wrestler', version: '1', send: (mail, callback) => callback(null, { envelope: {}, messageId: uuid.v4() }) };
181181
const transporter = nodemailer.createTransport(transport);
182182
this.options = Object.assign({}, { email: { transporter } }, options);
183183
this.users = [];

0 commit comments

Comments
 (0)