-
Notifications
You must be signed in to change notification settings - Fork 122
feat!: remove TOON encoding/decoding helper functions #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BREAKING CHANGE: Removes @toon-format/toon dependency and related exports (encodeToon, decodeToon, ToonEncodeOptions, ToonDecodeOptions, JsonValue). The TOON integration was adding ~100kb and 83 dependencies to the bundle, which was deemed too heavy for an optional feature. Co-Authored-By: Tom Aylott <[email protected]>
Original prompt from Tom |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Tom Aylott <[email protected]>
Co-Authored-By: Tom Aylott <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the TOON format integration to reduce bundle size and eliminate type dependencies. The integration was adding ~100kb and 83 dependencies for an optional feature, and caused type issues where downstream consumers were forced to install @toon-format/toon even when not using it.
Key Changes:
- Removed TOON encoding/decoding helper functions and related type exports
- Removed
@toon-format/toonfrom dependencies and peer dependencies - Fixed a pre-existing import ordering issue in
src/chat/index.ts
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/toon/toon.test.ts | Deleted test file for TOON helper functions |
| src/toon/index.ts | Deleted TOON helper implementation including encodeToon, decodeToon functions and type exports |
| src/index.ts | Removed export statement for toon module |
| src/chat/index.ts | Fixed import ordering (FileAnnotation moved after OpenRouterUsageAccounting) |
| package.json | Removed @toon-format/toon from devDependencies, peerDependencies, and peerDependenciesMeta |
| .changeset/remove-toon.md | Added changeset documenting the breaking change |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,7 @@ | |||
| --- | |||
| "@openrouter/ai-sdk-provider": patch | |||
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaking change removes public API exports and should be marked as a major version bump, not a patch. Consider changing 'patch' to 'major' to follow semantic versioning conventions.
| "@openrouter/ai-sdk-provider": patch | |
| "@openrouter/ai-sdk-provider": major |
Description
Removes the
@toon-format/toondependency and related TOON encoding/decoding helper functions that were added in #276.Motivation: The TOON integration was adding ~100kb and 83 dependencies to the bundle, which is too heavy for an optional feature. Additionally, there was a type issue where the types were always imported in
index.d.tseven though the package was marked as optional, forcing downstream consumers to install@toon-format/toonto pass type checking.BREAKING CHANGE: The following exports are removed:
encodeToondecodeToonToonEncodeOptionsToonDecodeOptionsJsonValueUsers who were using these helpers should import directly from
@toon-format/tooninstead.Human Review Checklist
patchwith BREAKING CHANGE note)Updates since last revision
src/chat/index.tsto make CI passLink to Devin run: https://app.devin.ai/sessions/5b9b891e53a74338b6d51d66f1ef20f0
Requested by: Tom Aylott (@subtleGradient)
Checklist
pnpm stylecheckandpnpm typecheckpnpm testand all tests passChangeset
pnpm changesetto create a changeset file