@W-23820125 feat: broaden ui-bundle .graphqlrc.yml generation to the angularbasic template - #1032
Open
emanchan wants to merge 1 commit into
Open
Conversation
… template @W-23820125 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.
Broadens the
ui-bundlegenerator's project-root.graphqlrc.ymlpost-step so it also runs for theangularbasictemplate, not justreactbasic.@W-23820125
What changed
src/commands/template/generate/ui-bundle/index.ts: introduced aTEMPLATES_WITH_GRAPHQLallowlist (reactbasic,angularbasic) and generalized the post-generation condition fromflags.template === 'reactbasic'toTEMPLATES_WITH_GRAPHQL.has(flags.template). Angular bundles now get a.graphqlrc.ymlwritten at the sfdx project root (the same behavior already shipped for React), so the GraphQL LSP and lint tooling can auto-discover the schema.test/commands/template/generate/ui-bundle/index.nut.ts: enhanced theangularbasicNUT to assert the project-root.graphqlrc.ymlis created (content + thecreate .graphqlrc.ymllog line), is idempotent across a second angular generate, and cleans up between tests.Why
The
angularbasictemplate in@salesforce/templatesalready ships a bundle-level.graphqlrc.yml(and a codegen config), but the plugin only created the project-root.graphqlrc.ymlforreactbasic. This closes that gap so Angular ui-bundles get the same editor/tooling support as React.Verification (local)
tsc -p .andtsc -p ./test: cleaneslint src test: cleansnapshot:compare: no changes detected (command signature unchanged / backward-compatible)commandreference:generate: generates cleanly🤖 Generated with Claude Code