From c2fd82a0f76acc483912f76782412a92f4c3629d Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 18 May 2024 23:04:54 +0200 Subject: [PATCH] test, bench: prefix imports of built-in modules --- benchmark/ml-dsa.js | 2 +- benchmark/ml-kem.js | 4 ++-- benchmark/slh-dsa.js | 2 +- test/index.js | 2 +- test/ml-dsa.test.js | 2 +- test/slh-kem.test.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmark/ml-dsa.js b/benchmark/ml-dsa.js index 0cd0c89..fe8e66c 100644 --- a/benchmark/ml-dsa.js +++ b/benchmark/ml-dsa.js @@ -186,7 +186,7 @@ export async function main() { } // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { main(); } diff --git a/benchmark/ml-kem.js b/benchmark/ml-kem.js index 8499a4f..f7a5089 100644 --- a/benchmark/ml-kem.js +++ b/benchmark/ml-kem.js @@ -200,7 +200,7 @@ export async function main() { } // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { main(); -} \ No newline at end of file +} diff --git a/benchmark/slh-dsa.js b/benchmark/slh-dsa.js index 7531edc..ef13129 100644 --- a/benchmark/slh-dsa.js +++ b/benchmark/slh-dsa.js @@ -99,7 +99,7 @@ export async function main() { } // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { main(); } diff --git a/test/index.js b/test/index.js index a9f1f45..79ad51b 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ import './ml-dsa.test.js'; import './big.test.js'; // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { //should.runParallel(); // 43 seconds should.run(); // 176 seconds diff --git a/test/ml-dsa.test.js b/test/ml-dsa.test.js index 227c906..e9f39f8 100644 --- a/test/ml-dsa.test.js +++ b/test/ml-dsa.test.js @@ -144,7 +144,7 @@ describe('ML-DSA Dilithium', () => { }); // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { should.run(); } diff --git a/test/slh-kem.test.js b/test/slh-kem.test.js index 9bd5396..46d090f 100644 --- a/test/slh-kem.test.js +++ b/test/slh-kem.test.js @@ -197,7 +197,7 @@ describe('SLH-DSA SPHINCS', () => { }); // ESM is broken. -import url from 'url'; +import url from 'node:url'; if (import.meta.url === url.pathToFileURL(process.argv[1]).href) { should.run(); }