diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 319ccfd4..1136720e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,4 +93,4 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile --ignore-scripts - name: Run benchmark - run: pnpm run benchmark + run: node ./test/benchmark.js diff --git a/package.json b/package.json index 52153417..3b79c08f 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "clean": "rm -R coverage", "unit": "uvu . .test.js$", "test": "c8 pnpm unit && eslint . && pnpm clean && size-limit", - "start": "vite test/demo/ --open", - "benchmark": "node ./test/benchmark.js" + "start": "vite test/demo/ --open" }, "engines": { "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" @@ -36,7 +35,6 @@ "@babel/core": "^7.17.2", "@logux/eslint-config": "^46.1.1", "@lukeed/uuid": "^2.0.0", - "@napi-rs/uuid": "^0.2.0", "@originjs/vite-plugin-commonjs": "^1.0.2", "@size-limit/dual-publish": "^7.0.8", "@size-limit/file": "^7.0.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f758b6dc..4ef8b87c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,6 @@ specifiers: '@babel/core': ^7.17.2 '@logux/eslint-config': ^46.1.1 '@lukeed/uuid': ^2.0.0 - '@napi-rs/uuid': ^0.2.0 '@originjs/vite-plugin-commonjs': ^1.0.2 '@size-limit/dual-publish': ^7.0.8 '@size-limit/file': ^7.0.8 @@ -38,7 +37,6 @@ devDependencies: '@babel/core': 7.17.2 '@logux/eslint-config': 46.1.1_cd7f45d1cba51a736d2df3e99513a1a4 '@lukeed/uuid': 2.0.0 - '@napi-rs/uuid': 0.2.0 '@originjs/vite-plugin-commonjs': 1.0.2 '@size-limit/dual-publish': 7.0.8_24c433b8572c6d8a3a69f812fcb06aa8 '@size-limit/file': 7.0.8_size-limit@7.0.8 @@ -360,132 +358,6 @@ packages: '@lukeed/csprng': 1.0.1 dev: true - /@napi-rs/uuid-android-arm-eabi/0.2.0: - resolution: {integrity: sha512-oXrdam4nPEAIbVarDgCjCgUcfS/zO1yPBJkrQmbww5VtWi4z5qpfXJIDkS9oKWHE0gnjNXsG4wDokdl7BpcrUA==} - engines: {node: '>= 10'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-android-arm64/0.2.0: - resolution: {integrity: sha512-UppZr5o/ZyNAhj5koB60UqGPKkvt/J6tzULhdXHzXl02+BC3WACu63vNBhxMYIaq6ptKzy98yXEUk+txaZkdIg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-darwin-arm64/0.2.0: - resolution: {integrity: sha512-Zzflpi2y8ngiNplORAhRYt/aQeGBTa+n3AGz4NbkKsQH6+gB15/yaeJne1Q34yRmpveOyFffYjgdEvFiu7Kz4w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-darwin-x64/0.2.0: - resolution: {integrity: sha512-S1JZZXL4bxN/CocZIxnHTYCgzxJK+ySFzWCqFLov7z1vAIFVwhP19otgkDIdoEEHGq5e9f09isLbynGZXx+EMw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-freebsd-x64/0.2.0: - resolution: {integrity: sha512-ovshM+VJ+XXEcmEu0UeLhKFLVL8+vzDyUKgMBJI+nj2ptDycypqsKsRKVfgL5QViKrU36h19wMxc2bu3R2tb0w==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-linux-arm-gnueabihf/0.2.0: - resolution: {integrity: sha512-tuHEN7UWAxJ0aVihbdb3GjehFebx4V/EHLJ8o+laXKZzGLd9RiajG4mkjkZwVEimvIBXpXsvuEWFqtnqzoKvnA==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-linux-arm64-gnu/0.2.0: - resolution: {integrity: sha512-ko1hT+OVBUnem49YoiyFoXQ6e6zmXPUscSMkg5IBDA70NzbDL11pGrVSGuIzz7Zzt4z+3bE0CI2EaRIZ92NW9g==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-linux-arm64-musl/0.2.0: - resolution: {integrity: sha512-r9KIhJz+hzcPulcdRCnioouZMdRPRnLy0dbfkYiw0mOkt9kfbVXpRzbt7xz8B/Zf/d5LEWZsIFJHbiKxuIfPSA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-linux-x64-gnu/0.2.0: - resolution: {integrity: sha512-iX+WBrBv5sjO690/zjuWvf7tt9/Jge+Qkrogh/es5u8+EMXSGTl9gW7PajL8pnNzDcdkVNgr41VrqmVGWzLFVw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-linux-x64-musl/0.2.0: - resolution: {integrity: sha512-ekDiT4iKKR8Vzop7JXxLpmRp4fHmGZYiOImN69DX+5nJUewwwLbIR7784qNBRUHJi7tzIhAM+5TfO3rmGTkmgw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-win32-arm64-msvc/0.2.0: - resolution: {integrity: sha512-zgq38ZQazk8bijAosK3SgJcUxpp3u8UOkNbUswsXPjurb3tLcM9HP5e79ujaHsUogFdN87l7fh/kXzHNEvwEsA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid-win32-x64-msvc/0.2.0: - resolution: {integrity: sha512-SJ79IKI6BpmRxixUHGhCjOZ8TwXv3pfJJ8WxQvbcU8HMrfv+lW4X8/iq3eZ8tCu6Pb6KxPh92B4FQ3XJnHL+GA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@napi-rs/uuid/0.2.0: - resolution: {integrity: sha512-iwoDZeVB1W1dOkWvTTMIrDejySBF9hPgDUG/bJbKmLKruSCVjbJPFcDJtiRX6OD1qy7ObxtUrn8ofwcnRC/hJg==} - engines: {node: '>= 10'} - optionalDependencies: - '@napi-rs/uuid-android-arm-eabi': 0.2.0 - '@napi-rs/uuid-android-arm64': 0.2.0 - '@napi-rs/uuid-darwin-arm64': 0.2.0 - '@napi-rs/uuid-darwin-x64': 0.2.0 - '@napi-rs/uuid-freebsd-x64': 0.2.0 - '@napi-rs/uuid-linux-arm-gnueabihf': 0.2.0 - '@napi-rs/uuid-linux-arm64-gnu': 0.2.0 - '@napi-rs/uuid-linux-arm64-musl': 0.2.0 - '@napi-rs/uuid-linux-x64-gnu': 0.2.0 - '@napi-rs/uuid-linux-x64-musl': 0.2.0 - '@napi-rs/uuid-win32-arm64-msvc': 0.2.0 - '@napi-rs/uuid-win32-x64-msvc': 0.2.0 - dev: true - /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} diff --git a/test/benchmark.js b/test/benchmark.js index 5779bb54..9a89109f 100755 --- a/test/benchmark.js +++ b/test/benchmark.js @@ -2,7 +2,6 @@ let { uid: uidSecure } = require('uid/secure') let { v4: lukeed4 } = require('@lukeed/uuid') -let { v4: napiv4 } = require('@napi-rs/uuid') let { v4: uuid4 } = require('uuid') let benchmark = require('benchmark') let shortid = require('shortid') @@ -33,9 +32,6 @@ suite .add('crypto.randomUUID', () => { crypto.randomUUID() }) - .add('@napi-rs/uuid', () => { - napiv4() - }) .add('uid/secure', () => { uidSecure(32) })