Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit 92d7bbc

Browse files
authored
v5.0.0 (#8)
* Add missing wrapper hooks and standardize APIs (#7) * Add createQueryHook * Add createInfiniteHook * Add createImmutableHook * Add useMutate * Remove original exports * Upgrade dependencies * Revamp package setup * Remove old tests * Begin adding tests * Add mutate tests * Add infinite tests * Update tsconfig for builds * Tiny updates * Update package manager * Remove setup test data script * Apply lint and build fixes * Update README * Add git hooks for linting and formatting * Fix formatting * Fix exports * Fix lint errors and update readme * Remove tsconfig.build.json * 5.0.0-rc.0 * Add `RequestTypes` utility back * 5.0.0-rc.1 * Remove main and module fields * 5.0.0-rc.2 * Update exports * 5.0.0-rc.3 * Make more exports changes * 5.0.0-rc.4 * Change package to commonjs * 5.0.0-rc.5 * Ignore no resolution * 5.0.0-rc.6 * Update exports * 5.0.0-rc.7 * Revert to ESM-only * 5.0.0-rc.8 * Add module and types to package.json * 5.0.0-rc.9 * 5.0.0-rc.10 * Switch back to ESM-only * 5.0.0-rc.11 * Repair broken openapi-fetch types * 5.0.0-rc.12 * Add missing support for boolean mutate argument * Add test for mutate promise types * Add key matcher docs * Add memoization hooks * Add debug values * 5.0.0-rc.13 * Include prefix in debug values * 5.0.0-rc.14 * Add links to swr documentation * 5.0.0-rc.15
1 parent ee33fb1 commit 92d7bbc

32 files changed

+8549
-2180
lines changed

.github/workflows/ci.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,33 @@ on: [push]
55
jobs:
66
build:
77
name: Build and Test
8-
98
runs-on: ubuntu-latest
10-
9+
strategy:
10+
matrix:
11+
node: [18, 20, 22]
1112
steps:
1213
- name: Checkout
1314
uses: actions/checkout@v4
1415

15-
- name: Setup pnpm
16-
uses: pnpm/action-setup@v2
17-
with:
18-
version: 9.4.0
19-
20-
- name: Setup Node.js
16+
- name: Setup Node ${{ matrix.node }}
2117
uses: actions/setup-node@v4
2218
with:
23-
node-version: 20
24-
cache: pnpm
19+
node-version: ${{ matrix.node }}
2520

2621
- name: Install dependencies
27-
run: pnpm install
28-
29-
- name: Verify formatting
30-
run: pnpm format:check
22+
run: npm ci
3123

3224
- name: Build
33-
run: pnpm build
25+
run: npm run build
3426

3527
- name: Test
36-
run: pnpm test
28+
run: npm test
29+
30+
- name: Check exports
31+
run: npm run exports:check
32+
33+
- name: Check types
34+
run: npm run types:check
35+
36+
- name: Check formatting
37+
run: npm run format:check

.husky/pre-commit

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lint-staged
2+
vitest --run --changed --typecheck

.lintstagedrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,ts,json,md}": ["eslint", "prettier --write"]
3+
}

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Save exact versions
2+
save-exact=true

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist/
22
pnpm-lock.yaml
3+
**/__test__/fixtures/*

.prettierrc

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
{}

.tool-versions

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
nodejs 20.15.0
2-
pnpm 9.4.0
1+
nodejs lts

0 commit comments

Comments
 (0)