feat(zod)!: drop YAML files support#24
Merged
vabatta merged 2 commits intoproventuslabs:mainfrom Oct 10, 2025
Merged
Conversation
It caused problems in case when there was a string identifier consisting only of numbers e.g.: `PROJECT_ID="347532342342349855"`. Such env parsed as JSON value resulted in a number, but JS numbers can't represent numbers that big so the resulting value would be 347532342342349800.
7b43489 to
bd50b4d
Compare
vabatta
pushed a commit
that referenced
this pull request
Oct 10, 2025
🤖 I have created a release *beep* *boop* --- ## [2.0.0](https://github.com/proventuslabs/nestjs/compare/nestjs-zod@v1.2.0...nestjs-zod@v2.0.0) (2025-10-10) ### ⚠ BREAKING CHANGES * **zod:** ENV variables are no longer parsed as JSON values and dropped support for YAML configuration files ### Features * **zod:** drop YAML files support ([#24](#24)) ([1023c42](1023c42)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
This PR drops support for YAML files as per @vabatta request, while also removing feature related to them that is JSON parsing values in ENV variables.
The main reason for this change was an edge we've encountered with ENV variables that is string ID consisting of only numbers. When such ID get longs enough, we're getting a number that is bigger than
Number.MAX_SAFE_INTEGER, so its value gets altered when parsed as number byJSON.parse.Example: ENV variable
PROJECT_ID="347532342342349855"is turned into number347532342342349800.📝 Checklist
🚨 Breaking Changes
Migration Guide
zod.transformz.coerce, soport: z.number().default(5432),turns intoport: z.coerce.number().default(5432),