8000 fix(meta): handle unresolved imports in getComponentMeta function by sandros94 · Pull Request #215 · romhml/compodium · GitHub
[go: up one dir, main page]

Skip to content

fix(meta): handle unresolved imports in getComponentMeta function - #215

Merged
romhml merged 1 commit into
romhml:mainfrom
sandros94:fix/component-404
Aug 26, 2026
Merged

romhml merged 1 commit into
romhml:mainfrom
sandros94:fix/component-404

Conversation

@sandros94
Copy link
Copy Markdown
Contributor

Discussed privately on Discord

The !meta branch in the meta middleware could never fire — getComponentMeta is typed CompodiumMeta and always returns an object literal, so a missing component came back 200 with empty props instead of 404, indistinguishable from a component that genuinely has none.

Now guards on the file existing and returns undefined, which makes the existing 404 branch work as intended. Added a small spec for the 200 / 404 / 400 cases.

@pkg-pr-new
pkg-pr-new Bot commented Aug 25, 2026
Copy link
Copy Markdown
npm i https://pkg.pr.new/romhml/compodium/@compodium/core@215
npm i https://pkg.pr.new/romhml/compodium/@compodium/examples@215
npm i https://pkg.pr.new/romhml/compodium/@compodium/nuxt@215
npm i https://pkg.pr.new/romhml/compodium/@compodium/vue@215

commit: 20ecf4e

@romhml
romhml merged commit 4cfa2b1 into romhml:main Aug 26, 2026
2 checks passed
@sandros94
sandros94 deleted the fix/component-404 branch August 26, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0