Repository navigation
fix(config): describe config paths as relative to the working directory (TSK-110) - #38
Merged
Merged
Conversation
…ry (TSK-110) The config JSON Schema and the config docs said sources and dir are relative to the config file, but svgworm resolves them, and outDir and moduleDir, against the working directory (the Vite root for the plugin), also for a --config file in another folder. Keep that behaviour, which ADR-0029 and llms.txt already state, and fix the descriptions. A test pins where a config from another folder resolves its paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
🤖 hustle review: approve — Docs, schema descriptions and tests now match loadConfig's cwd-based resolution. All five acceptance criteria are met, the changeset is a patch, and there is no runtime change. |
…k-2026-11-21 # Conflicts: # .backlog/tasks/index.md
Owner
Author
|
🤖 hustle review: approve — Docs-only fix to match cwd-based resolution; new tests cover config in another folder and the schema wording. Schema, JSON schema, config.md, llms.txt, skills and changeset are consistent with each other and with the acceptance criteria. |
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.
Fixes RPT-016 / TSK-110. The config JSON Schema (
sources,dir) andapps/site/src/content/docs/config.md:56said config paths are relative to the config file.loadConfigresolves them against the working directory instead (the Viterootforsvgworm/vite). That also applies to a--config sub/x.jsonfile.Decision
Keep cwd as the base and fix the text. Why:
iconsfolder is relative to the working directory.llms.txt, the skills andconfig.md:29already said "current/project folder".--configusers see no behaviour change during the 0.x adoption window.Because nothing changes in behaviour, no ADR is needed.
What changed
packages/svgworm/src/core/config/schema.tsand the regeneratedsvgworm.schema.json:sourcesanddirare now described as "relative to the working directory (the Vite root for svgworm/vite), not to the config file".apps/site/src/content/docs/config.md:diris described as relative to the project folder, not the config file.--config sub/svgworm.config.jsonreads./icons, notsub/icons.llms.txtand bothskills/*/SKILL.md: say the same about a config in another folder.resolve.test.ts: two new tests (config in another folder; schema wording)..changeset/config-paths-relative-to-cwd.md(svgworm patch).Acceptance criteria
resolve.test.tsloads a config from another folder throughconfigFileand states wheresources,outDirandmoduleDirresolve. It loadssub/svgworm.config.json. All three paths resolve under cwd, notsub/. The test passes.svgworm.schema.jsonandconfig.mdsay the paths are relative to the working directory. The schema-wording test failed against the old "relative to the config" text and passes after the fix.pnpm schema:generateregenerated the JSON (then oxfmt).configFiletest only if the base changes. Not applicable: the base did not change.llms.txtand the skills match the behaviour. Both updated.pnpm site:checkexits 0..changeset/config-paths-relative-to-cwd.md.Verification (local)
pnpm verify: exit 0 (942 tests passed, 6 skipped).pnpm example:vite:check: exit 0.pnpm site:check: exit 0.🤖 Generated with Claude Code