my-code-style 1.7.0 → 1.7.1
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/CHANGELOG.md +5 -5
- package/README.md +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
## 变更日志
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### [1.7.1](https://github.com/myvn/codeStyle/compare/v1.7.0...v1.7.1) (2026-09-20)
|
|
4
4
|
|
|
5
|
+
## [1.7.0](https://github.com/myvn/codeStyle/compare/v1.6.1...v1.7.0) (2026-09-20)
|
|
5
6
|
|
|
6
7
|
### 🐛 Bug Fixes | Bug 修复
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
- **deps:** stylelint 生态 peer 放宽到 16/17 两条线,并补 Stylelint 17 运行时回归 ([a230edc](https://github.com/myvn/codeStyle/commit/a230edcae73d2b935977567b8f082aaaa74dc938))
|
|
10
10
|
|
|
11
11
|
### ✨ Features | 新功能
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
- **init:** 依赖版本体检 —— 已装但版本不匹配、上游配置 peer 冲突、parser 错位 ([2820834](https://github.com/myvn/codeStyle/commit/2820834bc3062900724132f7b29c2581eace13e8))
|
|
14
|
+
- **init:** 版本体检精确到 minor —— 只比主版本会漏掉 10.2.0 vs ^10.3.0 ([d13629c](https://github.com/myvn/codeStyle/commit/d13629c947575109ed3319854ab902e5caada145))
|
|
15
15
|
|
|
16
16
|
### [1.6.1](https://github.com/myvn/codeStyle/compare/v1.6.0...v1.6.1) (2026-09-18)
|
|
17
17
|
|
package/README.md
CHANGED
|
@@ -341,6 +341,29 @@ npm run test:all -- --profile # 看每个测试文件耗时,定位瓶颈
|
|
|
341
341
|
|
|
342
342
|
未安装隔离运行环境时,对应套件会明确标记"未运行"并给出 setup 命令,退出码为 1(不会假装全绿)。
|
|
343
343
|
|
|
344
|
+
## 发布(维护者)
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
npm run release # standard-version:按 conventional commits 决定版本号,更新 CHANGELOG,提交并打 tag
|
|
348
|
+
npm run release:push # release + git push --follow-tags(推 tag 即触发发布工作流)
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
`.github/workflows/publish.yml` 只接受 **`v*` tag** 触发(`workflow_dispatch` 会先校验 ref,分支上手动触发直接失败),并且在测试全绿 + `npm pack --dry-run` 通过后才发布;发布步骤失败即失败,不做静默降级。
|
|
352
|
+
|
|
353
|
+
### 发布凭据(推荐切到 Trusted Publishing)
|
|
354
|
+
|
|
355
|
+
工作流默认按 **npm Trusted Publishing(OIDC)→ `NPM_TOKEN`** 的顺序取凭据:`NPM_TOKEN` secret 存在时用 token,删掉后**无需改代码**自动改走 OIDC。切换步骤:
|
|
356
|
+
|
|
357
|
+
1. 打开 `https://www.npmjs.com/package/my-code-style/access` → Trusted Publisher → GitHub Actions,填:
|
|
358
|
+
- Organization or user:`myvn`
|
|
359
|
+
- Repository:`codeStyle`
|
|
360
|
+
- Workflow filename:`publish.yml`(大小写与 `.yml` 后缀都要精确匹配)
|
|
361
|
+
- Environment:`npm-publish`(与本仓库 Environments 里的名字一致)
|
|
362
|
+
2. 仓库 Settings → Environments → `npm-publish` 添加 **required reviewers**(发布前人工批准;不配则该环境无保护)。
|
|
363
|
+
3. 在 GitHub 仓库 Settings → Secrets 删除 `NPM_TOKEN`,并到 npm 账号下吊销对应 token。
|
|
364
|
+
|
|
365
|
+
OIDC 要求发布环境是 GitHub-hosted runner + `id-token: write` + npm CLI ≥ 11.5.1(工作流用 Node 24 自带),因此 `setup-node` **刻意不写 `registry-url`**——那会生成带 `_authToken` 的 `.npmrc`,让 npm 以为认证已就绪而跳过 OIDC。
|
|
366
|
+
|
|
344
367
|
## License
|
|
345
368
|
|
|
346
369
|
MIT
|
package/package.json
CHANGED