-
Couldn't load subscription status.
- Fork 28
chore(deps): [DO NOT MERGE] Bump zod from 3.25.76 to 4.0.5 #854
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
base: v1-main
Are you sure you want to change the base?
Conversation
Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.0.5. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v3.25.76...v4.0.5) --- updated-dependencies: - dependency-name: zod dependency-version: 4.0.5 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
|
I have to downgrade |
| "uuid": "^11.1.0", | ||
| "@langchain/core": "0.3.62", | ||
| "zod": "^3.25.76" | ||
| "zod": "^4.0.5" |
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.
[q] I am confused, so we now use a mix of v4 and v3?
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.
We kind like have to. Let me explain this complex story:
In #837 , zod-to-json-schema failed the pipeline with minor updates from zod v3. We could either stop updating zod and wait for zod-to-json-schema, or adopt zod/v4 (by importing from zod/v4 in zod v3) as it has native support for zod to json. But since zod v4 has native support for this zod to json feature, I don't think zod-to-json-schema will be actively continued anymore.
Thus, the decision was to use zod/v4 (in zod v3).
Recently, zod officially released v4 (we can import directly from zod instead of zod/v4 from v3), we have this dependabot PR. But ts-to-zod again doesn't work with zod v4. At this point, we can either mix zod versions as they are used independently for different purposes in our overall project, or remove ts-to-zod in favour of supporting zod v4 fully, but I am not sure if we find a good alternative for ts-to-zod.
WDY think? I would hope eventually ts-to-zod will support zod v4, but no clear evidence that this will actually happen. In a worst case scenario, we eventually need to drop ts-to-zod.
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.
A potential good replacement could be https://orval.dev/guides/zod
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.
So even with the latest version we still have access to zod/v3 and updating imports like below works.
import { z } from 'zod/v3';
In the end, I don't have a strong opinion on if we use zod/v3 or the old dependency. However if we're pinning major versions for certain packages, then we'll probably need to ignore the updates in dependabot?
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.
Good to know that we can use zod/v3! Maybe I go with this option for now and in the BLI we look for alternatives.
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.
Might be worth looking into alternative to ts-to-zod or just testing the schema differently maybe. Its annoying the level of complexity it has added.
I agree, I will create a BLI to track this and leave this open for now. |
|
For now, LangChain still uses Zod v4 from v3 package. https://github.com/langchain-ai/langchainjs/blob/6e349ee960fe15b8a726e305164a1244d070616f/langchain-core/package.json#L46 We cannot update to the REAL Zod v4 as LangChain's But only the REAL Zod v4's Anyway, we wait for LangChain to update to the REAL Zod v4 version. 🙃🙃🙃🙃🙃🙃🙃🙃 |
|
A newer version of zod exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
Bumps zod from 3.25.76 to 4.0.5.
Release notes
Sourced from zod's releases.
... (truncated)
Commits
45afab04.0.5f91a73eSupport pipes in discriminated unions. Closes #4856 (#4861)9335f054.0.44d6e266improve changelog (#4860)878775eImprove docs9a7161aFix versionsce573e8Update test badgeff4af5e4.0.374006edFix JSR provenance44a936c4.0.2Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)