Repository navigation
fix: remove unused dependencies and fix the redundant ones in the 2.0 packages - #8148
Merged
Merged
Conversation
channels-core, channels-slack, channels-teams and channels-ui never import these packages, and their built output does not reference them. A Slack or Teams bot no longer installs @copilotkit/core and its dependencies (websandbox, phoenix, pacer, jsonrepair, learning). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The library compiles to ES2022, so the built package needs no TypeScript helpers and never imports tslib. Turn importHelpers off for the library build, so a future helper is inlined instead of importing an undeclared package. The tests compile to ES2016 and keep importing helpers from tslib, a dev dependency, because vi.mock factories are hoisted above inlined helpers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… peers
text-encoding is deprecated on npm. The encoding polyfill now installs
a UTF-8 TextEncoder and TextDecoder from this package. The decoder
follows the WHATWG UTF-8 decode algorithm, including { stream: true }
and U+FFFD for invalid bytes. Its tests compare it with the built-in
classes in every chunk split. The react-native-gesture-handler and
react-native-reanimated peers are never imported. Only
@gorhom/bottom-sheet needs them, and it declares them itself with
higher minimum versions.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
angular, react-core and vue depend on web-components but do not declare lit, so the peer was only met through web-inspector. lit is an implementation detail of web-components, so it is now a dependency with the same range as web-inspector. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-renderer mcp-apps-renderer already requires ^1.29.0, and the lockfile resolves 1.29.0 for both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The notification and HUD feeds only need version validation and range matching. src/lib/semver.ts implements the node-semver range rules (comparators, ^, ~, x-ranges, hyphen ranges and ||). Its test compares every result with the real semver package, which stays as a dev dependency for that test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Stencil compiler generated this file. web-inspector uses lit, and the file imports @stencil/core, which is not installed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The manifest drops the removed react-native peers and the web-components lit peer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AlemTuzlak
requested review from
jpr5,
mme,
rainerhahnekamp,
tylerslaton and
wolfmanfx
as code owners
November 2, 2026 15:58
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: +9.41 kB (+0.45%) Total Size: 2.09 MB 📦 View Changed
ℹ️ View Unchanged
|
3 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.
This PR removes the unused dependencies from the 2.0 packages and fixes the redundant and inconsistent ones. It also replaces
semverinweb-inspectorwith a small range matcher, and the deprecatedtext-encodingpackage inreact-nativewith a UTF-8 polyfill. A Slack or Teams bot no longer installs@copilotkit/core.What does this PR do?
Unused dependencies removed
channels-core@copilotkit/corechannels-slack,channels-teams@copilotkit/core,@copilotkit/sharedchannels-ui@copilotkit/sharedangulartslibreact-nativereact-native-gesture-handler,react-native-reanimated(optional peers)@gorhom/bottom-sheetdeclares them itself, with higher minimum versions.Redundant and inconsistent dependencies fixed
web-componentsdepends onlit. Before,litwas a peer, andangular,react-coreandvueonly met it throughweb-inspector.runtimerequires@modelcontextprotocol/sdk ^1.29.0, the same asmcp-apps-renderer. Before, it allowed^1.18.2.react-nativeinstalls its own UTF-8TextEncoderandTextDecoder(src/polyfills/utf8.ts). npm markstext-encodingas "no longer maintained".web-inspectormatches the feed version ranges withsrc/lib/semver.ts. It implements the node-semver range rules: comparators,^,~, x-ranges, hyphen ranges and||.web-inspector/src/components.d.tsis deleted. The old Stencil build generated it, and it imports@stencil/core, which is not installed.The
angularlibrary build setsimportHelpers: false. If a future change needs a TypeScript helper, the build then inlines it and does not import the undeclaredtslib. The Angular tests keepimportHelpers: true, because they compile to ES2016, andvi.mockfactories are hoisted above inlined helpers.Related PRs and Issues
Checklist
!(for examplefeat(react-core)!: ...) and the description has aBREAKING CHANGE:line with migration steps. See VERSIONING.mdTesting
Commands run (all passed)
CI=true pnpm nx run-many -t buildforweb-inspector,react-native,angular,web-components, allchannels*packages,runtime,react-coreandvue. Thereact-nativebuild includes the polyfill barrel check.pnpm nx run-many -t check-types,testfor the same packages.pnpm install --frozen-lockfileandpnpm check:public-api-manifest.lint,check:packages,validate-starter-deps,validate-channels-zod,package-licenses:testandcommitlint.check-formatreports 26 files. The same files fail on2.0.0, and this PR changes none of them.Manual test
pnpm install --frozen-lockfile.pnpm --dir packages/web-inspector exec vitest run src/lib/__tests__/semver.test.ts. 157 cases match the realsemverpackage.pnpm --dir packages/react-native exec vitest run src/polyfills. 26 cases match the built-inTextEncoderandTextDecoder.grep -r tslib packages/angular/dist/fesm2022after a build. It finds nothing.How this PR makes testing easy
packages/web-inspector/src/lib/__tests__/semver.test.ts: compares the range matcher with the realsemverpackage.semverstays as a dev dependency for this test only.packages/react-native/src/polyfills/__tests__/utf8.test.ts: compares the polyfill with the built-in classes, in every chunk split and with invalid bytes.web-inspectorpass with the new range matcher.Risk / rollback
semver. If a rule uses a form thatsemverreads differently, the rule does not match, and the default content shows.@copilotkit/react-native/polyfills/encodingget the new UTF-8 classes only when the runtime has noTextEncoderorTextDecoder. Other encodings, such aslatin1, throw aRangeError. CopilotKit only uses UTF-8.🤖 Generated with Claude Code