Skip to content

Commit b9df629

Browse files
committed
Enhance SWRModelEndpoint with generic type support and allow null id and params for SWR conditional fetching
1 parent a77fb0c commit b9df629

File tree

12 files changed

+4799
-50
lines changed

12 files changed

+4799
-50
lines changed

.github/workflows/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
working-directory: ./
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- name: Use Node.js ${{ matrix.node-version }}
1717
uses: actions/setup-node@v3
1818
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ yarn-debug.log*
77
yarn-error.log*
88
/.pnp
99
.pnp.js
10-
package-lock.json
1110

1211
.vscode/*
1312
.idea/*

biome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
33
"vcs": {
44
"enabled": false,
55
"clientKind": "git",
66
"useIgnoreFile": false
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": [".next", "*.json", "dist"]
10+
"includes": ["**/*.ts", "**/*.tsx", "**/*.md"]
1111
},
1212
"formatter": {
1313
"enabled": true,

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swr-models",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "SWR toolkit for abstracting API data models as React state objects.",
55
"keywords": [
66
"swr",
@@ -26,25 +26,25 @@
2626
"prepublishOnly": "npm run build"
2727
},
2828
"peerDependencies": {
29-
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
30-
"swr": "^2.3.0"
29+
"react": "^16.11 || ^17 || ^18 || ^19",
30+
"@types/react": "^19.2.7",
31+
"swr": "^2.3.7"
3132
},
3233
"devDependencies": {
33-
"@babel/preset-env": "^7.27.2",
34-
"@babel/preset-typescript": "^7.27.1",
35-
"@biomejs/biome": "^1.9.4",
36-
"@types/jest": "^29.5.14",
37-
"@types/react": "^19.1.6",
38-
"jest": "^29.7.0",
39-
"jest-environment-jsdom": "^29.7.0",
40-
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
41-
"swr": "^2.3.0",
42-
"ts-jest": "^29.3.4",
34+
"@babel/preset-env": "^7.28.5",
35+
"@babel/preset-typescript": "^7.28.5",
36+
"@biomejs/biome": "^2.3.8",
37+
"@types/jest": "^30.0.0",
38+
"jest": "^30.2.0",
39+
"jest-environment-jsdom": "^30.2.0",
40+
"react": "^16.11 || ^17 || ^18 || ^19",
41+
"swr": "^2.3.7",
42+
"ts-jest": "^29.4.6",
4343
"ts-node": "^10.9.2",
44-
"typescript": "^5.8.3"
44+
"typescript": "^5.9.3"
4545
},
46-
"overrides": {
47-
"tough-cookie": "^5.1.0",
48-
"whatwg-url": "^14.1.0"
49-
}
46+
"engines": {
47+
"node": ">=18"
48+
},
49+
"packageManager": "pnpm@10.0.0"
5050
}

0 commit comments

Comments
 (0)