Skip to content

Make @types/pg a direct dependency of adapter-pg#29277

Merged
jacek-prisma merged 2 commits intoprisma:mainfrom
pedrogiroldo:move-pg-types-to-dependencies
Mar 3, 2026
Merged

Make @types/pg a direct dependency of adapter-pg#29277
jacek-prisma merged 2 commits intoprisma:mainfrom
pedrogiroldo:move-pg-types-to-dependencies

Conversation

@pedrogiroldo
Copy link
Copy Markdown
Contributor

@pedrogiroldo pedrogiroldo commented Mar 1, 2026

What changed

@types/pg was moved from a devDependency to a regular dependency in adapter-pg's package.json, and the pnpm lockfile entries were updated accordingly.

Why

When using adapter-pg, the TypeScript types for pg are not automatically available — they live in @types/pg, which is a separate package that the adapter consumed only as a dev dependency. Because of this, consumers who install adapter-pg end up with a poor developer experience: the adapter's types fail to load correctly at the consumer's side, since TypeScript can't resolve the underlying pg types without @types/pg being present.

The problem is subtle and frustrating: the user has no reason to know that adapter-pg internally depends on @types/pg, and nothing tells them they need to install it manually. The fix is to make @types/pg a direct, non-dev dependency so it is automatically installed whenever adapter-pg is installed — both for the end user's type resolution and for the build itself.

Impact

No runtime behavior changes. This is a types-only fix that improves the out-of-the-box TypeScript experience for anyone using adapter-pg.

Summary by CodeRabbit

  • Chores
    • Updated PostgreSQL adapter dependencies: moved type definitions from development-only to runtime dependencies so they're available when the adapter is installed.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 1, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 1, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Moved @types/pg from devDependencies to dependencies in the adapter-pg package; also a minor formatting change in package.json (trailing comma added).

Changes

Cohort / File(s) Summary
Dependency Reorganization
packages/adapter-pg/package.json
Migrated @types/pg (now 8.11.11) from devDependencies to dependencies. Also adjusted formatting in the dependencies object (added trailing comma/newline).
🚥 Pre-merge checks | ✅ 3
✅ 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 accurately and concisely describes the main change: moving @types/pg from devDependency to a direct dependency in adapter-pg.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@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


ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 455853d and e07d336.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/adapter-pg/package.json

@pedrogiroldo pedrogiroldo force-pushed the move-pg-types-to-dependencies branch from e07d336 to 97f201f Compare March 1, 2026 03:50
@pedrogiroldo
Copy link
Copy Markdown
Contributor Author

The force push changes the name of the commit to match project conventions. (Sorry, I'm new to this).

@pedrogiroldo
Copy link
Copy Markdown
Contributor Author

Hey @jacek-prisma! Is there anything I need to do on my end to get this PR merged?

@jacek-prisma
Copy link
Copy Markdown
Contributor

I intend to merge this when CI is finished

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.

3 participants