Skip to content

Commit

Permalink
bench: prefix imports of built-in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed May 18, 2024
1 parent df9fa72 commit 9f8455e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchmark/aead.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const ciphers = {
encrypt: (buf, opts) => siv(opts.key, opts.nonce).encrypt(buf),
decrypt: (buf, opts) => siv(opts.key, opts.nonce).decrypt(buf),
},
}
},
};

export async function main() {
Expand All @@ -130,7 +130,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();
}
2 changes: 1 addition & 1 deletion benchmark/aes.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,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();
}
2 changes: 1 addition & 1 deletion benchmark/ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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();
}
2 changes: 1 addition & 1 deletion benchmark/cross_test.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Big', () => {
});

// ESM is broken.
import url from 'url';
import url from 'node:url';

if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
Expand Down
2 changes: 1 addition & 1 deletion benchmark/poly.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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();
}

0 comments on commit 9f8455e

Please sign in to comment.