Skip to content

Conversation

@eablack
Copy link
Contributor

@eablack eablack commented Oct 23, 2025

Currently, importing pg types is a little bit broken, requiring to import directly from dist as shown here: https://github.com/heroku/cli/blob/v11.0.0/packages/cli/src/lib/addons/resolve.ts#L6. This PR improves how we export/organize the types using namespace so that they can more cleanly be imported like:

import type { pg } from '@heroku/heroku-cli-util'
...
const connection: pg.ConnectionDetailsWithAttachment = { ... }

@eablack eablack requested a review from a team as a code owner October 23, 2025 22:06
@eablack eablack force-pushed the eb/use-namespace-for-types-organization branch from 6f498d7 to 576145f Compare October 24, 2025 17:43
@eablack eablack changed the title refactor: Update how types are exported fix: Update how types are exported Oct 29, 2025
@michaelmalave
Copy link

@eablack Changes look good! I wonder if the README should also be updated too to track this updated import of types since they're mentioned there?

Copy link

@michaelmalave michaelmalave left a comment

Choose a reason for hiding this comment

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

LGTM!

@eablack eablack merged commit 5563b34 into main Oct 29, 2025
6 checks passed
@eablack eablack deleted the eb/use-namespace-for-types-organization branch October 29, 2025 17:06
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