Repository navigation
[MySQL]: Cap @planetscale/database peer below 2 - #6399
Open
cfleissner-evisions wants to merge 1 commit into
Open
cfleissner-evisions wants to merge 1 commit into
cfleissner-evisions wants to merge 1 commit into
Conversation
@planetscale/database 2.0 removed parameter interpolation, so execute() throws on the params array the planetscale-serverless session always passes. Exclude 2.x from the optional peer range so installs get a peer warning instead of every query failing at runtime. Refs drizzle-team#6398
1 task done
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.
Refs #6398
What
Change the optional
@planetscale/databasepeer range indrizzle-orm/package.jsonfrom>=1.13to>=1.13 <2.Why
@planetscale/database2.0.0 removed client-side parameter interpolation (planetscale/database-js#219). Itsexecute(query, options?)now throwsQuery parameters are not supportedon any params argument. Theplanetscale-serverlesssession always callsclient.execute(sql, params, options), even withparams = [], so every query fails on 2.x before a request is sent. The old range admits 2.x, so npm and pnpm install it with no peer warning. The issue has a stubbed-fetchreproduction.Capping the range gives users a peer-dependency warning (and keeps
autoInstallPeerson 1.x) instead of a runtime failure on every query. Real 2.x support means the driver has to send fully formed SQL, which is a design and security decision covered in the issue, not in this PR.Testing
This is a manifest-only change, and the repo's dev and integration dependencies are already on
^1.16.0, so no test changes.>=1.13 <2still matches 1.13.0 and 1.20.1, and excludes 2.0.0 and 2.1.0.