Skip to content

fix(parser): set zod peer range to 4.x #4196

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

Merged
merged 1 commit into from
Jul 23, 2025
Merged

fix(parser): set zod peer range to 4.x #4196

merged 1 commit into from
Jul 23, 2025

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR updates the peerDependencies range for zod in the Parser utility to 4.x. This change is needed because contrary to what stated in this section of Zod v4 versioning page the 3.x line still defaults to Zod v3 instead of Zod v4, which breaks compatibility with Parser (see full discussion in the linked issue).

After the change, customers who try to install Zod 3.x while having Parser installed will get a npm error similar to the one below:

npm i [email protected]
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @aws-lambda-powertools/[email protected]
npm error Found: [email protected]
npm error node_modules/zod
npm error   zod@"3.25.76" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional zod@"4.x" from @aws-lambda-powertools/[email protected]
npm error node_modules/@aws-lambda-powertools/parser
npm error   @aws-lambda-powertools/parser@"file:aws-lambda-powertools-parser-2.24.0.tgz" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/zod
npm error   peerOptional zod@"4.x" from @aws-lambda-powertools/[email protected]
npm error   node_modules/@aws-lambda-powertools/parser
npm error     @aws-lambda-powertools/parser@"file:aws-lambda-powertools-parser-2.24.0.tgz" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/aamorosi/.npm/_logs/2025-07-22T22_30_37_559Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/aamorosi/.npm/_logs/2025-07-22T22_30_37_559Z-debug-0.log

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: fixes #4189


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Jul 22, 2025
@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Jul 22, 2025
@boring-cyborg boring-cyborg bot added the dependencies Changes that touch dependencies, e.g. Dependabot, etc. label Jul 22, 2025
Copy link

@dreamorosi dreamorosi requested a review from svozza July 22, 2025 22:36
@dreamorosi dreamorosi merged commit 7a65fcf into main Jul 23, 2025
52 checks passed
@dreamorosi dreamorosi deleted the fix/parser_peer_zo branch July 23, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that touch dependencies, e.g. Dependabot, etc. size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Zod 3 support listed by parser package
2 participants