fix(deps): upgrade zod to v4, prepar e npm publish, fix CI peer-dep conflict - #3
Merged
Conversation
chrisleekr
pushed a commit
that referenced
this pull request
Feb 19, 2026
Owner
Author
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
5 tasks
This was referenced Apr 27, 2026
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.
Description
Upgrades Zod from v3 to v4, prepares the package for publishing to npm.js, and fixes a failing CI job caused by a peer dependency conflict between
@anthropic-ai/claude-agent-sdk(which requireszod@^4.0.0) and the previously pinnedzod@^3.24.4.Root cause of CI failure
The
semantic-release.ymlworkflow installs semantic-release tools vianpm install --no-save. npm v7+'s strict peer-dep resolver detected that@anthropic-ai/claude-agent-sdk@0.2.44requireszod@^4.0.0while the project hadzod@3.25.76installed, causingERESOLVEand aborting the release job.Before (CI fails)
flowchart TD A["bun install (zod@3.25.76)"] --> B["npm install semantic-release"] B --> C["ERESOLVE: @anthropic-ai/claude-agent-sdk needs zod@^4.0.0"] C --> D["❌ CI job fails"]After (CI passes)
flowchart TD A["bun install (zod@4.3.6)"] --> B["npm install semantic-release"] B --> C["✅ Peer deps satisfied"] C --> D["npx semantic-release runs"]Changes
zodupgrade to v4"zod": "^3.24.4"→"^4.0.0"inpackage.jsonz.ZodIssueCode.customwith the string literal"custom"insrc/config.ts— theZodIssueCodeenum is a v3 internal not guaranteed in v4"overrides": { "zod": "^4.0.0" }to force Bun to deduplicate to a single Zod v4 instance across all nested packages (prevents TypeScript type identity conflicts betweenzod@3.xandzod@4.xcopies)@modelcontextprotocol/sdkmin version to^1.26.0(current resolved version that explicitly supportszod@^3.25 || ^4.0)npm publish preparation
"chrisleekr/github-app-playground"→"@chrisleekr/github-app-playground"(scoped npm name)"private": true"main","bin","files","publishConfig": { "access": "public" }fields"prepublishOnly": "bun run clean && NODE_ENV=production bun run build"to guarantee a clean production build before publishing"clean": "rm -rf dist"script.npmignoreto excludesrc/,test/,scripts/,.github/etc. from the tarballPre-existing lint fix in
src/core/executor.tsmessagetype from the SDK's async generator, causingno-unsafe-member-accessandno-unsafe-assignmenterrorsSDKResultMessagefrom the SDK; replaced the ad-hoc inline result type with the SDK's own concrete typeisResultMessage(msg: unknown): msg is SDKResultMessagetype guard — operates onunknown, narrows safely, noeslint-disablecommentsRelated Issues
Testing
108/108 tests pass · 0 TypeScript errors · 0 ESLint errors ·
npm publish --dry-runsucceeds (2.0 MB compressed, 9 files)