Repository navigation
chore(deps): upgrade postgres.js from 3 to 4 - #27
Merged
Merged
Conversation
Zod 4 dropped the single-argument z.record(value). The npm-security bump (#20) moved loop to zod 4, and every production build since has failed at next build's type check. The parse result is unchanged: the old call already accepted string keys at runtime. CI now runs tsc, because CI only ran tests and Vercel skips Dependabot branches, so nothing checked types before merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uau5YjL2L7Vm7xh3B7jzUX
The API is unchanged for what loop uses. v4's main behaviour change is that the server now types Date and boolean parameters; every timestamp column here is timestamptz, so no stored value is read differently. Verified against a real Postgres 16 in a non-UTC time zone: migrations, inserts with jsonb, enums and booleans, onConflictDoNothing, inArray updates, Date parameters, nested transactions and rollback all return output identical to v3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uau5YjL2L7Vm7xh3B7jzUX
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
The Vercel build fails at Generated by Claude Code |
mattdecrevel
marked this pull request as ready for review
November 22, 2026 17:17
This branch was successfully deployed
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.
Replaces Dependabot #24. Includes #26's zod fix (merged in) so this builds on its own; merge #26 first and that commit drops out of this diff.
Why it is safe
postgres.js 4 keeps v3's API. Its upgrade notes list these changes:
timestamp/date/timecolumns outside UTC; every timestamp inlib/db/schema.tsistimestamptz.sql.array()removed. Not used.sql.begin/savepoint, which stay supported."type": "module".drizzle-orm 0.45 declares
postgres >=3, and still hooksoptions.parsers/options.serializers, which v4 keeps.Verified
I ran a smoke script against a real Postgres 16 whose session time zone is America/Chicago, on v3 and then on v4. It covered:
onConflictDoNothinginArrayupdatelteagainst bothnow()and aDateparametercaseorderingdb.executeThe JSON output is identical between v3 and v4. Also:
pnpm lint: cleanpnpm test: 147/147tsc: the only error is the zod one fix(events): use zod 4 two-argument z.record so the build type-checks #26 fixesAfter merging, the first production deploy runs
scripts/migrate.tsagainst Neon on v4. Watch that deploy log.Generated by Claude Code