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(generators): Do not force install of package manager when using ni #19959

Merged
merged 2 commits into from Jul 11, 2023
Merged

fix(generators): Do not force install of package manager when using ni #19959

merged 2 commits into from Jul 11, 2023

Conversation

timarnoldev
Copy link
Contributor

Fixes #19945

When having a .lock file from a different package manager ni forces the installation or terminates the task if the user declines.

To overcome this issue when ni is used in cli tools like prisma cl programmatic should be set to true.

@timarnoldev timarnoldev requested a review from a team as a code owner June 25, 2023 18:22
@timarnoldev timarnoldev requested review from SevInf and millsp and removed request for a team June 25, 2023 18:22
@CLAassistant
Copy link

CLAassistant commented Jun 25, 2023

CLA assistant check
All committers have signed the CLA.

@timarnoldev timarnoldev changed the title Fixed force install of package manager when using ni Fix: Force install of package manager when using ni Jun 25, 2023
@janpio janpio requested a review from aqrln June 25, 2023 20:09
@Jolg42
Copy link
Member

Jolg42 commented Jun 26, 2023

Note: the programmatic option was added to ni by @millsp in antfu-collective/ni#151

@Jolg42
Copy link
Member

Jolg42 commented Jun 26, 2023

@millsp is there any reason why this option it was not set to true like done in this PR?

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 27, 2023

CodSpeed Performance Report

Merging #19959 Coder246:main (c45bebd) will degrade performances by 11.8%.

Summary

🔥 0 improvements
❌ 1 regressions
✅ 3 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main Coder246:main Change
typescript compilation ~50 Models 124.9 ms 141.6 ms -11.8%

@millsp
Copy link
Member

millsp commented Jun 27, 2023

No I don't think there's any reason, it should always be marked as programmatic.

@Jolg42 Jolg42 added this to the 5.0.0 milestone Jun 28, 2023
@janpio janpio changed the title Fix: Force install of package manager when using ni fix(generators): Force install of package manager when using ni Jul 6, 2023
@janpio janpio changed the title fix(generators): Force install of package manager when using ni fix(generators): Do not force install of package manager when using ni Jul 6, 2023
Copy link
Member

@Jolg42 Jolg42 left a comment

Choose a reason for hiding this comment

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

Nice, I just reproduced and it works like expected, thanks for the PR!

npx prisma generate
Environment variables loaded from prisma/.env
Prisma schema loaded from prisma/schema.prisma
bun add v0.6.13 (3a93ddfa)

 installed @prisma/client@4.17.0-dev.86


 2 packages installed [343.00ms]
  Removed: 1

✔ Installed the @prisma/client and prisma packages in your project

✔ Generated Prisma Client (4.17.0-dev.86 | library) to ./node_modules/@prisma/client in 45ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
...

@Jolg42 Jolg42 merged commit 5bbad1e into prisma:main Jul 11, 2023
59 of 60 checks passed
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.

Prisma requires to install bun when generating client library
4 participants