Skip to content

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Dec 14, 2025

Summary by CodeRabbit

  • Chores

    • Version bumped to 1.1.3 across packages
  • Updates

    • Enhanced analytics to better capture user environment information

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Walkthrough

This pull request bumps versions from 1.1.2 to 1.1.3 across three packages (create-db, create-pg, create-postgres) and replaces the analytics "has-user-agent" boolean property with a "user-agent" string property that reports the actual user agent value.

Changes

Cohort / File(s) Summary
Version bumps
create-db/package.json, create-pg/package.json, create-postgres/package.json
Minor version update from 1.1.2 to 1.1.3 across all three packages
Analytics enhancement
create-db/src/index.ts
Replaced boolean "has-user-agent" property with "user-agent" string property in analytics payload, now emitting the actual userAgent value or undefined instead of a boolean indicator

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The version bumps are straightforward metadata updates
  • The analytics property change in create-db/src/index.ts requires verification that consuming services properly handle the new string type and undefined values instead of the previous boolean shape

Possibly related PRs

  • prisma/create-db#70: Modifies user-agent handling in create-db/src/index.ts with related userAgent CLI option and analytics field changes
  • prisma/create-db#62: Updates analytics payload shape and emit behavior in create-db
  • prisma/create-db#71: Version bump changes across create-db, create-pg, and create-postgres packages

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add user agent to posthog' accurately describes the main change: replacing a boolean 'has-user-agent' analytics property with an actual 'user-agent' string value in the createDb CLI analytics payload.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 14, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
claim-db-worker 3b3d567 Commit Preview URL

Branch Preview URL
Dec 14 2025, 10:31 PM

@github-actions
Copy link

Preview CLIs & Workers are live!

Test the CLIs locally under tag pr72-add-user-agent-to-posthog-20215109996:

npx create-db@pr72
npx create-pg@pr72
npx create-postgres@pr72

Worker URLs
• Create-DB Worker: https://create-db-temp.prisma.io
• Claim-DB Worker: https://create-db.prisma.io

These will live as long as this PR exists under tag pr72-add-user-agent-to-posthog-20215109996.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
create-db/src/index.ts (1)

361-361: Hardcoded CLI version is inconsistent with package.json.

The CLI version is hardcoded as "1.1.0" while package.json shows "1.1.3". This creates confusion for users checking the CLI version.

Consider dynamically reading the version from package.json:

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const { version } = require('../package.json');

Then use version instead of the hardcoded string:

 export function createDbCli() {
   return createCli({
     router,
     name: getCommandName(),
-    version: "1.1.0",
+    version: version,
     description: "Instantly create a temporary Prisma Postgres database",
   });
 }

Or at minimum, update the hardcoded value to match the current package version:

-    version: "1.1.0",
+    version: "1.1.3",
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26318d0 and 3b3d567.

📒 Files selected for processing (4)
  • create-db/package.json (1 hunks)
  • create-db/src/index.ts (1 hunks)
  • create-pg/package.json (1 hunks)
  • create-postgres/package.json (1 hunks)
⏰ 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 (4)
create-pg/package.json (1)

3-3: LGTM!

Version bump is consistent with the PR's analytics enhancement.

create-postgres/package.json (1)

3-3: LGTM!

Version bump is consistent with the PR's analytics enhancement.

create-db/package.json (1)

3-3: LGTM!

Version bump is consistent with the PR's analytics enhancement.

create-db/src/index.ts (1)

147-147: Verify no other references to the old field name exist.

The old "has-user-agent" field name is not referenced elsewhere in the codebase. The migration to the new "user-agent" field is complete.

@aidankmcalister aidankmcalister merged commit c2dec54 into main Dec 14, 2025
6 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.

2 participants