Skip to content

Commit

Permalink
refactor: deno 2.x.x support
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Sep 29, 2024
1 parent b386e8a commit fd39123
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ deno add @poolifier/tatami-ng

Deno versions >= 1.40.x are supported.

The `--allow-hrtime` permission flag is recommended to allow high-resolution time measurement.
The `--allow-hrtime` permission flag is recommended to allow high-resolution time measurement with Deno v1.x.x.

### Bun

Expand Down Expand Up @@ -155,7 +155,7 @@ npm install tatami-ng -g
### Deno

```shell
deno install -g --allow-read --allow-run --allow-sys --allow-hrtime -n tatami npm:tatami-ng
deno install -g --allow-read --allow-run --allow-sys -n tatami npm:tatami-ng
```

### Bun
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"bundle": "bun bundle.ts",
"test": "run-s test:*",
"test:node": "node tests/test.js",
"test:deno": "deno run --allow-sys --allow-hrtime tests/test.js && deno run --allow-sys --allow-hrtime tests/test.ts",
"test:deno": "deno run --allow-sys tests/test.js && deno run --allow-sys tests/test.ts",
"test:bun": "bun tests/test.js && bun tests/test.ts",
"build:cli": "run-s build:cli:*",
"build:cli:node": "npx --yes rimraf ./dist/node/tatami && npx --yes mkdirp ./dist/node && node --experimental-sea-config sea-config.json && npx --yes ncp $(volta which node || n which lts || nvm which node || command -v node) ./dist/node/tatami && npx --yes postject ./dist/node/tatami NODE_SEA_BLOB ./dist/node/tatami.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 && npx --yes rimraf ./dist/node/tatami.blob",
"build:cli:deno": "deno run --allow-env --allow-read --allow-write npm:rimraf tatami && deno compile --allow-read --allow-run --allow-sys --allow-hrtime --output=./dist/deno/tatami ./cli.js",
"build:cli:deno": "deno run --allow-env --allow-read --allow-write npm:rimraf tatami && deno compile --allow-read --allow-run --allow-sys --output=./dist/deno/tatami ./cli.js",
"build:cli:bun": "bunx rimraf ./dist/bun/tatami && bun build --compile --minify --sourcemap ./cli.js --outfile ./dist/bun/tatami"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bench('noop', () => {}, {
after: () => {},
})
bench('async noop', async () => {})
baseline('aaa', () => {})
baseline('baseline noop', () => {})
bench('async noop2', async () => Promise.resolve())
bench('error', () => {
throw new Error('error')
Expand All @@ -20,7 +20,7 @@ group(() => {
})

group('group', () => {
baseline('baseline', () => {})
baseline('baseline noop', () => {})
bench('Date.now()', () => {
Date.now()
})
Expand Down
4 changes: 2 additions & 2 deletions tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bench('noop', () => {}, {
after: () => {},
})
bench('async noop', async () => {})
baseline('aaa', () => {})
baseline('baseline noop', () => {})
bench('async noop2', async () => Promise.resolve())
bench('error', () => {
throw new Error('error')
Expand All @@ -20,7 +20,7 @@ group(() => {
})

group('group', () => {
baseline('baseline', () => {})
baseline('baseline noop', () => {})
bench('Date.now()', () => {
Date.now()
})
Expand Down

0 comments on commit fd39123

Please sign in to comment.