@pawover/kit 0.7.0 → 0.8.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.
- package/README.md +22 -0
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -106,6 +106,28 @@ pnpm install
|
|
|
106
106
|
| `pnpm build` | turbo 构建全部子包(tsdown 生成 ESM/CJS 双格式与类型声明) |
|
|
107
107
|
| `pnpm check` | 并行运行 types / eslint / format 检查 |
|
|
108
108
|
|
|
109
|
+
## 发布
|
|
110
|
+
|
|
111
|
+
发布由 [Changesets](https://changesets.dev) + GitHub Actions 全自动驱动,无需手动登录 npm 或运行发布命令。
|
|
112
|
+
|
|
113
|
+
**日常流程**:改动代码后运行 `pnpm changeset`,按提示选择受影响的包与版本级别并填写变更说明,将生成的 `.changeset/*.md` 随 PR 一起提交。合并到 `main` 后:
|
|
114
|
+
|
|
115
|
+
1. CI 自动创建 / 更新 **Version Packages** PR(内含各包版本号与 CHANGELOG)
|
|
116
|
+
2. 合并该 PR 后自动构建,并按拓扑序发布(`types` / `zod` / `eslint-rules` → `utils` → `hooks` → 根包 `@pawover/kit`)
|
|
117
|
+
3. 自动打 git tag 并生成 GitHub Release
|
|
118
|
+
|
|
119
|
+
**版本策略**:各包独立版本。子包版本变化时,依赖它的包(含根包)自动随同提升——任何子包发布必伴随根包发布(CI 有硬校验守卫)。
|
|
120
|
+
|
|
121
|
+
**当前阶段**:处于 alpha pre 模式,所有包以 `X.Y.Z-alpha.N` 发布到 `alpha` dist-tag。转正时运行 `pnpm pre:exit` 并删除 CI 中的 `NPM_CONFIG_TAG` 环境变量。
|
|
122
|
+
|
|
123
|
+
**应急手动发布**(一般不使用):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pnpm build && pnpm postbuild # 构建并同步 entry/metadata.json
|
|
127
|
+
pnpm publish --access public --tag alpha # 根包
|
|
128
|
+
pnpm --filter @pawover/kit-types public # 单个子包
|
|
129
|
+
```
|
|
130
|
+
|
|
109
131
|
## 测试
|
|
110
132
|
|
|
111
133
|
- **单元测试**:vitest 双项目(node 环境覆盖 utils / zod / eslint-rules,jsdom 环境覆盖 hooks)
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/pawover"
|
|
7
7
|
},
|
|
8
8
|
"description": "一个基于 TypeScript 的开发工具包",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.8.0",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=22.20.0"
|
|
@@ -160,11 +160,12 @@
|
|
|
160
160
|
"dependencies": {
|
|
161
161
|
"@pawover/kit-eslint-rules": "0.0.0-alpha.3",
|
|
162
162
|
"@pawover/kit-hooks": "0.0.0-alpha.3",
|
|
163
|
-
"@pawover/kit-utils": "0.0.0-alpha.3",
|
|
164
163
|
"@pawover/kit-types": "0.0.0-alpha.3",
|
|
164
|
+
"@pawover/kit-utils": "0.0.0-alpha.3",
|
|
165
165
|
"@pawover/kit-zod": "0.0.0-alpha.3"
|
|
166
166
|
},
|
|
167
167
|
"devDependencies": {
|
|
168
|
+
"@changesets/cli": "^3.0.0",
|
|
168
169
|
"@commitlint/cli": "^21.2.1",
|
|
169
170
|
"@commitlint/config-conventional": "^21.2.0",
|
|
170
171
|
"@eslint-react/eslint-plugin": "^5.18.2",
|
|
@@ -222,6 +223,9 @@
|
|
|
222
223
|
"optional": true
|
|
223
224
|
}
|
|
224
225
|
},
|
|
226
|
+
"publishConfig": {
|
|
227
|
+
"access": "public"
|
|
228
|
+
},
|
|
225
229
|
"config": {
|
|
226
230
|
"commitizen": {
|
|
227
231
|
"path": "node_modules/cz-customizable"
|
|
@@ -246,6 +250,11 @@
|
|
|
246
250
|
"build:package:force": "turbo build:package --force && pnpm package",
|
|
247
251
|
"package": "pnpm pack",
|
|
248
252
|
"public": "turbo build && pnpm publish --access public",
|
|
253
|
+
"changeset": "changeset",
|
|
254
|
+
"ci:version": "pnpm changeset version && pnpm install",
|
|
255
|
+
"ci:publish": "pnpm build && pnpm changeset publish",
|
|
256
|
+
"pre:enter-alpha": "pnpm changeset pre enter alpha",
|
|
257
|
+
"pre:exit": "pnpm changeset pre exit",
|
|
249
258
|
"check": "pnpm check:types & pnpm check:eslint & pnpm check:format",
|
|
250
259
|
"check:types": "tsc --noEmit",
|
|
251
260
|
"check:eslint": "eslint --fix \"**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx,vue}\" --cache-location=.cache/eslint.cache.json --cache",
|