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

Only generate the prisma client if it's not found #3855

Merged
merged 5 commits into from
Sep 29, 2022

Conversation

itsdillon
Copy link
Member

@itsdillon itsdillon commented Sep 20, 2022

Closes: #3801 , #3776

What are the changes and their implications?

Only generate the prisma client if it's not found. It checks for both @prisma/client and .prisma.

@changeset-bot
Copy link

changeset-bot bot commented Sep 20, 2022

🦋 Changeset detected

Latest commit: 6185f2e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
blitz Patch
@blitzjs/auth Patch
@blitzjs/next Patch
@blitzjs/rpc Patch
@blitzjs/codemod Patch
@blitzjs/config Patch
@blitzjs/generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@beerose beerose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure it works in monorepos?

From what I saw, it finds a prisma client in the monorepo's root node_modules, while I guess it should look for a particular app's node_modules.

packages/blitz/src/cli/utils/codegen-tasks.ts Outdated Show resolved Hide resolved
packages/blitz/src/cli/utils/codegen-tasks.ts Outdated Show resolved Hide resolved
packages/blitz/src/utils/run-prisma.ts Outdated Show resolved Hide resolved
@itsdillon itsdillon requested a review from beerose September 28, 2022 19:13
@beerose beerose merged commit 430f6ec into main Sep 29, 2022
@beerose beerose deleted the check-for-prisma-client branch September 29, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only run prisma generate if the prisma client hasn't been generated
3 participants