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
feat: add deno support, alt approach #14386
Conversation
8f00dfe
to
e14c35f
Compare
@millsp Updated the PR. This branch now uses Summary of changes (all changes only happen when
|
e14c35f
to
77cafa2
Compare
BTW I currently can't build main branch (on my local machine) because of |
@kt3k we recently removed the |
I now see an error in my integration test setting (like |
I pinged you on slack about the deno folder, so that we can have a quick conversation about it. |
Addressed this issue. The generated client can make request to data proxy in my settings. It also can pass the type checking by deno's type checker (type completions of prisma client, models, etc are available). Now the |
e9e6a2b
to
2505f53
Compare
(Sorry, I tried to resolve the conflicts and had messed up - so had to force push the previous state again. No changes.) |
2aa8501
to
2505f53
Compare
} else { | ||
hint = `You can now start using Prisma Client in your code. Reference: ${link('https://pris.ly/d/client')} | ||
${chalk.dim('```')} | ||
${highlightTS(`\ | ||
import { PrismaClient } from '${importPath}/deno/edge.ts'`)} | ||
${chalk.dim('```')} | ||
|
||
You will need a Prisma Data Proxy connection string. See documentation: ${link('https://pris.ly/d/data-proxy')} | ||
${breakingChangesStr}${versionsWarning}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that deno previw is in the else
. Can we rewrite this that this also reacts to isDenoPreview
@millsp?
New engine to use with |
Work continued here #15281 |
@millsp So glad to see this landed! Thank you for your reviews and guidances! |
This is an alternative approach to #14250
This PR updates
prisma generate
command. WhenpreviewFeatures = ["denoDeploy"]
is specified in the schema, then generate command outputs the client compatible with Deno and Deno Deploy.Summary of changes (all changes only happen when
previewFeatures = ["denoDeploy"]
is specified):runtime/edge-esm.js
which is used by denooutput
is not specified ingenerator client
import ... from './client/edge.ts'
instead ofimport ... from './client/edge'
)