@pawover/kit 1.0.0-alpha.0 → 1.0.1-alpha.0

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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.en.md +59 -31
  3. package/README.md +37 -34
  4. package/package.json +30 -27
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 猫爪在上
3
+ Copyright (c) 2025 pawover
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.en.md CHANGED
@@ -1,56 +1,61 @@
1
- # pawover-kit
1
+ <div align="center">
2
+ <img src="site/public/logo.svg" width="64" alt="pawover-kit logo">
3
+ <h1>pawover-kit</h1>
4
+ <p><a href="README.md">简体中文</a> | <b>English</b></p>
2
5
 
3
- [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
4
- [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
5
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+ [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
7
+ [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
8
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
+ [![Docs](https://img.shields.io/badge/docs-pawover--kit--docs-3B82F6.svg)](https://pawover.github.io/pawover-kit/)
10
+ </div>
6
11
 
7
12
  > An open-source TypeScript toolkit: type utilities, static utility classes, React / Alova hooks, ESLint rulesets and Zod schemas, ready to use with complete type definitions.
8
13
 
9
14
  pawover-kit is a pnpm monorepo made of 5 independently publishable packages. The root package `@pawover/kit` re-exports every subpackage, while each subpackage can also be installed and used on its own.
10
15
 
16
+ > 📚 **Documentation**: [https://pawover.github.io/pawover-kit/](https://pawover.github.io/pawover-kit/) — full API reference, guides and practical examples live on the docs site; this file keeps only the essentials.
17
+
11
18
  ## Features
12
19
 
13
- - **Type-only utilities** `@pawover/kit-types`: no runtime code, providing `AnyObject`, `TreeLike`, the `AnyFunction` family, `AdvancedRecord`, `ApiNameCheck` and more
14
- - **Static utility classes** `@pawover/kit-utils`: 14+ utility classes covering arrays, strings, objects, trees, currency, dates, math and more
15
- - **React / Alova hooks** `@pawover/kit-hooks`: `useMount`, `useUnmount`, `useLatest`, `useResponsive`, `useTitle` and Alova request hooks
16
- - **ESLint rulesets** `@pawover/kit-eslint-rules`: 9 rule groups (javascript / typescript / react / reactHooks / vue / stylistic / antfu / imports / importsSort) plus `GLOB_EXCLUDE` and `createRules`
17
- - **Zod v4 schemas** `@pawover/kit-zod`: common validators for id, string, number, boolean, bigint and more
18
20
  - Dual ESM / CJS builds with full type declarations
19
- - `development` export condition so bundlers can use the source directly in development
21
+ - `exports` only points to `dist` outputs, resolvable by any toolchain (node / vite / vitest / webpack, etc.)
20
22
 
21
23
  ## Packages
22
24
 
23
- | Package | Description | Import path |
24
- | :--- | :--- | :--- |
25
- | `@pawover/kit-types` | Type-only utilities (no runtime code) | `@pawover/kit/types`, React types via `@pawover/kit/types/react` |
26
- | `@pawover/kit-utils` | Static utility classes | `@pawover/kit/utils` (also `./math` and `./vite` subpaths) |
27
- | `@pawover/kit-hooks` | React + Alova hooks | `@pawover/kit/hooks/react`, `@pawover/kit/hooks/alova` |
28
- | `@pawover/kit-eslint-rules` | ESLint rulesets | `@pawover/kit/eslint-rules` |
29
- | `@pawover/kit-zod` | Zod v4 schemas | `@pawover/kit/zod` |
25
+ | Package | Description | Latest version | Downloads |
26
+ | :-- | :-- | :-- | :-- |
27
+ | `@pawover/kit` | Umbrella root package re-exporting every subpackage | [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit) |
28
+ | `@pawover/kit-types` | Type-only utilities (no runtime code) | [![npm version](https://img.shields.io/npm/v/@pawover/kit-types.svg)](https://www.npmjs.com/package/@pawover/kit-types) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-types.svg)](https://www.npmjs.com/package/@pawover/kit-types) |
29
+ | `@pawover/kit-utils` | 15+ static utility classes | [![npm version](https://img.shields.io/npm/v/@pawover/kit-utils.svg)](https://www.npmjs.com/package/@pawover/kit-utils) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-utils.svg)](https://www.npmjs.com/package/@pawover/kit-utils) |
30
+ | `@pawover/kit-hooks` | React + Alova hooks | [![npm version](https://img.shields.io/npm/v/@pawover/kit-hooks.svg)](https://www.npmjs.com/package/@pawover/kit-hooks) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-hooks.svg)](https://www.npmjs.com/package/@pawover/kit-hooks) |
31
+ | `@pawover/kit-eslint-rules` | ESLint rulesets (flat config) | [![npm version](https://img.shields.io/npm/v/@pawover/kit-eslint-rules.svg)](https://www.npmjs.com/package/@pawover/kit-eslint-rules) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-eslint-rules.svg)](https://www.npmjs.com/package/@pawover/kit-eslint-rules) |
32
+ | `@pawover/kit-zod` | Zod v4 validators | [![npm version](https://img.shields.io/npm/v/@pawover/kit-zod.svg)](https://www.npmjs.com/package/@pawover/kit-zod) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-zod.svg)](https://www.npmjs.com/package/@pawover/kit-zod) |
30
33
 
31
- > [!NOTE]
32
- > The root export of `@pawover/kit-hooks` is empty. Always import from the `@pawover/kit/hooks/react` or `@pawover/kit/hooks/alova` subpaths.
34
+ <blockquote style="background: rgba(9, 105, 218, 0.05); border-left: 4px solid #0969da; border-radius: 6px; padding: 12px 16px;">
35
+ <b>📝 Note</b>: The root export of <code>@pawover/kit-hooks</code> is empty. Always import from the <code>@pawover/kit/hooks/react</code> or <code>@pawover/kit/hooks/alova</code> subpaths.
36
+ </blockquote>
33
37
 
34
38
  ## Installation
35
39
 
36
40
  Install the umbrella package:
37
41
 
38
42
  ```bash
39
- npm install @pawover/kit
43
+ pnpm add @pawover/kit
40
44
  ```
41
45
 
42
46
  Or install individual subpackages:
43
47
 
44
48
  ```bash
45
- npm install @pawover/kit-types
46
- npm install @pawover/kit-utils
47
- npm install @pawover/kit-hooks
48
- npm install @pawover/kit-eslint-rules
49
- npm install @pawover/kit-zod
49
+ pnpm add @pawover/kit-types
50
+ pnpm add @pawover/kit-utils
51
+ pnpm add @pawover/kit-hooks
52
+ pnpm add @pawover/kit-eslint-rules
53
+ pnpm add @pawover/kit-zod
50
54
  ```
51
55
 
52
- > [!WARNING]
53
- > `alova`, `mathjs`, `react`, `vite` and `zod` are optional peer dependencies: install them yourself when using the related features (for example `alova` and `react` are required for `@pawover/kit/hooks/alova`).
56
+ <blockquote style="background: rgba(191, 135, 16, 0.05); border-left: 4px solid #bf870f; border-radius: 6px; padding: 12px 16px;">
57
+ <b>⚠️ Warning</b>: <code>alova</code>, <code>mathjs</code>, <code>react</code>, <code>vite</code> and <code>zod</code> are optional peer dependencies: install them yourself when using the related features (for example <code>alova</code> and <code>react</code> are required for <code>@pawover/kit/hooks/alova</code>).
58
+ </blockquote>
54
59
 
55
60
  ## Quick start
56
61
 
@@ -100,11 +105,34 @@ Common commands:
100
105
 
101
106
  | Command | Description |
102
107
  | :--- | :--- |
103
- | `pnpm test` | Run all vitest suites (801 tests / 31 files, node + jsdom environments) |
108
+ | `pnpm test` | Run all vitest suites (814 tests / 31 files, node + jsdom environments) |
104
109
  | `pnpm test:types` | Type-check the test files |
105
110
  | `pnpm test:ci` | Full CI pipeline: type check → tests → build → smoke → pack check |
106
111
  | `pnpm build` | Build every subpackage with turbo (tsdown emits ESM/CJS builds and type declarations) |
107
112
  | `pnpm check` | Run types / eslint / format checks in parallel |
113
+ | `pnpm docs:dev` | Preview the docs site locally (VitePress, source in `site/`) |
114
+ | `pnpm docs:gen` | Regenerate API reference pages from source JSDoc (re-run after editing source comments) |
115
+
116
+ ## Release
117
+
118
+ A **dual-channel release model** driven by Changesets v3 + GitHub Actions (full details in [.changeset/README.md](./.changeset/README.md)):
119
+
120
+ - **feature = alpha pre-release channel**: pushing to `feature` is fully automatic — CI guard (`verifyReleasePlan.ts`) → select-mode → version PR → version job merges once CI is green → dispatch triggers publish, releasing under the `alpha` dist-tag
121
+ - **main = stable channel**: code only lands via a **release merge** — `pnpm release:merge` (sync checks → strip prerelease → collision guard → create release-main PR) → **manual merge of the PR** (the human gate for stable releases) → publish `latest` → CI pushes the stable version back to `feature` (baseline sync, next alpha bumps on top of the new stable)
122
+ - **Core design**: there is always a human gate between alpha and stable — no automation ever crosses it
123
+
124
+ Common commands:
125
+
126
+ | Action | Command |
127
+ | :--- | :--- |
128
+ | Write a changeset | `pnpm changeset` |
129
+ | Publish alpha (automatic) | `git push origin feature` |
130
+ | Start a stable release (human gate) | `pnpm release:merge` → manually merge the PR |
131
+ | Sync non-release content to main | `pnpm sync:main` → manually merge the PR (version stays on main side, no publish) |
132
+ | Baseline sync | Automatic (CI pushes back after a main release); manual fallback: `git merge origin/main` on `feature` (take the main-side version) |
133
+ | Emergency manual release | `pnpm pre:enter-alpha && pnpm build && pnpm changeset publish` |
134
+
135
+ > Trusted Publishing / OIDC: no npm token is ever needed; branch protection, guard details and FAQ live in `.changeset/README.md`.
108
136
 
109
137
  ## Testing
110
138
 
@@ -114,10 +142,10 @@ Common commands:
114
142
 
115
143
  ## Build pipeline
116
144
 
117
- ```
145
+ ```text
118
146
  tsdown (build:source) → metadata extraction (build:metadata) → turbo build
119
147
  ```
120
148
 
121
149
  - **tsdown** produces the bundles and type declarations
122
- - **sync-entry.ts** (root postbuild) reads the runtime exports of utils / hooks from dist and writes `entry/metadata.json` and `entry/hooks-metadata.json`
123
- - In-repo tests (`test:types` / vitest) resolve the source directly via tsconfig `paths` and `resolve.alias` — no build needed before testing
150
+ - **syncEntry.ts** (root postbuild) reads the runtime exports of utils / hooks from dist and writes `entry/metadata.json` and `entry/hooks-metadata.json`
151
+ - In-repo tests (`test:types` / vitest) resolve the source directly via tsconfig `paths` and `resolve.alias` — no build needed before testing
package/README.md CHANGED
@@ -1,9 +1,13 @@
1
- # pawover-kit
1
+ <div align="center">
2
+ <img src="site/public/logo.svg" width="64" alt="pawover-kit logo">
3
+ <h1>pawover-kit</h1>
4
+ <p><b>简体中文</b> | <a href="README.en.md">English</a></p>
2
5
 
3
- [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
4
- [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
5
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
- [![Docs](https://img.shields.io/badge/docs-pawover--kit--docs-3B82F6.svg)](https://pawover.github.io/pawover-kit/)
6
+ [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
7
+ [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
8
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
+ [![Docs](https://img.shields.io/badge/docs-pawover--kit--docs-3B82F6.svg)](https://pawover.github.io/pawover-kit/)
10
+ </div>
7
11
 
8
12
  > 一个基于 TypeScript 的开源工具包合集:类型工具、静态工具类、React / Alova Hooks、ESLint 规则集与 Zod Schema,开箱即用、类型完备。
9
13
 
@@ -13,47 +17,45 @@ pawover-kit 是一个 pnpm 单体仓库(monorepo),由 5 个独立可发布
13
17
 
14
18
  ## 特性
15
19
 
16
- - **纯类型工具** `@pawover/kit-types`:无运行时代码,提供 `AnyObject`、`TreeLike`、`AnyFunction` 族、`AdvancedRecord`、`ApiNameCheck` 等常用类型
17
- - **静态工具类** `@pawover/kit-utils`:数组、字符串、对象、树、货币、日期、数学等 14+ 个工具类
18
- - **React / Alova Hooks** `@pawover/kit-hooks`:`useMount`、`useUnmount`、`useLatest`、`useResponsive`、`useTitle` 与 Alova 请求系列 Hooks
19
- - **ESLint 规则集** `@pawover/kit-eslint-rules`:9 大规则组(javascript / typescript / react / reactHooks / vue / stylistic / antfu / imports / importsSort)+ `GLOB_EXCLUDE` + `createRules`
20
- - **Zod v4 Schema** `@pawover/kit-zod`:id、string、number、boolean、bigint 等常用校验器
21
20
  - ESM / CJS 双格式产物,附带完整类型声明
22
21
  - `exports` 仅指向 `dist` 产物,任意工具链(node / vite / vitest / webpack 等)均可正常解析
23
22
 
24
- ## 包结构
23
+ ## 子包
25
24
 
26
- | 包 | 说明 | 导入路径 |
27
- | :--- | :--- | :--- |
28
- | `@pawover/kit-types` | 纯类型工具包(无运行时代码) | `@pawover/kit/types`,react 相关类型见 `@pawover/kit/types/react` |
29
- | `@pawover/kit-utils` | 静态工具类 | `@pawover/kit/utils`(另有 `./math`、`./vite` 子路径) |
30
- | `@pawover/kit-hooks` | React + Alova Hooks | `@pawover/kit/hooks/react`、`@pawover/kit/hooks/alova` |
31
- | `@pawover/kit-eslint-rules` | ESLint 规则集 | `@pawover/kit/eslint-rules` |
32
- | `@pawover/kit-zod` | Zod v4 Schema | `@pawover/kit/zod` |
25
+ | 包 | 说明 | 最新版本 | 下载量 |
26
+ | :-- | :-- | :-- | :-- |
27
+ | `@pawover/kit` | 聚合根包,重新导出所有子包 | [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit) |
28
+ | `@pawover/kit-types` | 纯类型工具包(无运行时代码) | [![npm version](https://img.shields.io/npm/v/@pawover/kit-types.svg)](https://www.npmjs.com/package/@pawover/kit-types) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-types.svg)](https://www.npmjs.com/package/@pawover/kit-types) |
29
+ | `@pawover/kit-utils` | 15+ 个静态工具类 | [![npm version](https://img.shields.io/npm/v/@pawover/kit-utils.svg)](https://www.npmjs.com/package/@pawover/kit-utils) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-utils.svg)](https://www.npmjs.com/package/@pawover/kit-utils) |
30
+ | `@pawover/kit-hooks` | React + Alova Hooks | [![npm version](https://img.shields.io/npm/v/@pawover/kit-hooks.svg)](https://www.npmjs.com/package/@pawover/kit-hooks) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-hooks.svg)](https://www.npmjs.com/package/@pawover/kit-hooks) |
31
+ | `@pawover/kit-eslint-rules` | ESLint 规则集(flat config) | [![npm version](https://img.shields.io/npm/v/@pawover/kit-eslint-rules.svg)](https://www.npmjs.com/package/@pawover/kit-eslint-rules) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-eslint-rules.svg)](https://www.npmjs.com/package/@pawover/kit-eslint-rules) |
32
+ | `@pawover/kit-zod` | Zod v4 校验器 | [![npm version](https://img.shields.io/npm/v/@pawover/kit-zod.svg)](https://www.npmjs.com/package/@pawover/kit-zod) | [![npm downloads](https://img.shields.io/npm/dm/@pawover/kit-zod.svg)](https://www.npmjs.com/package/@pawover/kit-zod) |
33
33
 
34
- > [!NOTE]
35
- > `@pawover/kit-hooks` 的根导出为空,请始终从 `@pawover/kit/hooks/react``@pawover/kit/hooks/alova` 子路径导入。
34
+ <blockquote style="background: rgba(9, 105, 218, 0.05); border-left: 4px solid #0969da; border-radius: 6px; padding: 12px 16px;">
35
+ <b>📝 注意</b>:<code>@pawover/kit-hooks</code> 的根导出为空,请始终从 <code>@pawover/kit/hooks/react</code><code>@pawover/kit/hooks/alova</code> 子路径导入。
36
+ </blockquote>
36
37
 
37
38
  ## 安装
38
39
 
39
40
  使用根包聚合导入:
40
41
 
41
42
  ```bash
42
- npm install @pawover/kit
43
+ pnpm add @pawover/kit
43
44
  ```
44
45
 
45
46
  或按需安装单个子包:
46
47
 
47
48
  ```bash
48
- npm install @pawover/kit-types
49
- npm install @pawover/kit-utils
50
- npm install @pawover/kit-hooks
51
- npm install @pawover/kit-eslint-rules
52
- npm install @pawover/kit-zod
49
+ pnpm add @pawover/kit-types
50
+ pnpm add @pawover/kit-utils
51
+ pnpm add @pawover/kit-hooks
52
+ pnpm add @pawover/kit-eslint-rules
53
+ pnpm add @pawover/kit-zod
53
54
  ```
54
55
 
55
- > [!WARNING]
56
- > `alova`、`mathjs`、`react`、`vite`、`zod` 为可选 peer 依赖:使用对应功能前需自行安装(如使用 `@pawover/kit/hooks/alova` 需要 `alova``react`)。
56
+ <blockquote style="background: rgba(191, 135, 16, 0.05); border-left: 4px solid #bf870f; border-radius: 6px; padding: 12px 16px;">
57
+ <b>⚠️ 警告</b>:<code>alova</code>、<code>mathjs</code>、<code>react</code>、<code>vite</code>、<code>zod</code> 为可选 peer 依赖:使用对应功能前需自行安装(如使用 <code>@pawover/kit/hooks/alova</code> 需要 <code>alova</code><code>react</code>)。
58
+ </blockquote>
57
59
 
58
60
  ## 快速开始
59
61
 
@@ -103,19 +105,19 @@ pnpm install
103
105
 
104
106
  | 命令 | 说明 |
105
107
  | :--- | :--- |
106
- | `pnpm test` | vitest 全量运行(801 条测试 / 31 个文件,node + jsdom 双环境) |
108
+ | `pnpm test` | vitest 全量运行(814 条测试 / 31 个文件,node + jsdom 双环境) |
107
109
  | `pnpm test:types` | 测试文件的类型检查 |
108
110
  | `pnpm test:ci` | 完整 CI 流程:类型检查 → 测试 → 构建 → 冒烟 → pack 检查 |
109
111
  | `pnpm build` | turbo 构建全部子包(tsdown 生成 ESM/CJS 双格式与类型声明) |
110
112
  | `pnpm check` | 并行运行 types / eslint / format 检查 |
111
- | `pnpm docs:dev` | 本地预览文档站(VitePress,源码见 `docs/`) |
113
+ | `pnpm docs:dev` | 本地预览文档站(VitePress,源码见 `site/`) |
112
114
  | `pnpm docs:gen` | 从源码 JSDoc 重新生成 API 参考页(改源码注释后需重新生成) |
113
115
 
114
116
  ## 发布
115
117
 
116
118
  由 Changesets v3 + GitHub Actions 驱动的**双通道发布模型**(完整细节见 [.changeset/README.md](./.changeset/README.md)):
117
119
 
118
- - **feature = alpha 预发布通道**:push feature 全自动——CI 守卫(`verify-release-plan.mjs`)→ select-mode → version PR → version job 等 CI 绿后合并 → dispatch 触发 publish,发布 `alpha` dist-tag
120
+ - **feature = alpha 预发布通道**:push feature 全自动——CI 守卫(`verifyReleasePlan.ts`)→ select-mode → version PR → version job 等 CI 绿后合并 → dispatch 触发 publish,发布 `alpha` dist-tag
119
121
  - **main = 正式版通道**:只通过**发布合并**收代码——`pnpm release:merge`(同步校验 → 剥离 prerelease → 防撞车校验 → 建 release-main PR)→ **人工合并 PR**(正式版发布的人工确认节点)→ 发布 `latest` → CI 自动把稳定版版本号回推 feature(基线同步,下一轮 alpha 从新稳定版之上递增)
120
122
  - **核心设计**:alpha → 正式版之间必须经过人工确认节点,任何自动化都不会越过它
121
123
 
@@ -126,6 +128,7 @@ pnpm install
126
128
  | 写变更说明 | `pnpm changeset` |
127
129
  | 发布 alpha(自动) | `git push origin feature` |
128
130
  | 发起正式版发布(人工闸门) | `pnpm release:merge` → 人工合并 PR |
131
+ | 非发布内容同步到 main | `pnpm sync:main` → 人工合并 PR(版本保持 main 侧,不触发发布) |
129
132
  | 基线同步 | 自动(main 发布后 CI 回推);手动兜底:feature 上 `git merge origin/main`(取 main 侧版本) |
130
133
  | 应急手动发布 | `pnpm pre:enter-alpha && pnpm build && pnpm changeset publish` |
131
134
 
@@ -139,10 +142,10 @@ pnpm install
139
142
 
140
143
  ## 构建流水线
141
144
 
142
- ```
145
+ ```text
143
146
  tsdown (build:source) → metadata 提取 (build:metadata) → turbo build
144
147
  ```
145
148
 
146
149
  - **tsdown** 负责打包与类型声明生成
147
- - **sync-entry.ts**(根 postbuild)读取 utils / hooks 的 dist 导出名,生成 `entry/metadata.json` 与 `entry/hooks-metadata.json`
148
- - 仓库内测试(`test:types` / vitest)经 tsconfig `paths` 与 `resolve.alias` 直查源码,改源码无需先构建
150
+ - **syncEntry.ts**(根 postbuild)读取 utils / hooks 的 dist 导出名,生成 `entry/metadata.json` 与 `entry/hooks-metadata.json`
151
+ - 仓库内测试(`test:types` / vitest)经 tsconfig `paths` 与 `resolve.alias` 直查源码,改源码无需先构建
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/pawover"
7
7
  },
8
8
  "description": "一个基于 TypeScript 的开发工具包",
9
- "version": "1.0.0-alpha.0",
9
+ "version": "1.0.1-alpha.0",
10
10
  "type": "module",
11
11
  "engines": {
12
12
  "node": ">=22.20.0"
@@ -158,33 +158,33 @@
158
158
  "./metadata.json": "./entry/metadata.json"
159
159
  },
160
160
  "dependencies": {
161
- "@pawover/kit-eslint-rules": "0.0.5-alpha.0",
162
- "@pawover/kit-types": "0.0.4",
163
- "@pawover/kit-utils": "1.0.0-alpha.0",
161
+ "@pawover/kit-hooks": "0.0.8",
162
+ "@pawover/kit-utils": "1.0.0",
164
163
  "@pawover/kit-zod": "0.0.4",
165
- "@pawover/kit-hooks": "0.0.8-alpha.0"
164
+ "@pawover/kit-eslint-rules": "0.0.6-alpha.0",
165
+ "@pawover/kit-types": "0.0.4"
166
166
  },
167
167
  "devDependencies": {
168
168
  "@arethetypeswrong/cli": "^0.18.5",
169
- "@changesets/cli": "^3.0.0",
170
- "@commitlint/cli": "^21.2.1",
171
- "@commitlint/config-conventional": "^21.2.0",
172
- "@eslint-react/eslint-plugin": "^5.18.3",
169
+ "@changesets/cli": "^3.0.1",
170
+ "@commitlint/cli": "^21.2.2",
171
+ "@commitlint/config-conventional": "^21.2.2",
172
+ "@eslint-react/eslint-plugin": "^5.18.6",
173
173
  "@fontsource/ibm-plex-mono": "^5.3.0",
174
174
  "@playwright/test": "^1.62.1",
175
- "@stylistic/eslint-plugin": "^6.0.0-beta.5",
175
+ "@stylistic/eslint-plugin": "^6.0.0-beta.6",
176
176
  "@testing-library/react": "^16.3.2",
177
177
  "@types/fs-extra": "^11.0.4",
178
178
  "@types/node": "^26.2.0",
179
179
  "@types/react": "^19.2.18",
180
- "@vitejs/plugin-react": "^6.0.5",
181
- "@vitest/browser-playwright": "^4.1.10",
182
- "@vitest/coverage-v8": "^4.1.10",
183
- "alova": "^3.5.1",
180
+ "@vitejs/plugin-react": "^6.1.0",
181
+ "@vitest/browser-playwright": "^4.1.11",
182
+ "@vitest/coverage-v8": "^4.1.11",
183
+ "alova": "^3.5.5",
184
184
  "commitizen": "^4.3.2",
185
185
  "cross-env": "^10.1.0",
186
186
  "cz-customizable": "^7.5.4",
187
- "eslint": "^10.8.1",
187
+ "eslint": "^10.9.0",
188
188
  "eslint-plugin-antfu": "^3.2.3",
189
189
  "eslint-plugin-import-lite": "^0.6.0",
190
190
  "eslint-plugin-react-hooks": "^7.1.1",
@@ -196,17 +196,18 @@
196
196
  "prettier": "^3.9.6",
197
197
  "react-dom": "19.2.6",
198
198
  "rimraf": "^6.1.3",
199
+ "rollup-plugin-visualizer": "^7.1.1",
199
200
  "tsdown": "^0.22.14",
200
- "turbo": "^2.10.9",
201
+ "turbo": "^2.10.11",
201
202
  "typedoc": "^0.28.20",
202
203
  "typedoc-plugin-markdown": "^4.12.0",
203
204
  "typescript": "^6.0.3",
204
205
  "typescript-eslint": "^8.67.0",
205
206
  "vitepress": "^1.6.4",
206
- "vitest": "^4.1.10"
207
+ "vitest": "^4.1.11"
207
208
  },
208
209
  "peerDependencies": {
209
- "alova": "^3.5.1",
210
+ "alova": "^3.5.5",
210
211
  "mathjs": "^15.0.0",
211
212
  "react": "^19.2.0",
212
213
  "vite": "^7 || ^8",
@@ -247,29 +248,31 @@
247
248
  "test:unit": "vitest run test/unit",
248
249
  "test:integration": "vitest run test/integration",
249
250
  "test:types": "tsc -p test/tsconfig.json --noEmit",
250
- "test:smoke": "node test/scripts/smoke.mjs",
251
+ "test:smoke": "node test/scripts/smoke.ts",
251
252
  "test:ci": "pnpm test:types && pnpm test && pnpm build && pnpm test:smoke && pnpm check:pack",
252
- "postbuild": "node scripts/sync-entry.ts",
253
+ "postbuild": "node scripts/syncEntry.ts",
253
254
  "build": "turbo build",
255
+ "build:analyze": "cross-env VISUALIZER=1 turbo build",
254
256
  "build:force": "turbo build --force",
255
257
  "build:package": "turbo build:package && pnpm package",
256
258
  "build:package:force": "turbo build:package --force && pnpm package",
257
259
  "package": "pnpm pack",
258
260
  "public": "turbo build && pnpm publish --access public",
259
261
  "changeset": "changeset",
260
- "ci:version": "pnpm changeset version && node scripts/bump-root.mjs && node scripts/verify-release.mjs && pnpm install",
262
+ "ci:version": "pnpm changeset version && node scripts/bumpRoot.ts && node scripts/verifyRelease.ts && pnpm install",
261
263
  "pre:enter-alpha": "pnpm changeset pre enter alpha",
262
264
  "pre:exit": "pnpm changeset pre exit",
263
- "release:merge": "node scripts/release-merge.mjs",
264
- "docs:dev": "vitepress dev docs",
265
- "docs:build": "vitepress build docs",
266
- "docs:preview": "vitepress preview docs",
267
- "docs:gen": "node scripts/generate-docs.mjs",
265
+ "release:merge": "node scripts/releaseMerge.ts",
266
+ "sync:main": "node scripts/syncMain.ts",
267
+ "docs:dev": "vitepress dev site",
268
+ "docs:build": "vitepress build site",
269
+ "docs:preview": "vitepress preview site",
270
+ "docs:gen": "node scripts/generateDocs.ts",
268
271
  "check": "pnpm check:types & pnpm check:eslint & pnpm check:format",
269
272
  "check:types": "tsc --noEmit",
270
273
  "check:eslint": "eslint --fix \"**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx,vue}\" --cache-location=.cache/eslint.cache.json --cache",
271
274
  "check:format": "prettier --write \"**/*.{html,json,jsonc}\" --cache-location=.cache/prettier.cache.json --cache",
272
- "check:pack": "cross-env HUSKY=0 node scripts/check-pack.mjs",
275
+ "check:pack": "cross-env HUSKY=0 node scripts/checkPack.ts",
273
276
  "clean": "pnpm clean:cache & pnpm clean:lib & pnpm clean:output",
274
277
  "clean:turbo": "rimraf -g **/.turbo",
275
278
  "clean:cache": "rimraf -g .cache",