Feat/cli generator batches#26
Merged
Merged
Conversation
vite-plugin-dts 的 types 产物目录不被 vite 构建清空,残留旧 d.ts。 为 14 个 vite-dts 包补 rimraf 依赖,并在 prebuild 前缀 rimraf types。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
build 重新生成已提交的 components.d.ts/auto-imports.d.ts 会弄脏工作树, 致 lerna publish 因未提交变更中止。dirty 仅限 *.d.ts 则回退,否则报错退出。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lodash.template 的 ^4.5.0 会让全新安装浮到坏掉的 4.18.0(引用未定义的 assignWith → ReferenceError),导致 npx create-done-coding 编译模板时崩溃。 仓库 lockfile 锁住 4.5.0 故本地无感,但发布包不带 lockfile,消费者 npx 安装即中招。改钉 lodash.template=4.5.0、lodash.assign=4.2.0(均自包含且已实测)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
与全局 ~/.claude 版本对齐:补「本机有全局 done-coding 则优先、npx 发布版可能报 assignWith 改用全局」的调用入口说明。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
initial 默认值现会用「globalEnvData + extraEnvData」(即 create 注入的 $projectName
等 100% 必然存在的内置变量) 渲染,故 initial 可写 ${$projectName} 让包名等默认取
项目名。仅对含 ${ 的 initial 渲染,纯字符串原样放过;[MUST NOT] 引用用户答案。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
单趟有序循环 + 累积式上下文:第 N 个问题的 initial 渲染上下文 = 内置(extraEnvData) + 全局(globalEnvData) + 前序已答变量(collectEnvData), 优先级 内置 > 前序答案 > 全局。约束:仅能引用前面出现的变量(有序循环 天然挡自引用/向后引用);引用不存在变量 fail-fast,明确指出是哪个 key 的 initial 引用了缺失变量;交互/非交互共用同一 resolveInitial。 e2e 覆盖:内置 $projectName / 前序答案(含链式) / 全局变量三来源、显式覆盖、 坏引用 fail-fast、向后引用被拒。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cli-generator(gen/assemble) 程序落地配套:测试夹具落临时目录隔离、 Bash 沙盒模式、vitest 对齐、gen 逐字节/assemble 漂移闸回归基准。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
回应模板 hub 引擎反馈:强制渲染一切违 content-free 定位,制造 ${}/<%/CRLF 三症状。
R1:addFragment render?:boolean 默认 false=原样字节(不渲染/不 normalizeEol/保 CRLF)。
recipe 级 render 默认 + op>recipe>false;validateRecipe 同步解析;render:true 保旧行为。
R2:resolveMode 默认保源 mode(修 husky 0755 失效),限 file/deref-file。
R3:walkDir 区分源本空(保真产 dir) vs exclude 滤空(不产壳)。
e2e 补 raw 字节保真 spawn-bin 用例 + beforeAll 总 build 封 stale 假绿。
R4(delete 识别 dir-spread) 降级 fast-follow。codex 设计审+终审+复验三道通过;315 测试绿。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
配置布局新规范 <cwd>/.done-coding/<cliName>/<feature>/,cwd-only 不向上搜。 recipeDir/fragmentRoot/manifestPath 三常量迁到 .done-coding/generator/assemble/。 破坏性:未发布、唯一消费方本地,无兼容旧 assemble/ 与 .assemble/ 双位。 gen 批次层不动;约定写入 CLAUDE.md;codex 复核通过;315 测试绿。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
async 函数 body return 值应为解析值类型而非整个 Promise;undefined 断言到 Awaited<GetAnswerResult> 与其它分支(靠 async 自动包裹)对齐。运行时不变(仍返回 undefined)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
codex 验收挑出:walkDir 的 relUnderRoot!="" guard 把根即空排除, op.source 自身为空目录时不 emitEmptyDir,违反 R3「源本空保真产 dir」契约 (此前测试只覆盖子目录空)。放开根 guard + emitEmptyDir 根 target 直接用 destRoot(避免 joinRel 产畸形 destRoot/,VFS 虽归一仍防御性显式)。补 2 测试 (默认 keep 产出 + skip 反向不产)。generator 331 全绿。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rebase 到 master 期间,component 由胖包(cli-template+lodash)改为薄包(cli-generator)、 mcp 接 cli-generator、template lodash 钉版,并吸收 master 的版本 bump(cli-utils 0.11.0 等), lockfile 经 pnpm install --lockfile-only 重新解析以保持一致。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 兄弟 monorepo 统一 __tests__ 约定,且视觉区分非源码 - 同步 6 个 vitest.config include: test/** → __tests__/** - .eslintrc / .prettierignore 的 golden 忽略路径跟随改名: test/golden → __tests__/golden(golden 是逐字节夹具,须免 lint --fix / prettier 破坏) 顺带删原 ignorePatterns 死模式 __test__(单数,匹配 0 文件) 注:未扩大忽略范围、未动任何 lint rule——普通测试文件仍在原有 lint 域 - cli-skills/ai/mrm 的 vite.config dts exclude 早已按 __tests__ 写,本次令其名实相符 - 共 62 文件 git rename(历史保留),golden 字节原样保留 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rebase 解冲突时 git checkout --theirs + pnpm install --lockfile-only 残留旧 pnpm 的 陈旧 lockfile(结构+单引号格式均 off 当前 pnpm 10.33 / master)。CI 步骤6 pnpm install 会重生成它 → 步骤7 git diff dirty 闸抓到 → 'unexpected non-d.ts dirty files' 退出 1。 本次用当前 pnpm(==CI 钉的 10.33.0) 全量 install 重生成(双引号、prettier 通过、对齐 master),连跑两次幂等 → CI install 产出相同,dirty 闸通过。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.