nuxt-imc 0.1.0 → 0.1.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.md +24 -0
- package/dist/module.json +1 -1
- package/package.json +18 -15
package/README.md
CHANGED
|
@@ -147,6 +147,30 @@ pnpm prepack
|
|
|
147
147
|
|
|
148
148
|
`playground/` 用于交互开发,`test/fixtures/basic/` 用于真实 Nuxt SSR 集成测试。
|
|
149
149
|
|
|
150
|
+
## 自动发布
|
|
151
|
+
|
|
152
|
+
发布流程由 [`.github/workflows/release.yml`](./.github/workflows/release.yml) 负责。推送形如 `v0.1.1` 的 tag 后,GitHub Actions 会:
|
|
153
|
+
|
|
154
|
+
1. 校验 tag 与 `package.json` 版本完全一致。
|
|
155
|
+
2. 运行 lint、测试、类型检查和 peer dependency 检查。
|
|
156
|
+
3. 构建模块并通过 npm Trusted Publishing 发布带 provenance 的包。
|
|
157
|
+
|
|
158
|
+
首次使用前,需要在 npm 的 `nuxt-imc` package settings 中添加 GitHub Actions Trusted Publisher:
|
|
159
|
+
|
|
160
|
+
- Organization or user: `hzgotb`
|
|
161
|
+
- Repository: `nuxt-imc`
|
|
162
|
+
- Workflow filename: `release.yml`
|
|
163
|
+
- Environment: 留空
|
|
164
|
+
- Allowed actions: 勾选 `npm publish`
|
|
165
|
+
|
|
166
|
+
日常发布时,先确保功能代码已经提交且工作区干净,然后运行:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pnpm release
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`changelogen` 会根据 conventional commits 更新版本和 `CHANGELOG.md`,创建 release commit 与对应的 `vX.Y.Z` tag,并推送到 GitHub。npm 发布只在 GitHub Actions 中执行,本地不再需要 npm OTP。
|
|
173
|
+
|
|
150
174
|
## License
|
|
151
175
|
|
|
152
176
|
[MIT](./LICENSE)
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-imc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Register named component-library exports as Nuxt components and auto-imported composables.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "github
|
|
7
|
+
"url": "git+https://github.com/hzgotb/nuxt-imc.git"
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://github.com/hzgotb/nuxt-imc#readme",
|
|
10
10
|
"bugs": "https://github.com/hzgotb/nuxt-imc/issues",
|
|
@@ -40,6 +40,20 @@
|
|
|
40
40
|
"workspaces": [
|
|
41
41
|
"playground"
|
|
42
42
|
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"prepack": "nuxt-module-build build",
|
|
45
|
+
"dev": "pnpm dev:prepare && nuxt dev playground",
|
|
46
|
+
"dev:build": "nuxt build playground",
|
|
47
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
48
|
+
"lint": "eslint .",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:peers": "pnpm peers check",
|
|
51
|
+
"test:unit": "vitest run test/helper.test.ts",
|
|
52
|
+
"test:watch": "vitest watch",
|
|
53
|
+
"test:types": "vue-tsc --noEmit && pnpm --dir playground exec vue-tsc --noEmit",
|
|
54
|
+
"release": "pnpm lint && pnpm test && pnpm test:types && pnpm test:peers && changelogen --release --push --clean",
|
|
55
|
+
"release:check": "node scripts/check-release-tag.mjs"
|
|
56
|
+
},
|
|
43
57
|
"dependencies": {
|
|
44
58
|
"@nuxt/kit": "^4.5.0",
|
|
45
59
|
"oxc-parser": "^0.141.0"
|
|
@@ -61,16 +75,5 @@
|
|
|
61
75
|
"engines": {
|
|
62
76
|
"node": ">=20.19.0"
|
|
63
77
|
},
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
"dev:build": "nuxt build playground",
|
|
67
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
68
|
-
"lint": "eslint .",
|
|
69
|
-
"test": "vitest run",
|
|
70
|
-
"test:peers": "pnpm peers check",
|
|
71
|
-
"test:unit": "vitest run test/helper.test.ts",
|
|
72
|
-
"test:watch": "vitest watch",
|
|
73
|
-
"test:types": "vue-tsc --noEmit && pnpm --dir playground exec vue-tsc --noEmit",
|
|
74
|
-
"release": "pnpm lint && pnpm test && pnpm test:types && pnpm prepack && changelogen --release && pnpm publish && git push --follow-tags"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
78
|
+
"packageManager": "pnpm@11.10.0"
|
|
79
|
+
}
|