Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerun-bench #27

Merged
merged 7 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable pnpm
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
node-version: 18.13
cache: "pnpm"
- run: pnpm install
- run: pnpm test:coverage
- run: pnpm test:report
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable pnpm

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache: "pnpm"
node-version: 20
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
- run: pnpm install
- run: pnpm build
- name: Setup Biome
Expand All @@ -29,4 +27,4 @@ jobs:
run: biome ci .
- run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<img src="logo.png" width="400px" />
<br /><br />

[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url] [![Github actions][gh-actions-img]][github-actions] [![Downloads][dl-badge-url]][npm-url]
[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url]
[![Github actions][gh-actions-img]][github-actions]
[![Downloads][dl-badge-url]][npm-url]

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

## Install

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

### What is "parsec"?

The parsec is a unit of length used to measure large distances to astronomical objects outside the Solar System.
The parsec is a unit of length used to measure large distances to astronomical
objects outside the Solar System.

[v-badge-url]: https://img.shields.io/npm/v/milliparsec.svg?style=for-the-badge&color=25608B&logo=npm&label=
[npm-url]: https://www.npmjs.com/package/milliparsec
Expand Down
118 changes: 63 additions & 55 deletions bench/index.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"devDependencies": {
"@types/body-parser": "^1.19.5",
"@types/formidable": "^3.4.5",
"autocannon": "^7.15.0",
"body-parser": "^1.20.2"
"autocannon": "^8.0.0",
"body-parser": "^1.20.3"
},
"dependencies": {
"formidable": "^3.5.1"
"formidable": "^3.5.2"
}
}
62 changes: 31 additions & 31 deletions bench/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"body-parsing"
],
"engines": {
"node": ">=20"
"node": ">=18.13 || >=19.20 || >=20"
},
"exports": "./dist/index.js",
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@tinyhttp/app": "^2.4.0",
"@types/node": "^22.7.4",
"@types/node": "^18.19.76",
"c8": "10.1.2",
"supertest-fetch": "^2.0.0",
"tsx": "^4.19.1",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer } from 'node:buffer'
import { Buffer, File } from 'node:buffer'
import type { IncomingMessage, ServerResponse as Response } from 'node:http'

type NextFunction = (err?: any) => void
Expand Down
Loading