Repository navigation
feat(config): add a top-level partials field - #54
Draft
steve-calvert-glean wants to merge 1 commit into
Draft
steve-calvert-glean wants to merge 1 commit into
steve-calvert-glean wants to merge 1 commit into
Conversation
Partials were configured as source.partials, inside the source object that 0.11 marked legacy along with the 0.10 discovery fields (plugins, skills, rootPlugin). Partials are not part of that model and have no replacement, so the label told users a supported feature was going away. Add a top-level partials field with the same safe-path rule. source.partials keeps working as the older spelling. A config that sets both fails to load, so the two can't silently disagree. Errors and the outDir guard name whichever field the config used. Update the README config tables to mark only plugins, skills and rootPlugin as legacy, and correct the 0.11 migration guide, which said to keep source.partials only temporarily.
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.
Problem
Partials are configured as
source.partials. In 0.11 (#30), the wholesourceobject was marked legacy, becausesource.plugins,source.skillsandsource.rootPluginbelong to the 0.10 discovery model that direct plugin sources replaced. Partials got the same label only because they live in that object. They aren't part of the old model and have no replacement. The README callssourcelegacy, and the 0.11 migration guide says to keepsource.partials"temporarily", so users are told a supported feature is going away.Change
partialsfield with the same safe-relative-path rule assource.partials.source.partialsworking as the older spelling. A config that sets both fails to load, so the two can't disagree.partials.partials: "partials", addpartialsto the top-level table, and mark onlyplugins,skillsandrootPluginas legacy in thesourcetable.MIGRATING_TO_0.11.md: say to keepsource.partials, not keep it "temporarily".No change for existing configs.
source.partialsbuilds exactly as before.Not in this PR
source.skillsandrootPluginstay legacy here. They support a layout with skills at the repo root and generated output at the repo root too, and the 0.11 model has no equivalent for it yet. That needs its own decision before those fields are removed.Testing
npm run checkpasses: format, lint, typecheck, 504 tests, build, docs.partialsbuild into a directsource,partialsoutside the project and URL-shaped, anoutDirinside the partials folder for each spelling, and a config that sets both.dist/index.d.tsexposes the newpartials?field.