Add nope-id to benchmark (#591)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Add nope-id to benchmark * Run benchmarks on PRs * Update nope-id * Typo
authored by Andrey Sitnik · committed by GitHub · parent ecd9b6a · Browse files · 6 files·+46 added−23 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+46 added−23 removed
- tests:+4 added−0 removed
- other:+42 added−23 removed
Provenance
- Commit
e7d205b- Tree
b5d26f0- Author
Andrey Sitnik <andrey@sitnik.ru>- Committer
GitHub <noreply@github.com>- Parent
ecd9b6a
6 files changed+46 added−23 removed
added:.github/workflows/benchmark.yml+28 added
12345678910111213141516171819202122232425262728name: Benchmarkon: push: tags: - '*' pull_request:permissions: contents: readjobs: benchmark: name: Benchmark runs-on: ubuntu-latest steps: - name: Checkout the repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install pnpm uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 with: version: 11 - name: Install Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 26 cache: pnpm - name: Install dependencies run: pnpm install --ignore-scripts - name: Run benchmark run: node ./test/benchmark.jsmodified:.github/workflows/release.yml+2 added-23 removed
12345678910111211121314151624 unmodified lines41424344454647484950515253545556575859606162636465name: Releaseon: push: tags: - '*'permissions: contents: writejobs: release: name: Release On Tag if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout the repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Extract the changelog24 unmodified lines name: ${{ github.ref_name }} body: '${{ steps.changelog.outputs.changelog_content }}' draft: false prerelease: false benchmark: name: Benchmark runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout the repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install pnpm uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 with: version: 10 - name: Install Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 cache: pnpm - name: Install dependencies run: pnpm install --ignore-scripts - name: Run benchmark run: node ./test/benchmark.jsmodified:test/benchmark.js+4 added
2 unmodified lines3456789101124 unmodified lines363738394041424344454642 unmodified lines2 unmodified linesimport { v4 as lukeed4 } from '@lukeed/uuid'import { v4 as napiV4 } from '@napi-rs/uuid'import crypto from 'node:crypto'import { styleText } from 'node:util'import { nopeid } from 'nope-id'import rndm from 'rndm'import srs from 'secure-random-string'import { Bench } from 'tinybench'import { uid } from 'uid'24 unmodified lines }) .add('@lukeed/uuid', () => { lukeed4() }) .add('nope-id', () => { nopeid() }) .add('nanoid', () => { nanoid() }) .add('customAlphabet', () => {42 unmodified linesmodified:package.json+1 added
59 unmodified lines60 "actions-up": "^1.14.2",61 "better-node-test": "^0.8.4",62 "clean-publish": "^7.1.0",63 "eslint-plugin-prefer-let": "^4.2.2",64+ "nope-id": "^1.1.0",65 "oxlint": "^1.66.0",66 "oxlint-tsgolint": "^0.23.0",67 "rndm": "^1.2.0",68 "secure-random-string": "^1.1.4",50 unmodified linesmodified:pnpm-lock.yaml+9 added
36 unmodified lines37 version: 7.1.038 eslint-plugin-prefer-let:39 specifier: ^4.2.240 version: 4.2.241+ nope-id:42+ specifier: ^1.1.043+ version: 1.1.044 oxlint:45 specifier: ^1.66.046 version: 1.66.0(oxlint-tsgolint@0.23.0)47 oxlint-tsgolint:873 unmodified lines921 node-releases@2.0.45:922 resolution: {integrity: sha512-iIbHXV9eBB2nB0wa7oTsrrXq+qQt+9SIlx9AX3T96YgobtEQfis5n6TJ6vV+3QP8DwdriEAcGhARaFCu37peBg==}923 engines: {node: '>=18'}924 925+ nope-id@1.1.0:926+ resolution: {integrity: sha512-H4I2/pJS8c+MA1alHEet9di6TD+ELEhPfnhV01cNFT2n4KeUIusnRh2D9PHD63tUhlBFzLD9XrsgD6cBHvp/9Q==}927+ engines: {node: '>=16.0.0'}928+929 oxlint-tsgolint@0.23.0:930 resolution: {integrity: sha512-3mBv3CoPbh8dFbzfDGIWa2ytZjn2v+3EX4aKRXjIhsoGFzG8GCjfRirz3rwZf1wYbZzsNLTSgpw8VjQuWdp/jA==}931 hasBin: true932 927 unmodified lines1860 neo-async@2.6.2: {}1861 1862 node-releases@2.0.45: {}1863 1864+ nope-id@1.1.0: {}1865+1866 oxlint-tsgolint@0.23.0:1867 optionalDependencies:1868 '@oxlint-tsgolint/darwin-arm64': 0.23.01869 '@oxlint-tsgolint/darwin-x64': 0.23.0218 unmodified linesmodified:pnpm-workspace.yaml+2 added
1234allowBuilds: simple-git-hooks: trueminimumReleaseAgeExclude: - nope-id