Skip to content

Commit ffab809

Browse files
committedAug 8, 2023
style: format all repo with prettier
1 parent 383ea43 commit ffab809

File tree

7 files changed

+4172
-1659
lines changed

7 files changed

+4172
-1659
lines changed
 

‎.github/workflows/autofix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: autofix.ci # needed to securely identify the workflow
1+
name: autofix.ci # needed to securely identify the workflow
22

33
on:
44
pull_request:
55
push:
6-
branches: [ "main" ]
6+
branches: ["main"]
77

88
permissions:
99
contents: read
@@ -23,4 +23,4 @@ jobs:
2323
run: pnpm run lint:fix
2424
- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9
2525
with:
26-
commit-message: 'chore: apply automated lint fixes'
26+
commit-message: "chore: apply automated lint fixes"

‎CHANGELOG.md

+46-52
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ All notable changes to this project will be documented in this file. See [standa
3333

3434
- Format with prettier v3 ([da225b9](https://github.com/unjs/h3/commit/da225b9))
3535

36-
### ❤️ Contributors
36+
### ❤️ Contributors
3737

3838
- Pooya Parsa ([@pi0](http://github.com/pi0))
3939
- Daniel Roe <daniel@roe.dev>
@@ -79,7 +79,7 @@ All notable changes to this project will be documented in this file. See [standa
7979
- **proxy:** Remove external request to speedup ([d4f5440](https://github.com/unjs/h3/commit/d4f5440))
8080
- Add evetHandler wrapper ([d351ba9](https://github.com/unjs/h3/commit/d351ba9))
8181

82-
### ❤️ Contributors
82+
### ❤️ Contributors
8383

8484
- Pooya Parsa ([@pi0](http://github.com/pi0))
8585

@@ -96,7 +96,7 @@ All notable changes to this project will be documented in this file. See [standa
9696
- Add `release-rc` script ([98d2fa5](https://github.com/unjs/h3/commit/98d2fa5))
9797
- Fix rc release script ([551987a](https://github.com/unjs/h3/commit/551987a))
9898

99-
### ❤️ Contributors
99+
### ❤️ Contributors
100100

101101
- Pooya Parsa ([@pi0](http://github.com/pi0))
102102

@@ -167,14 +167,14 @@ All notable changes to this project will be documented in this file. See [standa
167167

168168
- Use conventional commits for autofix ([#470](https://github.com/unjs/h3/pull/470))
169169

170-
### ❤️ Contributors
170+
### ❤️ Contributors
171171

172172
- Pooya Parsa ([@pi0](http://github.com/pi0))
173173
- Daniel Roe <daniel@roe.dev>
174174
- Heb ([@Hebilicious](http://github.com/Hebilicious))
175175
- Arkadiusz Sygulski <arkadiusz@sygulski.pl>
176-
- Iain Sproat
177-
- Zhiyuanzmj
176+
- Iain Sproat
177+
- Zhiyuanzmj
178178
- Ngob <ngobenoit@gmail.com>
179179
- Emīls Gulbis ([@emilsgulbis](http://github.com/emilsgulbis))
180180
- Tobias Diez <code@tobiasdiez.com>
@@ -186,26 +186,25 @@ All notable changes to this project will be documented in this file. See [standa
186186

187187
[compare changes](https://github.com/unjs/h3/compare/v1.7.0...v1.7.1)
188188

189-
190189
### 🩹 Fixes
191190

192-
- **fetchWithEvent:** Allow customizing fetch impl type ([#414](https://github.com/unjs/h3/pull/414))
191+
- **fetchWithEvent:** Allow customizing fetch impl type ([#414](https://github.com/unjs/h3/pull/414))
193192

194193
### 💅 Refactors
195194

196-
- Improve `H3Error` ([#415](https://github.com/unjs/h3/pull/415))
195+
- Improve `H3Error` ([#415](https://github.com/unjs/h3/pull/415))
197196

198197
### 📖 Documentation
199198

200-
- Update link to how it works ([3dd2376](https://github.com/unjs/h3/commit/3dd2376))
199+
- Update link to how it works ([3dd2376](https://github.com/unjs/h3/commit/3dd2376))
201200

202201
### 🏡 Chore
203202

204-
- **release:** V1.7.0 ([709708f](https://github.com/unjs/h3/commit/709708f))
205-
- Add codecov.yml ([33f434f](https://github.com/unjs/h3/commit/33f434f))
206-
- Ignore eslint warning ([4c609b2](https://github.com/unjs/h3/commit/4c609b2))
203+
- **release:** V1.7.0 ([709708f](https://github.com/unjs/h3/commit/709708f))
204+
- Add codecov.yml ([33f434f](https://github.com/unjs/h3/commit/33f434f))
205+
- Ignore eslint warning ([4c609b2](https://github.com/unjs/h3/commit/4c609b2))
207206

208-
### ❤️ Contributors
207+
### ❤️ Contributors
209208

210209
- Pooya Parsa ([@pi0](http://github.com/pi0))
211210
- Daniel Roe <daniel@roe.dev>
@@ -215,36 +214,35 @@ All notable changes to this project will be documented in this file. See [standa
215214

216215
[compare changes](https://github.com/unjs/h3/compare/v1.6.6...v1.7.0)
217216

218-
219217
### 🚀 Enhancements
220218

221-
- **proxy:** Support `onResponse` callback ([#368](https://github.com/unjs/h3/pull/368))
222-
- **useSession:** Support custom session id generator ([#390](https://github.com/unjs/h3/pull/390))
223-
- `event.handled` flag ([#410](https://github.com/unjs/h3/pull/410))
219+
- **proxy:** Support `onResponse` callback ([#368](https://github.com/unjs/h3/pull/368))
220+
- **useSession:** Support custom session id generator ([#390](https://github.com/unjs/h3/pull/390))
221+
- `event.handled` flag ([#410](https://github.com/unjs/h3/pull/410))
224222

225223
### 🩹 Fixes
226224

227-
- **types:** Type for get router parameter utils ([#400](https://github.com/unjs/h3/pull/400))
228-
- **proxy:** Split cookie headers properly with native node fetch ([#408](https://github.com/unjs/h3/pull/408))
229-
- **readRawBody:** Handle body as object ([#403](https://github.com/unjs/h3/pull/403))
230-
- **router:** Send 204 with empty string in preemptive mode instead of 404 ([#409](https://github.com/unjs/h3/pull/409))
231-
- **cache, proxy, response:** Avoid sending handled events ([#411](https://github.com/unjs/h3/pull/411))
225+
- **types:** Type for get router parameter utils ([#400](https://github.com/unjs/h3/pull/400))
226+
- **proxy:** Split cookie headers properly with native node fetch ([#408](https://github.com/unjs/h3/pull/408))
227+
- **readRawBody:** Handle body as object ([#403](https://github.com/unjs/h3/pull/403))
228+
- **router:** Send 204 with empty string in preemptive mode instead of 404 ([#409](https://github.com/unjs/h3/pull/409))
229+
- **cache, proxy, response:** Avoid sending handled events ([#411](https://github.com/unjs/h3/pull/411))
232230

233231
### 📖 Documentation
234232

235-
- Add event as first arg for proxyRequest ([3e5f427](https://github.com/unjs/h3/commit/3e5f427))
233+
- Add event as first arg for proxyRequest ([3e5f427](https://github.com/unjs/h3/commit/3e5f427))
236234

237235
### 🏡 Chore
238236

239-
- Update dependencies ([8468b90](https://github.com/unjs/h3/commit/8468b90))
240-
- Lint ([3494084](https://github.com/unjs/h3/commit/3494084))
241-
- Update destr to v2 ([bb59c69](https://github.com/unjs/h3/commit/bb59c69))
237+
- Update dependencies ([8468b90](https://github.com/unjs/h3/commit/8468b90))
238+
- Lint ([3494084](https://github.com/unjs/h3/commit/3494084))
239+
- Update destr to v2 ([bb59c69](https://github.com/unjs/h3/commit/bb59c69))
242240

243-
### ❤️ Contributors
241+
### ❤️ Contributors
244242

245243
- Pooya Parsa ([@pi0](http://github.com/pi0))
246244
- 魔王少年 ([@maou-shonen](http://github.com/maou-shonen))
247-
- Ígor Jacaúna
245+
- Ígor Jacaúna
248246
- Enkot ([@enkot](http://github.com/enkot))
249247
- Cerino Ligutom III ([@zeferinix](http://github.com/zeferinix))
250248
- Sébastien Chopin <seb@nuxtjs.com>
@@ -253,79 +251,75 @@ All notable changes to this project will be documented in this file. See [standa
253251

254252
[compare changes](https://github.com/unjs/h3/compare/v1.6.5...v1.6.6)
255253

256-
257254
### 🩹 Fixes
258255

259-
- **getRequestURL:** Normalize double slashes ([b5d2972](https://github.com/unjs/h3/commit/b5d2972))
260-
- **getRequestURL:** Make `x-forwarded-host` support opt-in ([2fce169](https://github.com/unjs/h3/commit/2fce169))
261-
- **event:** Normalize `event.path` ([981c89f](https://github.com/unjs/h3/commit/981c89f))
256+
- **getRequestURL:** Normalize double slashes ([b5d2972](https://github.com/unjs/h3/commit/b5d2972))
257+
- **getRequestURL:** Make `x-forwarded-host` support opt-in ([2fce169](https://github.com/unjs/h3/commit/2fce169))
258+
- **event:** Normalize `event.path` ([981c89f](https://github.com/unjs/h3/commit/981c89f))
262259

263260
### 🏡 Chore
264261

265-
- Fix eslint issue ([9b968ba](https://github.com/unjs/h3/commit/9b968ba))
266-
- Update dependencies ([b7126b8](https://github.com/unjs/h3/commit/b7126b8))
267-
- Remove unused interface ([aadec3d](https://github.com/unjs/h3/commit/aadec3d))
262+
- Fix eslint issue ([9b968ba](https://github.com/unjs/h3/commit/9b968ba))
263+
- Update dependencies ([b7126b8](https://github.com/unjs/h3/commit/b7126b8))
264+
- Remove unused interface ([aadec3d](https://github.com/unjs/h3/commit/aadec3d))
268265

269266
### ✅ Tests
270267

271-
- Add tests for `getRequestURL` ([d510483](https://github.com/unjs/h3/commit/d510483))
268+
- Add tests for `getRequestURL` ([d510483](https://github.com/unjs/h3/commit/d510483))
272269

273-
### ❤️ Contributors
270+
### ❤️ Contributors
274271

275272
- Pooya Parsa ([@pi0](http://github.com/pi0))
276273

277274
## v1.6.5
278275

279276
[compare changes](https://github.com/unjs/h3/compare/v1.6.4...v1.6.5)
280277

281-
282278
### 🩹 Fixes
283279

284-
- **readRawBody:** Resolve cached promise before normalizing buffer ([2e472e8](https://github.com/unjs/h3/commit/2e472e8))
280+
- **readRawBody:** Resolve cached promise before normalizing buffer ([2e472e8](https://github.com/unjs/h3/commit/2e472e8))
285281

286282
### 🏡 Chore
287283

288-
- Update dependencies ([a6ccd2c](https://github.com/unjs/h3/commit/a6ccd2c))
289-
- Lint ([e437f55](https://github.com/unjs/h3/commit/e437f55))
284+
- Update dependencies ([a6ccd2c](https://github.com/unjs/h3/commit/a6ccd2c))
285+
- Lint ([e437f55](https://github.com/unjs/h3/commit/e437f55))
290286

291-
### ❤️ Contributors
287+
### ❤️ Contributors
292288

293289
- Pooya Parsa ([@pi0](http://github.com/pi0))
294290

295291
## v1.6.4
296292

297293
[compare changes](https://github.com/unjs/h3/compare/v1.6.3...v1.6.4)
298294

299-
300295
### 🩹 Fixes
301296

302-
- **readRawBody:** Always return buffer without encoding ([19d133d](https://github.com/unjs/h3/commit/19d133d))
297+
- **readRawBody:** Always return buffer without encoding ([19d133d](https://github.com/unjs/h3/commit/19d133d))
303298

304-
### ❤️ Contributors
299+
### ❤️ Contributors
305300

306301
- Pooya Parsa ([@pi0](http://github.com/pi0))
307302

308303
## v1.6.3
309304

310305
[compare changes](https://github.com/unjs/h3/compare/v1.6.2...v1.6.3)
311306

312-
313307
### 🩹 Fixes
314308

315-
- **readBody, readRawBody:** Handle raw body as buffer ([#366](https://github.com/unjs/h3/pull/366))
309+
- **readBody, readRawBody:** Handle raw body as buffer ([#366](https://github.com/unjs/h3/pull/366))
316310

317311
### 📖 Documentation
318312

319-
- Missing parentheses ([#362](https://github.com/unjs/h3/pull/362))
313+
- Missing parentheses ([#362](https://github.com/unjs/h3/pull/362))
320314

321315
### 🏡 Chore
322316

323-
- Update changelog ([e199df3](https://github.com/unjs/h3/commit/e199df3))
317+
- Update changelog ([e199df3](https://github.com/unjs/h3/commit/e199df3))
324318

325-
### ❤️ Contributors
319+
### ❤️ Contributors
326320

327321
- Johann Schopplich ([@johannschopplich](http://github.com/johannschopplich))
328-
- Roger!
322+
- Roger!
329323
- Pooya Parsa ([@pi0](http://github.com/pi0))
330324

331325
## v1.6.2

‎README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ import { createApp, eventHandler, toNodeListener } from "h3";
8686
const app = createApp();
8787
app.use(
8888
"/",
89-
eventHandler(() => "Hello world!")
89+
eventHandler(() => "Hello world!"),
9090
);
9191

9292
createServer(toNodeListener(app)).listen(process.env.PORT || 3000);
@@ -101,7 +101,7 @@ import { listen } from "listhen";
101101
const app = createApp();
102102
app.use(
103103
"/",
104-
eventHandler(() => "Hello world!")
104+
eventHandler(() => "Hello world!"),
105105
);
106106

107107
listen(toNodeListener(app));
@@ -121,11 +121,11 @@ const app = createApp();
121121
const router = createRouter()
122122
.get(
123123
"/",
124-
eventHandler(() => "Hello World!")
124+
eventHandler(() => "Hello World!"),
125125
)
126126
.get(
127127
"/hello/:name",
128-
eventHandler((event) => `Hello ${event.context.params.name}!`)
128+
eventHandler((event) => `Hello ${event.context.params.name}!`),
129129
);
130130

131131
app.use(router);
@@ -143,14 +143,14 @@ For using nested routers, see [this example](https://stackblitz.com/edit/github-
143143
// Handle can directly return object or Promise<object> for JSON response
144144
app.use(
145145
"/api",
146-
eventHandler((event) => ({ url: event.node.req.url }))
146+
eventHandler((event) => ({ url: event.node.req.url })),
147147
);
148148

149149
// We can have better matching other than quick prefix match
150150
app.use(
151151
"/odd",
152152
eventHandler(() => "Is odd!"),
153-
{ match: (url) => url.substr(1) % 2 }
153+
{ match: (url) => url.substr(1) % 2 },
154154
);
155155

156156
// Handle can directly return string for HTML response
@@ -160,11 +160,11 @@ app.use(eventHandler(() => "<h1>Hello world!</h1>"));
160160
app
161161
.use(
162162
"/1",
163-
eventHandler(() => "<h1>Hello world!</h1>")
163+
eventHandler(() => "<h1>Hello world!</h1>"),
164164
)
165165
.use(
166166
"/2",
167-
eventHandler(() => "<h1>Goodbye!</h1>")
167+
eventHandler(() => "<h1>Goodbye!</h1>"),
168168
);
169169

170170
// We can proxy requests and rewrite cookie's domain and path
@@ -181,16 +181,16 @@ app.use(
181181
cookiePathRewrite: {
182182
"/": "/api",
183183
},
184-
})
185-
)
184+
}),
185+
),
186186
);
187187

188188
// Legacy middleware with 3rd argument are automatically promisified
189189
app.use(
190190
fromNodeMiddleware((req, res, next) => {
191191
req.setHeader("x-foo", "bar");
192192
next();
193-
})
193+
}),
194194
);
195195

196196
// Lazy loaded routes using { lazy: true }
@@ -311,7 +311,7 @@ PRs are welcome to add your packages.
311311
- [h3-valibot](https://github.com/intevel/h3-valibot)
312312
- `useValidateBody(event, schema)`
313313
- `useValidateParams(event, schema)`
314-
314+
315315
## License
316316

317317
MIT

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@
6767
"zod": "^3.21.4"
6868
},
6969
"packageManager": "pnpm@8.6.12"
70-
}
70+
}

‎pnpm-lock.yaml

+4,106-1,576
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎renovate.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"extends": [
3-
"github>unjs/renovate-config"
4-
]
2+
"extends": ["github>unjs/renovate-config"]
53
}

‎tsconfig.json

+3-12
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,10 @@
66
"skipLibCheck": true,
77
"allowSyntheticDefaultImports": true,
88
"moduleResolution": "Node",
9-
"lib": [
10-
"WebWorker",
11-
"DOM",
12-
"DOM.Iterable"
13-
],
9+
"lib": ["WebWorker", "DOM", "DOM.Iterable"],
1410
"strict": true,
1511
"declaration": true,
16-
"types": [
17-
"node"
18-
]
12+
"types": ["node"]
1913
},
20-
"include": [
21-
"src",
22-
"test/types.test-d.ts"
23-
]
14+
"include": ["src", "test/types.test-d.ts"]
2415
}

0 commit comments

Comments
 (0)
Please sign in to comment.