Repository navigation
feat(cli): report executed prisma binary path in --version output - #30585
Yumihariii wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Merge Risk:
|
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly and concisely describes the main change: reporting the executed Prisma binary path in --version output. |
| Linked Issues check | ✅ Passed | Issue #7771 is closed and provides historical context only. No active directly linked target remains. Therefore, no linked-issue coding requirements apply. |
| Out of Scope Changes check | ✅ Passed | The changes are limited to the @prisma/cli-engine patch and its declaration in package.json. They add the executed binary path to human-readable and JSON version output. These changes match the st… |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… |
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
1c815e6 to
9ee1aca
Compare
|
@janpio this is still waiting on a human review — it's mergeable and CodeRabbit found nothing actionable. It's a small, backward-compatible change (adds a |
9ee1aca to
292da5f
Compare
|
Hi @janpio, just a gentle bump — I've rebased this onto the latest main and resolved the conflicts, so it's mergeable now. Would you have a moment to take a look when you get a chance? |
|
Hi @janpio, gentle bump — this PR is still blocked on human review (mergeable, awaiting a reviewer). I've kept it rebased on the latest main so it should be clean to review. Any chance you could take a look when you have a moment? |
fc5d4b5 to
b24b5cb
Compare
|
I don't work at Prisma any more, sorry. Please mention someone that does. |
|
Understood — that explains the radio silence, thanks for telling us @janpio. @wmadden you've been actively merging in this repo, so one short ask: #7771 wants We did notice #7771 is closed as completed — if that feature landed somewhere else already, just say so and we'll close this PR ourselves. If not, a look whenever convenient would help. |
b24b5cb to
d003981
Compare
Patch @prisma/cli-engine 0.9.0 via pnpm.patchedDependencies so settleVersion prints the realpath of the executing bin (human: Path: line; json: path field). Regenerated against current main. Signed-off-by: Yumihariii <bot@example.com>
Summary
prisma --versiononly prints the version string, so when a project runs a hoisted or globalprismayou cannot tell which installation is actually executing. This makes the "Output path of current Prisma in-v" request from #7771 impossible to diagnose.This PR makes the CLI report the absolute path of the executed
prismabinary in the version output:Path: <absolute path>line (mirroring howyarnshows the resolved binary path);--format json) adds apathfield alongsideversionin theresultenvelope.Implementation
The
--versioncommand is settled by@prisma/cli-engine'ssettleVersion. I patched that package viapnpm.patchedDependenciesto resolve and print the executed binary path fromprocess.argv[1](resolved through symlinks withrealpathOr). The existing--version --format jsoncontract is unchanged — the newpathfield is additive.Verification
node dist/bin.mjs --version→8.0.0-rc.14+Path: /…/cli/dist/bin.mjsnode dist/bin.mjs --version --format json→{ "version": "8.0.0-rc.14", "path": "/…/cli/dist/bin.mjs" }pnpm vitest run test/version.test.ts→ 1 passedCloses #7771.
Summary by CodeRabbit
pathfield.