Skip to content

Commit 37fef31

Browse files
committed
Merge branch 'main' into unexport
2 parents a907fb5 + edd5829 commit 37fef31

20 files changed

+389
-133
lines changed

.github/workflows/audits.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ jobs:
3838
cache: yarn
3939
- name: Install
4040
run: yarn install --immutable
41-
- name: Build
42-
run: yarn build:esm
4341
- name: Start
4442
run: yarn workspace ${{ matrix.workspace }} start &
4543
- name: Audit
46-
run: node scripts/audit-implementation.mjs implementations/${{ matrix.workspace }}
44+
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace }}
4745
- name: Summary
4846
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
4947
- name: Upload audit report
@@ -88,8 +86,6 @@ jobs:
8886
cache: yarn
8987
- name: Install
9088
run: yarn install --immutable
91-
- name: Build
92-
run: yarn build:esm
9389
- name: Bake
9490
uses: docker/bake-action@v2
9591
with:
@@ -101,7 +97,7 @@ jobs:
10197
- name: Start
10298
run: yarn workspace ${{ matrix.workspace }} start --detach --wait
10399
- name: Audit
104-
run: node scripts/audit-implementation.mjs implementations/${{ matrix.workspace }}
100+
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace }}
105101
- name: Summary
106102
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
107103
- name: Upload audit report
@@ -141,10 +137,8 @@ jobs:
141137
cache: yarn
142138
- name: Install
143139
run: yarn install --immutable
144-
- name: Build
145-
run: yarn build:esm
146140
- name: Audit
147-
run: node scripts/audit-implementation.mjs implementations/${{ matrix.workspace.name }}
141+
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace.name }}
148142
- name: Summary
149143
run: cat implementations/${{ matrix.workspace.name }}/README.md >> $GITHUB_STEP_SUMMARY
150144
- name: Upload audit report
@@ -176,7 +170,7 @@ jobs:
176170
with:
177171
name: audit-reports
178172
- name: Render servers table
179-
run: node scripts/render-servers-table.mjs
173+
run: yarn tsx scripts/render-servers-table.mjs
180174
- name: Diff
181175
run: git diff --minimal
182176
- name: Commit

.github/workflows/benchmark.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ jobs:
3030
- name: Download k6
3131
run: |
3232
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
33-
- name: Build
34-
run: yarn run build:esm
3533
- name: Run
36-
run: node benchmark/servers/http.mjs &
34+
run: yarn tsx benchmark/servers/http.ts &
3735
- name: Benchmark
3836
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
3937
- name: Summary
@@ -58,10 +56,8 @@ jobs:
5856
- name: Download k6
5957
run: |
6058
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
61-
- name: Build
62-
run: yarn run build:esm
6359
- name: Run
64-
run: node benchmark/servers/express.mjs &
60+
run: yarn tsx benchmark/servers/express.ts &
6561
- name: Benchmark
6662
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
6763
- name: Summary
@@ -86,10 +82,8 @@ jobs:
8682
- name: Download k6
8783
run: |
8884
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
89-
- name: Build
90-
run: yarn run build:esm
9185
- name: Run
92-
run: node benchmark/servers/fastify.mjs &
86+
run: yarn tsx benchmark/servers/fastify.ts &
9387
- name: Benchmark
9488
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
9589
- name: Summary
@@ -114,10 +108,8 @@ jobs:
114108
- name: Download k6
115109
run: |
116110
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
117-
- name: Build
118-
run: yarn run build:esm
119111
- name: Run
120-
run: node benchmark/servers/koa.mjs &
112+
run: yarn tsx benchmark/servers/koa.ts &
121113
- name: Benchmark
122114
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
123115
- name: Summary
@@ -142,10 +134,8 @@ jobs:
142134
- name: Download k6
143135
run: |
144136
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
145-
- name: Build
146-
run: yarn run build:esm
147137
- name: Run
148-
run: node benchmark/servers/uWebSockets.mjs &
138+
run: yarn tsx benchmark/servers/uWebSockets.ts &
149139
- name: Benchmark
150140
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
151141
- name: Summary
@@ -208,10 +198,8 @@ jobs:
208198
- name: Download k6
209199
run: |
210200
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
211-
- name: Build
212-
run: yarn run build:esm
213201
- name: Run
214-
run: bun run benchmark/servers/bun.mjs &
202+
run: bun run benchmark/servers/bun.ts &
215203
- name: Benchmark
216204
run: ./k6 run benchmark/k6.mjs --summary-export summary.json
217205
- name: Summary

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
check:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
check:
17+
- format
18+
- lint
19+
- type
20+
name: Check ${{ matrix.check }}
21+
runs-on: ubuntu-latest
22+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Set up Node
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
cache: yarn
31+
- name: Install
32+
run: yarn install --immutable
33+
- name: Check
34+
run: yarn check:${{ matrix.check }}
35+
36+
test:
37+
name: Test
38+
runs-on: ubuntu-latest
39+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
- name: Set up Node
44+
uses: actions/setup-node@v3
45+
with:
46+
node-version: 18
47+
cache: yarn
48+
- name: Install
49+
run: yarn install --immutable
50+
- name: Test
51+
run: yarn test

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'CodeQL analysis'
1+
name: CodeQL analysis
22

33
on:
44
push:

.github/workflows/continuous-integration.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Build
2424
run: yarn build:umd
2525
- name: Inject
26-
run: node scripts/inject-audits-website.mjs
26+
run: yarn tsx scripts/inject-audits-website.ts
2727
- name: Upload website
2828
uses: actions/upload-pages-artifact@v1
2929
with:
File renamed without changes.

benchmark/servers/bun.mjs renamed to benchmark/servers/bun.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createHandler } from '../../lib/use/fetch.mjs';
2-
import { schema } from '../schema.mjs';
1+
import { createHandler } from '../../src/use/fetch';
2+
import { schema } from '../schema';
33

44
const port = parseInt(process.env.PORT || '');
55
if (isNaN(port)) {
@@ -10,8 +10,7 @@ const handler = createHandler({ schema });
1010

1111
export default {
1212
port,
13-
/** @param {Request} req */
14-
fetch(req) {
13+
fetch(req: Request) {
1514
const [path, _search] = req.url.split('?');
1615
if (path.endsWith('/graphql')) {
1716
return handler(req);

benchmark/servers/deno.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// @ts-expect-error this is deno
22
import { serve } from 'https://deno.land/[email protected]/http/server.ts';
3+
// @ts-expect-error this is deno
34
import { createHandler } from '../../lib/use/fetch.mjs';
4-
import { schema } from '../schema.mjs';
5+
// @ts-expect-error this is deno
6+
import { schema } from '../schema.ts';
57

68
const port = parseInt(
79
// @ts-expect-error this is deno

benchmark/servers/express.mjs renamed to benchmark/servers/express.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import express from 'express';
2-
import { createHandler } from '../../lib/use/express.mjs';
3-
import { schema } from '../schema.mjs';
2+
import { createHandler } from '../../src/use/express';
3+
import { schema } from '../schema';
44

55
const port = parseInt(process.env.PORT || '');
66
if (isNaN(port)) {

0 commit comments

Comments
 (0)