Skip to content

[MySQL]: Cap @planetscale/database peer below 2 - #6399

Open
cfleissner-evisions wants to merge 1 commit into
drizzle-team:mainfrom
cfleissner-evisions:fix/planetscale-database-peer-lt-2-main
Open

cfleissner-evisions wants to merge 1 commit into
drizzle-team:mainfrom
cfleissner-evisions:fix/planetscale-database-peer-lt-2-main

Conversation

@cfleissner-evisions

Copy link
Copy Markdown

Refs #6398

What

Change the optional @planetscale/database peer range in drizzle-orm/package.json from >=1.13 to >=1.13 <2.

Why

@planetscale/database 2.0.0 removed client-side parameter interpolation (planetscale/database-js#219). Its execute(query, options?) now throws Query parameters are not supported on any params argument. The planetscale-serverless session always calls client.execute(sql, params, options), even with params = [], 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-fetch reproduction.

Capping the range gives users a peer-dependency warning (and keeps autoInstallPeers on 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 <2 still matches 1.13.0 and 1.20.1, and excludes 2.0.0 and 2.1.0.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant