@pawover/kit 1.0.1-alpha.0 → 1.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +5 -8
- package/README.md +5 -8
- package/entry/hooks-metadata.json +2 -13
- package/entry/types-global.d.ts +1 -0
- package/entry/types-react-global.d.ts +1 -0
- package/package.json +39 -38
package/README.en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p><a href="README.md">简体中文</a> | <b>English</b></p>
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@pawover/kit)
|
|
7
|
-
[](https://nodejs.org)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://pawover.github.io/pawover-kit/)
|
|
10
10
|
</div>
|
|
@@ -64,7 +64,7 @@ import { TypeUtil } from "@pawover/kit/utils";
|
|
|
64
64
|
import { useMount } from "@pawover/kit/hooks/react";
|
|
65
65
|
import { useAlovaRequest } from "@pawover/kit/hooks/alova";
|
|
66
66
|
import type { AnyObject } from "@pawover/kit/types";
|
|
67
|
-
import
|
|
67
|
+
import pawover from "@pawover/kit/eslint-rules";
|
|
68
68
|
import { id } from "@pawover/kit/zod";
|
|
69
69
|
|
|
70
70
|
// Type utilities
|
|
@@ -78,11 +78,8 @@ useMount(() => {
|
|
|
78
78
|
console.log("mounted");
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
// ESLint
|
|
82
|
-
export default
|
|
83
|
-
{ ignores: eslintRules.GLOB_EXCLUDE },
|
|
84
|
-
{ files: ["**/*.ts"], rules: { ...eslintRules.javascript, ...eslintRules.typescript } },
|
|
85
|
-
];
|
|
81
|
+
// ESLint flat config preset (self-contained)
|
|
82
|
+
export default pawover({ typescript: true });
|
|
86
83
|
|
|
87
84
|
// Zod schemas
|
|
88
85
|
id.parse("abc"); // "abc"
|
|
@@ -90,7 +87,7 @@ id.parse("abc"); // "abc"
|
|
|
90
87
|
|
|
91
88
|
## Requirements
|
|
92
89
|
|
|
93
|
-
- Node.js >=
|
|
90
|
+
- Node.js >= 24.21.0
|
|
94
91
|
- pnpm >= 11
|
|
95
92
|
|
|
96
93
|
## Development
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p><b>简体中文</b> | <a href="README.en.md">English</a></p>
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@pawover/kit)
|
|
7
|
-
[](https://nodejs.org)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://pawover.github.io/pawover-kit/)
|
|
10
10
|
</div>
|
|
@@ -64,7 +64,7 @@ import { TypeUtil } from "@pawover/kit/utils";
|
|
|
64
64
|
import { useMount } from "@pawover/kit/hooks/react";
|
|
65
65
|
import { useAlovaRequest } from "@pawover/kit/hooks/alova";
|
|
66
66
|
import type { AnyObject } from "@pawover/kit/types";
|
|
67
|
-
import
|
|
67
|
+
import pawover from "@pawover/kit/eslint-rules";
|
|
68
68
|
import { id } from "@pawover/kit/zod";
|
|
69
69
|
|
|
70
70
|
// 类型工具
|
|
@@ -78,11 +78,8 @@ useMount(() => {
|
|
|
78
78
|
console.log("mounted");
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
// ESLint
|
|
82
|
-
export default
|
|
83
|
-
{ ignores: eslintRules.GLOB_EXCLUDE },
|
|
84
|
-
{ files: ["**/*.ts"], rules: { ...eslintRules.javascript, ...eslintRules.typescript } },
|
|
85
|
-
];
|
|
81
|
+
// ESLint flat config 预设(自包含)
|
|
82
|
+
export default pawover({ typescript: true });
|
|
86
83
|
|
|
87
84
|
// Zod Schema
|
|
88
85
|
id.parse("abc"); // "abc"
|
|
@@ -90,7 +87,7 @@ id.parse("abc"); // "abc"
|
|
|
90
87
|
|
|
91
88
|
## 环境要求
|
|
92
89
|
|
|
93
|
-
- Node.js >=
|
|
90
|
+
- Node.js >= 24.21.0
|
|
94
91
|
- pnpm >= 11
|
|
95
92
|
|
|
96
93
|
## 开发
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"alova": [
|
|
3
|
-
|
|
4
|
-
"useAlovaRequest",
|
|
5
|
-
"useAlovaWatcher"
|
|
6
|
-
],
|
|
7
|
-
"react": [
|
|
8
|
-
"BREAK_POINT_TOKEN",
|
|
9
|
-
"useLatest",
|
|
10
|
-
"useMount",
|
|
11
|
-
"useResponsive",
|
|
12
|
-
"useTitle",
|
|
13
|
-
"useUnmount"
|
|
14
|
-
]
|
|
2
|
+
"alova": ["useAlovaPagination", "useAlovaRequest", "useAlovaWatcher"],
|
|
3
|
+
"react": ["BREAK_POINT_TOKEN", "useLatest", "useMount", "useResponsive", "useTitle", "useUnmount"]
|
|
15
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@pawover/kit-types/global";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@pawover/kit-types/react/global";
|
package/package.json
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"url": "https://github.com/pawover"
|
|
7
7
|
},
|
|
8
8
|
"description": "一个基于 TypeScript 的开发工具包",
|
|
9
|
-
"version": "1.0
|
|
9
|
+
"version": "1.2.0-alpha.2",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
12
|
+
"node": ">=24.21.0"
|
|
13
13
|
},
|
|
14
14
|
"devEngines": {
|
|
15
15
|
"runtime": {
|
|
16
16
|
"name": "node",
|
|
17
|
-
"version": "24.
|
|
17
|
+
"version": "24.21.0"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
@@ -145,6 +145,12 @@
|
|
|
145
145
|
"default": "./entry/types-react.cjs"
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
+
"./types/global": {
|
|
149
|
+
"types": "./entry/types-global.d.ts"
|
|
150
|
+
},
|
|
151
|
+
"./types/react/global": {
|
|
152
|
+
"types": "./entry/types-react-global.d.ts"
|
|
153
|
+
},
|
|
148
154
|
"./eslint-rules": {
|
|
149
155
|
"import": {
|
|
150
156
|
"types": "./entry/eslint-rules.d.ts",
|
|
@@ -157,54 +163,50 @@
|
|
|
157
163
|
},
|
|
158
164
|
"./metadata.json": "./entry/metadata.json"
|
|
159
165
|
},
|
|
166
|
+
"publishConfig": {
|
|
167
|
+
"access": "public"
|
|
168
|
+
},
|
|
160
169
|
"dependencies": {
|
|
161
|
-
"@pawover/kit-
|
|
162
|
-
"@pawover/kit-
|
|
170
|
+
"@pawover/kit-eslint-rules": "0.1.0-alpha.1",
|
|
171
|
+
"@pawover/kit-hooks": "0.0.9-alpha.1",
|
|
172
|
+
"@pawover/kit-types": "0.1.0-alpha.0",
|
|
163
173
|
"@pawover/kit-zod": "0.0.4",
|
|
164
|
-
"@pawover/kit-
|
|
165
|
-
"@pawover/kit-types": "0.0.4"
|
|
174
|
+
"@pawover/kit-utils": "1.0.1-alpha.1"
|
|
166
175
|
},
|
|
167
176
|
"devDependencies": {
|
|
168
177
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
169
|
-
"@changesets/cli": "^3.0.
|
|
170
|
-
"@commitlint/cli": "^21.2.
|
|
171
|
-
"@commitlint/config-conventional": "^21.2.
|
|
172
|
-
"@eslint-react/eslint-plugin": "^5.18.6",
|
|
178
|
+
"@changesets/cli": "^3.0.3",
|
|
179
|
+
"@commitlint/cli": "^21.2.3",
|
|
180
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
173
181
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
174
|
-
"@
|
|
175
|
-
"@stylistic/eslint-plugin": "^6.0.0-beta.6",
|
|
176
|
-
"@testing-library/react": "^16.3.2",
|
|
182
|
+
"@testing-library/react": "^16.3.3",
|
|
177
183
|
"@types/fs-extra": "^11.0.4",
|
|
178
|
-
"@types/node": "^26.
|
|
179
|
-
"@types/react": "^19.
|
|
180
|
-
"@vitejs/plugin-react": "^6.1.
|
|
181
|
-
"@vitest/
|
|
182
|
-
"@vitest/coverage-v8": "^4.1.11",
|
|
184
|
+
"@types/node": "^26.6.5",
|
|
185
|
+
"@types/react": "^19.3.0",
|
|
186
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
187
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
183
188
|
"alova": "^3.5.5",
|
|
184
189
|
"commitizen": "^4.3.2",
|
|
185
190
|
"cross-env": "^10.1.0",
|
|
186
191
|
"cz-customizable": "^7.5.4",
|
|
187
|
-
"eslint": "^10.
|
|
188
|
-
"
|
|
189
|
-
"eslint-plugin-import-lite": "^0.6.0",
|
|
190
|
-
"eslint-plugin-react-hooks": "^7.1.1",
|
|
191
|
-
"fs-extra": "^11.4.0",
|
|
192
|
+
"eslint": "^10.12.0",
|
|
193
|
+
"fs-extra": "^11.4.1",
|
|
192
194
|
"husky": "^9.1.7",
|
|
193
|
-
"jsdom": "^30.
|
|
194
|
-
"lint-staged": "^17.
|
|
195
|
+
"jsdom": "^30.1.2",
|
|
196
|
+
"lint-staged": "^17.6.0",
|
|
195
197
|
"mathjs": "^15.2.0",
|
|
196
|
-
"prettier": "^3.9.
|
|
198
|
+
"prettier": "^3.9.10",
|
|
197
199
|
"react-dom": "19.2.6",
|
|
198
200
|
"rimraf": "^6.1.3",
|
|
199
201
|
"rollup-plugin-visualizer": "^7.1.1",
|
|
200
|
-
"tsdown": "^0.
|
|
201
|
-
"turbo": "^2.
|
|
202
|
+
"tsdown": "^0.23.1",
|
|
203
|
+
"turbo": "^2.11.7",
|
|
202
204
|
"typedoc": "^0.28.20",
|
|
203
|
-
"typedoc-plugin-markdown": "^4.
|
|
205
|
+
"typedoc-plugin-markdown": "^4.13.1",
|
|
204
206
|
"typescript": "^6.0.3",
|
|
205
|
-
"typescript-eslint": "^8.67.0",
|
|
206
207
|
"vitepress": "^1.6.4",
|
|
207
|
-
"vitest": "^
|
|
208
|
+
"vitest": "^5.0.3",
|
|
209
|
+
"@pawover/kit-internal": "0.0.0"
|
|
208
210
|
},
|
|
209
211
|
"peerDependencies": {
|
|
210
212
|
"alova": "^3.5.5",
|
|
@@ -230,9 +232,6 @@
|
|
|
230
232
|
"optional": true
|
|
231
233
|
}
|
|
232
234
|
},
|
|
233
|
-
"publishConfig": {
|
|
234
|
-
"access": "public"
|
|
235
|
-
},
|
|
236
235
|
"config": {
|
|
237
236
|
"commitizen": {
|
|
238
237
|
"path": "node_modules/cz-customizable"
|
|
@@ -249,7 +248,8 @@
|
|
|
249
248
|
"test:integration": "vitest run test/integration",
|
|
250
249
|
"test:types": "tsc -p test/tsconfig.json --noEmit",
|
|
251
250
|
"test:smoke": "node test/scripts/smoke.ts",
|
|
252
|
-
"test:
|
|
251
|
+
"test:global-types": "node test/scripts/globalTypes.ts",
|
|
252
|
+
"test:ci": "pnpm test:types && pnpm check:types:packages && pnpm test && pnpm build && pnpm test:smoke && pnpm test:global-types && pnpm check:pack",
|
|
253
253
|
"postbuild": "node scripts/syncEntry.ts",
|
|
254
254
|
"build": "turbo build",
|
|
255
255
|
"build:analyze": "cross-env VISUALIZER=1 turbo build",
|
|
@@ -269,7 +269,8 @@
|
|
|
269
269
|
"docs:preview": "vitepress preview site",
|
|
270
270
|
"docs:gen": "node scripts/generateDocs.ts",
|
|
271
271
|
"check": "pnpm check:types & pnpm check:eslint & pnpm check:format",
|
|
272
|
-
"check:types": "tsc --noEmit",
|
|
272
|
+
"check:types": "tsc --noEmit && node scripts/checkPackageTypes.ts",
|
|
273
|
+
"check:types:packages": "node scripts/checkPackageTypes.ts",
|
|
273
274
|
"check:eslint": "eslint --fix \"**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx,vue}\" --cache-location=.cache/eslint.cache.json --cache",
|
|
274
275
|
"check:format": "prettier --write \"**/*.{html,json,jsonc}\" --cache-location=.cache/prettier.cache.json --cache",
|
|
275
276
|
"check:pack": "cross-env HUSKY=0 node scripts/checkPack.ts",
|
|
@@ -278,7 +279,7 @@
|
|
|
278
279
|
"clean:cache": "rimraf -g .cache",
|
|
279
280
|
"clean:lib": "rimraf -g node_modules",
|
|
280
281
|
"clean:output": "rimraf -g **/dist **/*.tgz",
|
|
281
|
-
"lib:up": "pnpm dlx taze -I -r --exclude pnpm",
|
|
282
|
+
"lib:up": "pnpm dlx taze -I -r --exclude pnpm --exclude node --include all --no-github-actions",
|
|
282
283
|
"commit": "git cz"
|
|
283
284
|
}
|
|
284
285
|
}
|