From 0bc31e62c8524cb27040ed5835a73211f0353d33 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 4 Mar 2024 22:02:27 -0800 Subject: [PATCH] [Dev Deps] update `aud`, `tape` --- .github/workflows/node-aught.yml | 2 +- .github/workflows/node-tens.yml | 2 +- package.json | 6 ++++-- test/create-hash.js | 2 +- test/create-hmac.js | 2 +- test/node/dh.js | 4 ++-- test/random-bytes.js | 3 ++- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/node-aught.yml b/.github/workflows/node-aught.yml index 8c956b7..d6fed62 100644 --- a/.github/workflows/node-aught.yml +++ b/.github/workflows/node-aught.yml @@ -16,4 +16,4 @@ jobs: needs: [tests] runs-on: ubuntu-latest steps: - - run: 'echo tests completed' + - run: true diff --git a/.github/workflows/node-tens.yml b/.github/workflows/node-tens.yml index b49ceb1..70f55da 100644 --- a/.github/workflows/node-tens.yml +++ b/.github/workflows/node-tens.yml @@ -15,4 +15,4 @@ jobs: needs: [tests] runs-on: ubuntu-latest steps: - - run: 'echo tests completed' + - run: true diff --git a/package.json b/package.json index b14671b..19b7aa1 100644 --- a/package.json +++ b/package.json @@ -37,12 +37,14 @@ }, "devDependencies": { "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", + "aud": "^2.0.4", "eslint": "=8.8.0", "hash-test-vectors": "^1.3.2", + "object.entries": "^1.1.7", "pseudorandombytes": "^2.0.0", "safe-buffer": "^5.2.1", - "tape": "^5.7.2", + "semver": "^6.3.1", + "tape": "^5.7.5", "zuul": "^3.12.0" }, "browser": { diff --git a/test/create-hash.js b/test/create-hash.js index e3f0346..dac0ef8 100644 --- a/test/create-hash.js +++ b/test/create-hash.js @@ -1,7 +1,7 @@ 'use strict'; var test = require('tape'); -var satisfies = require('semver/functions/satisfies'); +var satisfies = require('semver').satisfies; var algorithms = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160']; var encodings = ['hex', 'base64']; // FIXME: test binary diff --git a/test/create-hmac.js b/test/create-hmac.js index 6bb14d9..ec81df9 100644 --- a/test/create-hmac.js +++ b/test/create-hmac.js @@ -1,7 +1,7 @@ 'use strict'; var test = require('tape'); -var satisfies = require('semver/functions/satisfies'); +var satisfies = require('semver').satisfies; var algorithms = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160']; var vectors = require('hash-test-vectors/hmac'); diff --git a/test/node/dh.js b/test/node/dh.js index 6f7e75d..ae8f7d7 100644 --- a/test/node/dh.js +++ b/test/node/dh.js @@ -3,7 +3,7 @@ var test = require('tape'); var cryptoB = require('../../'); var crypto = require('crypto'); -var semverSatisfies = require('semver/functions/satisfies'); +var satisfies = require('semver').satisfies; test('diffie-hellman mod groups', function (t) { [ @@ -44,7 +44,7 @@ test('diffie-hellman key lengths', function (t) { 512, 1024 ].forEach(function (len) { - var modulusTooSmall = semverSatisfies(process.version, '>= 17') && len < 512; + var modulusTooSmall = satisfies(process.version, '>= 17') && len < 512; t.test(String(len), { skip: modulusTooSmall && 'node 17+ requires a length >= 512' }, function (st) { var dh2 = cryptoB.createDiffieHellman(len); var prime2 = dh2.getPrime(); diff --git a/test/random-bytes.js b/test/random-bytes.js index 9c1a61a..47f7535 100644 --- a/test/random-bytes.js +++ b/test/random-bytes.js @@ -3,6 +3,7 @@ var test = require('tape'); var crypto = require('../'); var randomBytes = require('randombytes'); +var entries = require('object.entries'); var randomBytesFunctions = { randomBytes: randomBytes, @@ -10,7 +11,7 @@ var randomBytesFunctions = { }; // Both randomBytes and pseudoRandomBytes should provide the same interface -Object.entries(randomBytesFunctions).forEach(function (entry) { +entries(randomBytesFunctions).forEach(function (entry) { var randomBytesName = entry[0]; var randomBytesFn = entry[1];