Repository navigation
fix(cli): os create --in-repo scaffolds extend tsconfig.base.json - #26331
Conversation
The in-repo plugin template extended the root tsconfig.json, which is the type-check program for scripts/ and excludes packages/apps/examples/ui relative to the root. A scaffold under packages/plugins/ inherited that exclude, matched none of its own src/, and tsc stopped with TS18003. Rename rootTsconfigExtends to baseTsconfigExtends, derive the ascent to tsconfig.base.json, and give the template the sibling shape: types node and its own exclude. Claude-Session: https://claude.ai/code/session_01B9rx6JYFJTqGy5tXRwwRfM Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B9rx6JYFJTqGy5tXRwwRfM Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 31 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 3b5d99d81bf917862d663e5f4658b1dc36bdc3be && git checkout 3b5d99d81bf917862d663e5f4658b1dc36bdc3be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 46255b19842480a4f5e4a2556ae9f2e0764c9943 e4865e1af2cfcbf3626f0b43a0c90e51bcac0cc5 && git checkout -B drift-repro 46255b19842480a4f5e4a2556ae9f2e0764c9943 && git merge --no-ff e4865e1af2cfcbf3626f0b43a0c90e51bcac0cc5
node scripts/docs-audit/affected-docs.mjs --json 46255b19842480a4f5e4a2556ae9f2e0764c9943
|
席位核对 · ACCEPT · devx seat 2 · 2026-10-26T21:24ZSeat
Generated by Claude Code |
Requested by Steve · project thread
Fixes #26209
Clause-②: no
Metadata-protocol: none
What
os create plugin NAME --in-repowrote atsconfig.jsonthat extended the monorepo roottsconfig.json. Since #26203 that root file is the type-check program forscripts/, and itsexclude(packages,apps,examples,ui) resolves against the root. The scaffold declaredincludebut noexclude, so it inherited that list and matched none of its ownsrc/.rootTsconfigExtendsis renamedbaseTsconfigExtendsand now derives the ascent totsconfig.base.json(call site in the plugin template updated).packages/plugins/plugin-emailis the reference):types: ["node"]and its ownexclude: ["dist", "node_modules"]..changeset/entry:@objectstack/clipatch.Measured
Before, on
origin/main817cb89 (scaffolded withpackages/cli/bin/run-dev.js create plugin probe26209 --in-repo, thentsc --listFilesOnly -p tsconfig.jsonin the scaffold, tsc 6.0.3):So the inherited
excludedropped the scaffold's wholesrc/, and the template now carries its ownexclude.After, on this branch (same scaffold command):
tsc --showConfigof the scaffold againstpackages/plugins/plugin-email, keys compared one by one: the only difference isfiles(2 files against 59, each package's ownsrc/).compilerOptions,includeandexcludeare byte-equal after showConfig's path normalisation (outDir./dist,rootDir./srcon both). That is inside the card's allowance (include,outDir,rootDir).Tests
packages/cli/test/create.test.ts: the in-repoextendsarithmetic now resolves totsconfig.base.json; a new case pins that the template extends the base (never the root program), ownsexclude: ["dist", "node_modules"]and declarestypes: ["node"]; the function test follows the rename.packages/cli/test/init-template-comments-self-contained.test.ts: comment only, the renamed function and the measured in-repo value; it carries no assertion on the target.scripts/ablation-replace.mjsreverted the ascent target totsconfig.json;create.test.tswent red on 3 cases (the arithmetic, the new base pin, the function test), and the restore was byte-identical to HEAD (git diff HEADempty).pnpm --filter @objectstack/cli exec vitest run --project unit: 332/334 files on the first pass; the 2 red files (published-subpath-console.pin,published-subpath-hook-body.pin) refused becausepackages/cli/distwas not built yet. After a fullpnpm build(119/119 tasks) those two plus both touched files: 4/4 files, 84/84 tests.pnpm --filter @objectstack/cli typecheck: exit 0.node scripts/pm/dispatch-gates.mjs --commandsderived 67 families at e4865e1; all 67 run with exit codes recorded,--ranreconciliation: 0 NOT-MEASURED.check-plugin-teardown-shape --self-testfirst exited 3 (shallow clone could not read its pinned fixture commit); after fetching that commit it exited 0. TheintegrationCLI tier andtest:repoare left to CI.Acceptance notes
src/, but its ownpnpm typecheckandpnpm buildare still red on two things this PR does not change (both were hidden behind TS18003 before):Invalid value for '--ignoreDeprecations': the in-repopackage.jsondeclarestypescriptSCAFFOLD_TYPESCRIPT_RANGE(^5.3.0, resolves to 5.9.3), whiletsconfig.base.jsonsetsignoreDeprecations: "6.0", which only TypeScript 6 accepts. Siblings declare^6.0.3. The range is a deliberate scaffold policy ininit.ts, so it is reported, not changed here.'context' is declared but its value is never readin the emittedsrc/index.ts, under the base'snoUnusedParameters: true(measured with the workspace tsc 6.0.3).Both are reported to the seat for a follow-up card. cli(create --in-repo): in-repo scaffolds extend the root tsconfig.json, which becomes the scripts/ program, and inherit its exclude of packages/apps/examples #26209 is not blocked by them: its acceptance diff (
showConfigagainst a sibling) holds.check:type-check-debtprints a surplus of 26 below the root ledger entry's ceiling; that entry is not touched here.origin/mainmoved 11 commits since the branch point, touching otherpackages/clifiles but none of this diff's;git merge-treeis clean. Not merged in.Generated by Claude Code