From acc1e4ca8dbb1b322360c6a8d2381073bda30538 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 22 Jul 2020 10:11:48 -0500 Subject: [PATCH] remove uuid --- package.json | 3 +-- test/client.test.js | 3 +-- test/laundry.test.js | 3 +-- test/utils.js | 9 +++++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index eefe056..f58ad87 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "husky": "^4.2.5", "snazzy": "^8.0.0", "standard": "^14.0.2", - "tap": "14.10.1", - "uuid": "^3.3.3" + "tap": "14.10.1" }, "scripts": { "test": "tap --no-cov", diff --git a/test/client.test.js b/test/client.test.js index eed6c39..fca862f 100644 --- a/test/client.test.js +++ b/test/client.test.js @@ -3,10 +3,9 @@ const util = require('util') const assert = require('assert') const tap = require('tap') -const uuid = require('uuid') const vasync = require('vasync') const getPort = require('get-port') -const { getSock } = require('./utils') +const { getSock, uuid } = require('./utils') const ldap = require('../lib') const { Attribute, Change } = ldap diff --git a/test/laundry.test.js b/test/laundry.test.js index 796e48c..1c03b6e 100644 --- a/test/laundry.test.js +++ b/test/laundry.test.js @@ -1,8 +1,7 @@ 'use strict' const tap = require('tap') -const uuid = require('uuid') -const { getSock } = require('./utils') +const { getSock, uuid } = require('./utils') const ldap = require('../lib') function search (t, options, callback) { diff --git a/test/utils.js b/test/utils.js index 6d5598b..aea3ea4 100644 --- a/test/utils.js +++ b/test/utils.js @@ -2,7 +2,11 @@ const os = require('os') const path = require('path') -const uuid = require('uuid') +const crypto = require('crypto') + +function uuid () { + return crypto.randomBytes(16).toString('hex') +} function getSock () { if (process.platform === 'win32') { @@ -13,5 +17,6 @@ function getSock () { } module.exports = { - getSock + getSock, + uuid }