feat(cli): swizzle integration-owned components + config-routed feedback#3267
Merged
ejhammond merged 1 commit intoJun 30, 2026
Merged
Conversation
Generalize `astryx swizzle` so it can copy integration-owned components, not just core. Component resolution now goes through package ownership (core + configured integrations); --package scopes the lookup and an ambiguous name across packages errors with the candidate list instead of silently preferring core. Escaping relative imports are rewritten to the OWNING package's subpaths (rewriteImports gains an optional ownerPackage param defaulting to core). The copy now also excludes *.doc.* files. Maintainer feedback is routed through config: core uses config.issuesUrl (falling back to the default), integration components use their manifest issuesUrl, and the note is omitted entirely when no issues URL is available. The swizzle.copy JSON envelope gains an owner `package` field.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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.
What
Generalize
astryx swizzleso it can copy integration-owned components, not just core, route escaping-import rewrites and the maintainer feedback note to the owning package, and route the core feedback URL through app config.Changes
--package <pkg>option. The requested component is resolved against owner packages (core + configured integrations). If a name is owned by multiple packages and no--packageis given, the command errors with the candidate packages listed (newERR_AMBIGUOUS_COMPONENTcode) instead of silently preferring core. Core-only names behave exactly as before.rewriteImports(content, ownerPackage?)now rewrites escaping relative imports (../x) to${ownerPackage}/<topDir>.ownerPackagedefaults to@astryxdesign/core, so existing core behavior is unchanged. Relative imports within the copied directory are preserved.*.doc.*files (in addition to*.test.*andREADME.md) so integration docs aren't copied.config.issuesUrl(falling back to the default issues URL); integration components use their manifestissuesUrl. When an owner has no issues URL, the feedback note is omitted entirely. The GitHub "new issue" matcher now accepts anygithub.com/<owner>/<repo>/issues(/new)?form.swizzle.copygains an ownerpackagefield;feedbackis omitted for integration components without an issues URL.Testing
swizzle.routing.test.mjs(hermetic, spawns the CLI bin against fixtures undernode_modules): core feedback routing via config, default fallback, integration-owned copy (excludes test/doc, rewrites escaping import to the owner package, routes feedback to the integration issues URL), integration without issues URL omits feedback, ambiguous name errors, and--packageresolution to both core and the integration.swizzle.test.mjsandswizzle.path-safety.test.mjsremain green (rewriteImportsdefault param keeps the old signature working).