Repository navigation
fix(vue): build @copilotkit/vue/v2 from the v2 entry again - #8112
Merged
Merged
Conversation
#8084 pointed the "v2/index" build entry at src/index.ts, the v1-compatible root. So @copilotkit/vue/v2 shipped the v1 wrappers: useFrontendTool with a Zod schema threw "(actionParameters || []) is not iterable". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the
|
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/markdown-renderer
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/runtime
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
Contributor
|
Size Change: 0 B Total Size: 2.01 MB ℹ️ View Unchanged
|
2 of 4 tasks
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.
useFrontendToolfrom@copilotkit/vue/v2throws(actionParameters || []) is not iterablewhen you pass it a Zod schema. The cause is the build config: #8084 pointed thev2/indexbuild entry atsrc/index.ts, the v1-compatible root. As a result,@copilotkit/vue/v2shipped the v1 wrappers. This PR points the entry back atsrc/v2/index.ts.What does this PR do?
packages/vue/vite.config.ts: thev2/indexentry builds fromsrc/v2/index.tsagain.packages/vue/src/__tests__/build-entries.test.ts: each build entry must export theuseFrontendToolthat matches its package export.@copilotkit/vue/v2gets the v2 hook.@copilotkit/vuegets the v1-compatible wrapper.Related PRs and Issues
Checklist
!(for examplefeat(react-core)!: ...) and the description has aBREAKING CHANGE:line with migration steps. See VERSIONING.md (not breaking)Testing
Commands run
pnpm nx run @copilotkit/vue:test -- src/__tests__/build-entries.test.ts: before the fix, the/v2case failed (expected [Function useFrontendTool] to be [Function useFrontendTool]). After the fix, both cases pass.pnpm nx run-many -t build,test,check-types,publint,attw -p @copilotkit/vue: all pass (140 test files, 1432 tests).dist/v2/index.mjsnow exports auseFrontendToolthat is different from the rootdist/index.mjsexport.Manual test
2.0.0, run the Vue demo:cd examples/v2/vue/demo && pnpm dev./or/single. The page returns 500 with(actionParameters || []) is not iterable.pnpm nx run @copilotkit/vue:build), then run the demo again./and/single. The pages render.How this PR makes testing easy
build-entries.test.tsfails if a build entry points at the wrong module again. It runs withpnpm nx run @copilotkit/vue:test.Risk / rollback
Low. Only the
@copilotkit/vue/v2entry changes, and it goes back to its value before #8084. To undo, revert this PR.🤖 Generated with Claude Code