Skip to content

fix(schema-org): add missing Vue exports for schemaAutoImports entries - #728

Merged
harlan-zw merged 2 commits into
mainfrom
fix/schema-org-vue-missing-exports
Apr 7, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
fix/schema-org-vue-missing-exports

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Apr 7, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Resolves #727

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

schemaAutoImports listed 12 define functions (defineDataset, defineMusicAlbum, defineMusicGroup, defineMusicPlaylist, defineMusicRecording, definePodcastEpisode, definePodcastSeason, definePodcastSeries, defineTVEpisode, defineTVSeason, defineTVSeries, defineService) that were not exported from @unhead/schema-org/vue, causing Nuxt production build failures. These functions existed in the core runtime and other framework exports (React, Svelte, Solid) but were never added to the Vue composables file.

Adds a regression test that asserts every entry in schemaAutoImports is exported from the Vue entry point.

Summary by CodeRabbit

  • New Features

    • Extended Schema.org support with new entity types: Dataset, Music (Recording, Album, Group, Playlist), Podcast (Series, Episode, Season), TV (Series, Season, Episode), and Service.
    • Added new framework composable functions for each entity to simplify schema definitions and usage.
  • Tests

    • Added validation tests ensuring the new composables are auto-imported for Vue.

defineDataset, defineMusicAlbum, defineMusicGroup, defineMusicPlaylist,
defineMusicRecording, definePodcastEpisode, definePodcastSeason,
definePodcastSeries, defineTVEpisode, defineTVSeason, defineTVSeries,
and defineService were listed in schemaAutoImports but not exported
from @unhead/schema-org/vue, causing Nuxt build failures.

Adds regression test to ensure all schemaAutoImports entries are
exported from the Vue entry point.
@coderabbitai

coderabbitai Bot commented Apr 7, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a292cc15-e96d-472e-9592-09339099850d

📥 Commits

Reviewing files that changed from the base of the PR and between 4317586 and ac78881.

📒 Files selected for processing (1)
  • test/exports/schema-org.yaml

📝 Walkthrough

Walkthrough

Added 12 new Vue composable exports for additional Schema.org entities (Dataset, Music*, Podcast*, TV*, Service) and a Vitest that asserts every name in schemaAutoImports is actually exported from @unhead/schema-org/vue.

Changes

Cohort / File(s) Summary
Vue Composables Exports
packages/schema-org/src/vue/runtime/composables.ts
Imported new public types and node resolvers; added 12 exported define* composable functions (Dataset, MusicRecording, MusicAlbum, MusicGroup, MusicPlaylist, PodcastSeries, PodcastEpisode, PodcastSeason, TVSeries, TVSeason, TVEpisode, Service) that call provideResolver(input, <Entity>Resolver).
Auto-Imports Validation Test
packages/schema-org/test/vue/auto-imports.test.ts
Added a Vitest that imports @unhead/schema-org/vue and schemaAutoImports, asserting every string in schemaAutoImports exists on the Vue exports object and failing with a list of missing names if any are absent.
Exports Manifest
test/exports/schema-org.yaml
Updated test manifest to include the new define* exports across root and framework-specific sections (./vue, react, solid-js, svelte).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰✨ Twelve new helpers spring to view,
Resolvers ready, typed and true.
A test hops by to check the list,
No missing names are left in mist.
Cheers from a rabbit—exports all through!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding missing Vue exports for entries in schemaAutoImports.
Description check ✅ Passed The description completely addresses the template with linked issue, type of change selection, and detailed explanation of the bug fix and solution.
Linked Issues check ✅ Passed All code changes directly address the requirements from issue #727: the 12 missing define functions are now exported from the Vue composables file, and a regression test was added to prevent future mismatches.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving the linked issue: adding missing Vue exports and their test coverage; no unrelated modifications present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/schema-org-vue-missing-exports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Bundle Size Gzipped
Client (Minimal) 10.6 kB 4.3 kB
Server (Minimal) 10.3 kB 4.2 kB
Vue Client (Minimal) 11.6 kB 4.8 kB
Vue Server (Minimal) 11.3 kB 4.6 kB

@harlan-zw
harlan-zw merged commit caf8ca3 into main Apr 7, 2026
5 checks passed
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.

@unhead/schema-org: schemaAutoImports includes non-exported Vue helpers

1 participant