Skip to content

Commit

Permalink
Merge branch 'main' into octocov-custom-metrix
Browse files Browse the repository at this point in the history
  • Loading branch information
k2tzumi committed Nov 16, 2024
2 parents f1eead4 + be560f1 commit 982d6d1
Show file tree
Hide file tree
Showing 107 changed files with 2,871 additions and 1,133 deletions.
13 changes: 10 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"build": {
"dockerfile": "Dockerfile"
},
"containerEnv": {
"HOME": "/home/node"
},
"customizations": {
"vscode": {
"settings": {
Expand All @@ -13,9 +16,13 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
},
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
}
}
}
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
required: true
- type: input
attributes:
label: What runtime/platform is your app running on?
label: What runtime/platform is your app running on? (with version if possible)
placeholder: Cloudflare Workers, Deno, Bun, etc.
validations:
required: true
Expand Down
74 changes: 60 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- bun
- fastly
- node
- deno
- workerd
- lambda
- lambda-edge
Expand All @@ -45,9 +46,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.1.16'
bun-version: '1.1.33'
- run: bun install
- run: bun run format
- run: bun run lint
Expand All @@ -66,20 +67,22 @@ jobs:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bunx jsr publish --dry-run

deno:
name: 'Deno'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x
- run: env NAME=Deno deno test --coverage=coverage/raw/deno-runtime --allow-read --allow-env --allow-write --allow-net -c runtime-tests/deno/deno.json runtime-tests/deno
- run: deno test -c runtime-tests/deno-jsx/deno.precompile.json --coverage=coverage/raw/deno-precompile-jsx runtime-tests/deno-jsx
- run: deno test -c runtime-tests/deno-jsx/deno.react-jsx.json --coverage=coverage/raw/deno-react-jsx runtime-tests/deno-jsx
- run: grep -R '"url":' coverage | grep -v runtime-tests | sed -e 's/.*file:..//;s/.,//' | xargs deno cache --unstable-sloppy-imports
- run: deno coverage --lcov > coverage/deno-runtime-coverage-lcov.info
- uses: actions/upload-artifact@v4
with:
name: coverage-deno
Expand All @@ -90,9 +93,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.1.16'
bun-version: '1.1.33'
- run: bun run test:bun
- uses: actions/upload-artifact@v4
with:
Expand All @@ -103,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run test:fastly
Expand All @@ -123,7 +126,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run test:node
Expand All @@ -141,7 +144,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run test:workerd
Expand All @@ -155,7 +158,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bun run test:lambda
Expand All @@ -169,7 +172,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run test:lambda-edge
Expand All @@ -179,11 +182,12 @@ jobs:
path: coverage/

perf-measures-type-check-on-pr:
name: 'Type Check on PR'
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Performance measurement of type check
run: |
Expand All @@ -198,11 +202,12 @@ jobs:
OCTOCOV_CUSTOM_METRICS_BENCHMARK: perf-measures/type-check/diagnostics.json

perf-measures-type-check-on-main:
name: 'Type Check on Main'
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Performance measurement of type check
run: |
Expand All @@ -217,3 +222,44 @@ jobs:
OCTOCOV_GITHUB_REF: refs/heads/main
OCTOCOV_GITHUB_SHA: none
OCTOCOV_CUSTOM_METRICS_BENCHMARK: perf-measures/type-check/diagnostics.json

perf-measures-bundle-check-on-pr:
name: 'Bundle Check on PR'
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bunx esbuild --minify --bundle dist/index.js --format=esm --outfile=perf-measures/bundle-check/generated/after.js
- uses: actions/cache/restore@v4
with:
path: perf-measures/bundle-check/generated/before.js
restore-keys: |
perf-measures-bundle-check-previous-file-
key: perf-measures-bundle-check-previous-file-
- run: |
{
echo 'COMPARISON<<EOF'
bun scripts/process-results.ts | column -s '|' -t
echo 'EOF'
} >> "$GITHUB_ENV"
working-directory: perf-measures/bundle-check
- run: echo "$COMPARISON"
name: display comparison

perf-measures-bundle-check-on-main:
name: 'Bundle Check on Main'
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- run: bunx esbuild --minify --bundle dist/index.js --format=esm --outfile=perf-measures/bundle-check/generated/before.js
- uses: actions/cache/save@v4
with:
path: perf-measures/bundle-check/generated/before.js
key: perf-measures-bundle-check-previous-file-${{ github.sha }}
26 changes: 26 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Close stale issues with "not bug" label

on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: write
issues: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues with "not bug" label
uses: actions/stale@v8
with:
days-before-stale: 7
days-before-close: 2
stale-issue-message: 'This issue has been marked as stale due to inactivity.'
close-issue-message: 'Closing this issue due to inactivity.'
exempt-issue-labels: ''
stale-issue-label: 'stale'
only-labels: 'not bug'
operations-per-run: 30
remove-stale-when-updated: true
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x

deno-version: v2.x
- run: deno install --no-lock --allow-scripts
- name: Publish to JSR
run: deno run -A jsr:@david/[email protected].3
run: deno run -A jsr:@david/[email protected].4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npm create hono@latest
## Features

- **Ultrafast** 🚀 - The router `RegExpRouter` is really fast. Not using linear loops. Fast.
- **Lightweight** 🪶 - The `hono/tiny` preset is under 13kB. Hono has zero dependencies and uses only the Web Standard API.
- **Lightweight** 🪶 - The `hono/tiny` preset is under 12kB. Hono has zero dependencies and uses only the Web Standard API.
- **Multi-runtime** 🌍 - Works on Cloudflare Workers, Fastly Compute, Deno, Bun, AWS Lambda, Lambda@Edge, or Node.js. The same code runs on all platforms.
- **Batteries Included** 🔋 - Hono has built-in middleware, custom middleware, and third-party middleware. Batteries included.
- **Delightful DX** 😃 - Super clean APIs. First-class TypeScript support. Now, we've got "Types".
Expand Down
Loading

0 comments on commit 982d6d1

Please sign in to comment.