Skip to content
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
46 changes: 31 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,42 @@ on:
branches:
- main

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

# Reads the version from `packageManager` in package.json.
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v6

# Lint tooling only — the test matrix below still covers the Node 20
# runtime floor. `@antfu/eslint-config` (via eslint-plugin-unicorn)
# relies on `Set.prototype.union`, which needs Node 22.
- name: Set node
uses: actions/setup-node@v3
uses: actions/setup-node@v7
with:
node-version: 24.x

- name: Setup
run: npm i -g @antfu/ni
cache: pnpm

- name: Install
run: nci
run: pnpm install --frozen-lockfile

- name: Lint
run: nr lint
run: pnpm lint

test:
runs-on: ${{ matrix.os }}

# Codecov authenticates the upload via GitHub OIDC instead of a token.
permissions:
contents: read
id-token: write

strategy:
matrix:
# 20 is the floor (matches h3's `engines`) and has no zstd in
Expand All @@ -51,18 +58,27 @@ jobs:
name: test (node-${{ matrix.node }}, h3-v${{ matrix.h3 }}, ${{ matrix.os }})

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v3

- name: Install pnpm
uses: pnpm/action-setup@v6

- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install

- run: pnpm install --frozen-lockfile

- name: Install h3 v${{ matrix.h3 }}
run: pnpm add -D h3@${{ matrix.h3 == 1 && '^1.15.11' || '^2.0.8' }} --ignore-scripts

- run: pnpm build
# - run: pnpm test:types
- run: pnpm vitest --coverage && rm -rf coverage/tmp
- uses: codecov/codecov-action@v3

- run: pnpm vitest run --coverage && rm -rf coverage/tmp

- uses: codecov/codecov-action@v7
with:
use_oidc: true
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v6

- name: Set node
uses: actions/setup-node@v3
uses: actions/setup-node@v7
with:
node-version: 20.x
node-version: 24.x

- run: npx changelogithub
env:
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

41 changes: 19 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "h3-compression",
"type": "module",
"version": "1.1.0",
"packageManager": "pnpm@8.7.0",
"packageManager": "pnpm@12.23.0",
"description": "Adds compression to h3 request (brotli, gzip, deflate, zstd)",
"author": {
"name": "Gregor Becker",
Expand Down Expand Up @@ -70,7 +70,7 @@
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"test:types": "vitest typecheck",
"test:types": "vitest --typecheck.only --run",
"prepare": "simple-git-hooks"
},
"peerDependencies": {
Expand All @@ -84,28 +84,25 @@
},
"devDependencies": {
"@antfu/eslint-config": "^10.0.0",
"@antfu/ni": "^0.21.6",
"@antfu/utils": "^0.7.6",
"@nuxt/kit": "^3.13.0",
"@nuxt/schema": "3.21.11",
"@types/node": "^22.20.1",
"@types/supertest": "^2.0.12",
"@vitest/coverage-v8": "^0.34.3",
"bumpp": "^9.2.0",
"@antfu/ni": "^30.6.0",
"@nuxt/kit": "^4.7.0",
"@nuxt/schema": "4.7.0",
"@types/node": "^22.20.5",
"@types/supertest": "^7.2.1",
"@vitest/coverage-v8": "^4.1.12",
"bumpp": "^12.3.0",
"eslint": "^10.15.0",
"esno": "^0.17.0",
"esno": "^4.8.0",
"h3": "2.0.8",
"lint-staged": "^14.0.1",
"node-fetch-native": "^1.4.0",
"pnpm": "^8.7.0",
"rimraf": "^5.0.1",
"rollup": "3.28.1",
"simple-git-hooks": "^2.9.0",
"supertest": "^6.3.3",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.9",
"vitest": "^0.34.3"
"lint-staged": "^17.6.2",
"node-fetch-native": "^1.6.7",
"rollup": "4.68.8",
"simple-git-hooks": "^2.14.0",
"supertest": "^7.3.2",
"typescript": "^6.0.3",
"unbuild": "^3.6.1",
"vite": "^8.3.8",
"vitest": "^4.1.12"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
Expand Down
4 changes: 2 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"h3-compression": "workspace:*"
},
"devDependencies": {
"@nuxt/devtools": "^0.8.2",
"nuxt": "^3.7.0"
"@nuxt/devtools": "^4.2.0",
"nuxt": "^4.7.0"
}
}
Loading
Loading