diff --git a/lib/schema.js b/lib/schema.js index 66183ae..c7d9c33 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -1,7 +1,8 @@ 'use strict'; var Joi = require('joi'), - nodeUUID = require('node-uuid'), + uuidv4 = require('uuid/v4'), + uuidv1 = require('uuid/v1'), _ = require('lodash'); var internals = {}; @@ -166,14 +167,14 @@ Schema.types.binarySet = function () { Schema.types.uuid = function () { return Joi.string().guid({version : 'uuidv4'}).default(function () { - return nodeUUID.v4(); - }, 'nodeUUID.v4()'); + return uuidv4(); + }, 'uuidv4()'); }; Schema.types.timeUUID = function () { return Joi.string().guid({version : 'uuidv1'}).default(function () { - return nodeUUID.v4(); - }, 'nodeUUID.v1()'); + return uuidv1(); + }, 'uuidv1()'); }; Schema.prototype.validate = function (params, options) { diff --git a/package-lock.json b/package-lock.json index dc26884..8f4deab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "dynamodb", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1470,11 +1470,6 @@ } } }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=" - }, "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", @@ -1550,6 +1545,11 @@ "punycode": "1.3.2", "querystring": "0.2.0" } + }, + "uuid": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", + "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==" } } } diff --git a/package.json b/package.json index 0d12e9a..aa01d81 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "bunyan": "1.5.x", "joi": "10.6.x", "lodash": "4.x.x", - "node-uuid": "1.4.x" + "uuid": "^3.3.0" }, "devDependencies": { "chai": "1.x.x", diff --git a/test/integration/integration-test.js b/test/integration/integration-test.js index 4f16bd2..fe0ffb3 100644 --- a/test/integration/integration-test.js +++ b/test/integration/integration-test.js @@ -6,7 +6,7 @@ var dynamo = require('../../index'), async = require('async'), _ = require('lodash'), helper = require('../test-helper'), - uuid = require('node-uuid'), + uuidv4 = require('uuid/v4'), Joi = require('joi'); chai.should(); @@ -76,7 +76,7 @@ describe('DynamoDB Integration Tests', function() { before(function (done) { function generateId () { - return uuid.v4(); + return uuidv4(); } dynamo.dynamoDriver(helper.realDynamoDB());