Skip to content

Conversation

@sbosio
Copy link
Contributor

@sbosio sbosio commented Aug 5, 2025

Description

This was initially an attempt to bring this plugin in alignment with our current CLI versions, by migrating to @oclif/core 2.x and TypeScript. The way we planned it though, prove to be difficult:

  • We agreed to migrate required shared lib functions to heroku-cli-util to replace a legacy dependency on @heroku-cli/plugin-pg-v5 that's associated with most of the 3PP vulns needed to be fixed.
  • The work on heroku-cli-util initially seemed to be not necessary, but after migrating one command for testing, we discovered the lib functions weren't working. Fixing that turned into its own rabbit hole, but the result is on this PR.
  • With that fixed, I packaged a beta version and included it here (as a direct file dependency on package.json) in order to test again the commands, just to find out that the new releases of heroku-cli-util use @oclif/core 4.x and ESM and that in turn, generated a lot of problems with unresolvable dependencies in this repository.

This draft PR has both the TypeScript config and the example command migrated, aligned with heroku-cli-util on @oclif/core 4.x. And everything works when running the command through ./bin/run.

There's a document that @k80bowman put up to discuss options for moving forward this migration: see here.

Testing

  1. Checkout this branch and run npm install and npm run build.
  2. Run
./bin/run pg:bloat -a <app-with-pg-database>

Screenshots (if applicable)

Captura de pantalla 2025-08-05 a la(s) 6 48 30 a  m

SOC2 Compliance

Gus Work Item: W-18004666 (Heroku internal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant