cli: include integration-contributed components in unified search/build - #5259
Open
andrskr wants to merge 1 commit into
Open
cli: include integration-contributed components in unified search/build#5259andrskr wants to merge 1 commit into
andrskr wants to merge 1 commit into
Conversation
search/build's component candidate list came from gatherComponents(coreDir), which only ever scanned @astryxdesign/core. A project's configured integrations were never part of the pool, so an integration-only component (no core equivalent, no name collision) was invisible to `astryx search` and `astryx build`, even though `component --list` and `component <Name>` already resolve it via the same loadedIntegrations data. The two discovery paths silently disagreed. Split gatherComponents into gatherCoreComponents (unchanged) and gatherIntegrationComponents, which reuses loadIntegrationsSafely + discoverIntegrationComponents — the same functions component/list.mjs already uses to make integration components show up in `component --list`. gatherComponents now merges both, and its call site passes cwd alongside coreDir so the integration lookup has a project root to resolve from. New tests stand up a temp consumer with a stub core and an installed integration (same harness as template-integration.test.mjs), and assert the integration's component appears in search results with the integration package as its import hint.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 #5258.
Problem
search/build's component candidate list came fromgatherComponents(coreDir), which only ever scanned@astryxdesign/core. A project's configured integrations were never part of the pool, so an integration-only component (no core equivalent, no name collision) was invisible toastryx searchandastryx build, even thoughcomponent --listandcomponent <Name>already resolve it via the sameloadedIntegrationsdata.Fix
Split
gatherComponentsintogatherCoreComponents(unchanged) andgatherIntegrationComponents, which reusesloadIntegrationsSafely+discoverIntegrationComponents— the same functionscomponent/list.mjsalready uses to make integration components show up incomponent --list.gatherComponentsnow merges both, and its call site passescwdalongsidecoreDirso the integration lookup has a project root to resolve from.An integration component's
importhint is set to its owning package name (rec.package), matching the granularitycomponent --list's brief detail already uses (package: integration.name) — no new import-path-resolution logic invented.Testing
New tests in
search.test.mjsstand up a temp consumer with a stub core and an installed integration (same harness astemplate-integration.test.mjs), and assert the integration's component appears in search results with the integration package as its import hint.search.test.mjsalone: 13/13 passed (11 pre-existing + 2 new).api/search,api/build,api/componenttogether: 35/36 passed. The one failure (component.test.mjs, a case-sensitivity check) is in a file this diff doesn't touch, and reproduces identically without this change — it's a case-insensitive-filesystem artifact of the sandbox this was developed in, not a regression from this patch.Happy to adjust the
importhint shape or split anything out if you'd rather keep this more minimal.