Skip to content

Commit f46b7f7

Browse files
Merge pull request #27 from tinyhttp/rerun-bench
Rerun-bench
2 parents eb673a7 + 2738e17 commit f46b7f7

File tree

10 files changed

+131
-122
lines changed

10 files changed

+131
-122
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ jobs:
2323
steps:
2424
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2525
- uses: actions/checkout@v4
26-
- name: Enable corepack
27-
run: corepack enable pnpm
26+
- uses: pnpm/action-setup@v4
2827
- uses: actions/setup-node@v4
2928
with:
30-
node-version: 20
31-
cache: 'pnpm'
29+
node-version: 18.13
30+
cache: "pnpm"
3231
- run: pnpm install
3332
- run: pnpm test:coverage
3433
- run: pnpm test:report

.github/workflows/publish.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ jobs:
1010
id-token: write
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Enable corepack
14-
run: corepack enable pnpm
15-
13+
- uses: pnpm/action-setup@v4
1614
- uses: actions/setup-node@v4
1715
with:
18-
cache: 'pnpm'
16+
cache: "pnpm"
1917
node-version: 20
20-
registry-url: 'https://registry.npmjs.org'
18+
registry-url: "https://registry.npmjs.org"
2119
- run: pnpm install
2220
- run: pnpm build
2321
- name: Setup Biome
@@ -29,4 +27,4 @@ jobs:
2927
run: biome ci .
3028
- run: pnpm publish --no-git-checks
3129
env:
32-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<img src="logo.png" width="400px" />
44
<br /><br />
55

6-
[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url] [![Github actions][gh-actions-img]][github-actions] [![Downloads][dl-badge-url]][npm-url]
6+
[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url]
7+
[![Github actions][gh-actions-img]][github-actions]
8+
[![Downloads][dl-badge-url]][npm-url]
79

810
</div>
911
<br />
@@ -18,7 +20,7 @@ Check out [deno-libs/parsec](https://github.com/deno-libs/parsec) for Deno port.
1820
- 📦 tiny package size (8KB dist size)
1921
- 🔥 no dependencies
2022
-[tinyhttp](https://github.com/tinyhttp/tinyhttp) and Express support
21-
-30% faster than body-parser
23+
-40% faster than body-parser and 20x faster than formidable
2224

2325
## Install
2426

@@ -51,7 +53,8 @@ const server = createServer(async (req: ReqWithBody, res) => {
5153

5254
### What is "parsec"?
5355

54-
The parsec is a unit of length used to measure large distances to astronomical objects outside the Solar System.
56+
The parsec is a unit of length used to measure large distances to astronomical
57+
objects outside the Solar System.
5558

5659
[v-badge-url]: https://img.shields.io/npm/v/milliparsec.svg?style=for-the-badge&color=25608B&logo=npm&label=
5760
[npm-url]: https://www.npmjs.com/package/milliparsec

bench/index.md

Lines changed: 63 additions & 55 deletions
Large diffs are not rendered by default.

bench/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"devDependencies": {
1515
"@types/body-parser": "^1.19.5",
1616
"@types/formidable": "^3.4.5",
17-
"autocannon": "^7.15.0",
18-
"body-parser": "^1.20.2"
17+
"autocannon": "^8.0.0",
18+
"body-parser": "^1.20.3"
1919
},
2020
"dependencies": {
21-
"formidable": "^3.5.1"
21+
"formidable": "^3.5.2"
2222
}
2323
}

bench/pnpm-lock.yaml

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
"body-parsing"
1818
],
1919
"engines": {
20-
"node": ">=20"
20+
"node": ">=18.13 || >=19.20 || >=20"
2121
},
2222
"exports": "./dist/index.js",
2323
"devDependencies": {
2424
"@biomejs/biome": "1.9.3",
2525
"@tinyhttp/app": "^2.4.0",
26-
"@types/node": "^22.7.4",
26+
"@types/node": "^18.19.76",
2727
"c8": "10.1.2",
2828
"supertest-fetch": "^2.0.0",
2929
"tsx": "^4.19.1",

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Buffer } from 'node:buffer'
1+
import { Buffer, File } from 'node:buffer'
22
import type { IncomingMessage, ServerResponse as Response } from 'node:http'
33

44
type NextFunction = (err?: any) => void

0 commit comments

Comments
 (0)