Skip to content
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

fix(adapter-planetscale): Use instanceof for checking for Client instance #21939

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented Nov 14, 2023

Prevoulsly, we tried to check for constructor name, which theoretically
should've been more reliable and work with several copies of
@planetscale/database. However, name gets mangled during minification
and check fails. Since minification is pretty common usecase (unlike
having multiple copies of the @planetscale/database), reverting back
to instanceof check.

…stance

Prevoulsly, we tried to check for constructor name, which theoretically
should've been more reliable and work with several copies of
`@planetscale/database`. However, name gets mangled during minification
and check fails. Since minification is pretty common usecase (unlike
having multiple copies of the `@planetscale/database`), reverting back
to `instanceof` check.
@Jolg42 Jolg42 added this to the 5.6.0 milestone Nov 14, 2023
Copy link
Contributor

github-actions bot commented Nov 14, 2023

size-limit report 📦

Path Size
packages/client/runtime/library.js 189.76 KB (0%)
packages/client/runtime/library.d.ts 99.83 KB (0%)
packages/client/runtime/binary.js 616.48 KB (0%)
packages/client/runtime/binary.d.ts 26 B (0%)
packages/client/runtime/edge.js 230.14 KB (0%)
packages/client/runtime/edge-esm.js 229.94 KB (0%)
packages/client/runtime/index-browser.js 33.5 KB (0%)
packages/client/runtime/index-browser.d.ts 11.96 KB (0%)
packages/cli/build/index.js 5.11 MB (0%)

@Jolg42
Copy link
Contributor

Jolg42 commented Nov 14, 2023

Note: found via prisma/ecosystem-tests#4226

@janpio janpio requested review from a team, aqrln and jkomyno and removed request for a team November 14, 2023 09:44
@SevInf SevInf merged commit 29bd625 into main Nov 14, 2023
90 of 91 checks passed
@SevInf SevInf deleted the fix/ps-instanceof branch November 14, 2023 10:04
@cstrnt
Copy link

cstrnt commented Nov 15, 2023

Heya, this has caused some issues (#21956) for me :/

@Jolg42
Copy link
Contributor

Jolg42 commented Nov 15, 2023

Thanks! Let's continue the discussion in #21956
We definitely want to fix this.

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.

3 participants