-
Notifications
You must be signed in to change notification settings - Fork 1
DC-6214 Feat: Accelerate removed #65
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
Conversation
WalkthroughReflows Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
claim-db-worker | 1aa2c31 | Commit Preview URL Branch Preview URL |
Nov 13 2025, 04:44 PM |
|
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr65
npx create-pg@pr65
npx create-postgres@$pr65Worker URLs
|
|
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr65
npx create-pg@pr65
npx create-postgres@$pr65Worker URLs
|
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.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
create-db/index.js(10 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/create-db PR: 48
File: create-db/index.js:423-431
Timestamp: 2025-08-27T16:39:21.271Z
Learning: In the prisma/create-db project, analytics property keys should use the existing kebab-case convention (e.g., "user-agent", "error-type", "status-code") rather than snake_case, to maintain consistency with existing analytics data and avoid duplicate attributes.
📚 Learning: 2025-08-27T16:39:21.271Z
Learnt from: aidankmcalister
Repo: prisma/create-db PR: 48
File: create-db/index.js:423-431
Timestamp: 2025-08-27T16:39:21.271Z
Learning: In the prisma/create-db project, analytics property keys should use the existing kebab-case convention (e.g., "user-agent", "error-type", "status-code") rather than snake_case, to maintain consistency with existing analytics data and avoid duplicate attributes.
Applied to files:
create-db/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Workers Builds: create-db-worker
- GitHub Check: Workers Builds: claim-db-worker
🔇 Additional comments (12)
create-db/index.js (12)
432-441: LGTM!The multiline formatting improves readability, and the analytics properties correctly use kebab-case convention.
446-452: LGTM!The multiline formatting improves readability for the function signature.
486-496: LGTM!The multiline formatting improves readability, and analytics properties correctly use kebab-case.
520-530: LGTM!The multiline formatting and kebab-case properties are correct.
595-605: LGTM!The analytics call correctly uses kebab-case and improved formatting.
617-629: LGTM!The simplified output that shows only the direct connection string is clearer for users. The updated heading "Database Connection" and label "Connection String:" are more straightforward.
635-644: LGTM!The updated claim section with "Claim Your Database" heading and clearer messaging improves user experience.
646-654: LGTM!The analytics call uses proper formatting. Note that
utm_sourceuses snake_case, which is standard for UTM parameters and acceptable here.
674-694: LGTM!The expanded analytics payload with multiline formatting is more readable, and all properties correctly use kebab-case.
721-730: LGTM!The multiline formatting and kebab-case properties are correct.
744-750: LGTM!The multiline formatting improves readability for the function call.
774-780: LGTM!The multiline formatting improves readability.
|
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr65
npx create-pg@pr65
npx create-postgres@$pr65Worker URLs
|
|
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr65
npx create-pg@pr65
npx create-postgres@$pr65Worker URLs
|
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
create-db/index.js (1)
563-563: Breaking API change already documented.The field rename from
directConnectionStringtoconnectionStringaffects both JSON and ENV output modes. This breaking change has been flagged in previous review comments with recommendations to:
- Document the complete JSON output schema in README
- Note the breaking change explicitly in commit messages or changelog
- Provide migration guidance for external consumers
Also applies to: 784-784
🧹 Nitpick comments (1)
create-db/index.js (1)
834-836: Remove commented-out dead code.The commented-out code appears to be the previous entry point guard implementation that was replaced by lines 821-832. Remove it to reduce clutter and prevent confusion.
Apply this diff:
-// if (import.meta.url.endsWith('/index.js') || process.argv[1] === import.meta.url.replace('file://', '')) { -// main().catch(console.error); -// }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
create-db/index.js(11 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/create-db PR: 48
File: create-db/index.js:423-431
Timestamp: 2025-08-27T16:39:21.271Z
Learning: In the prisma/create-db project, analytics property keys should use the existing kebab-case convention (e.g., "user-agent", "error-type", "status-code") rather than snake_case, to maintain consistency with existing analytics data and avoid duplicate attributes.
📚 Learning: 2025-08-27T16:39:21.271Z
Learnt from: aidankmcalister
Repo: prisma/create-db PR: 48
File: create-db/index.js:423-431
Timestamp: 2025-08-27T16:39:21.271Z
Learning: In the prisma/create-db project, analytics property keys should use the existing kebab-case convention (e.g., "user-agent", "error-type", "status-code") rather than snake_case, to maintain consistency with existing analytics data and avoid duplicate attributes.
Applied to files:
create-db/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Workers Builds: claim-db-worker
- GitHub Check: Workers Builds: create-db-worker
🔇 Additional comments (3)
create-db/index.js (3)
432-441: LGTM: Multiline formatting improves readability.The reformatting of analytics calls and function signatures to multiline declarations improves code readability without changing behavior. The analytics property keys correctly use kebab-case convention (e.g., "selection-method", "user-agent", "error-type"), maintaining consistency with existing analytics data.
Based on learnings
Also applies to: 446-452, 486-496, 520-530, 594-604, 644-652, 672-692, 719-728, 742-748, 772-778
616-642: LGTM: Text changes simplify user-facing output.The logging updates remove Accelerate-specific references and simplify the user experience, consistent with the PR objective. The changes include:
- Clarified connection string labeling
- Updated claim section heading capitalization
- Streamlined messaging
These changes improve clarity without affecting functionality.
821-832: Entry point guard implementation is correct and functional.The verification confirms the entry point detection works as intended:
NPX execution test passed: Running
npx create-db --helpsuccessfully triggered the entry point guard and displayed help output, proving the includes() checks function correctly for real-world usage.No test interference: The test file that imports
getCommandNamefrom index.js doesn't experience test failures because the entry point guard executes at module load time with the test runner's originalprocess.argv[1], which doesn't match the detection patterns. The test modifiesprocess.argvinbeforeEachhooks (after module import), so the guard doesn't interfere.Environment variable guard is effective: The
__CREATE_DB_EXECUTINGflag prevents double execution and persists across module resets, mitigating any false positive concerns where the module might be imported from a path containing those substrings.While the
includes()checks are broad, they function correctly for the intended CLI use case and don't cause issues with imports or testing.
Summary by CodeRabbit
Refactor
Changes