Summary
This is a major release with extensive changes. The primary changes are:
- Upgrade to oclif v4 from v2
- Conversion to ECMAScript Modules (ESM) throughout the entire codebase
- Removal of the monorepo structure - consolidated to single package
- Migration from yarn to npm for package management and workflows
- Introduction of a new semantic color system with the ansis library replacing chalk
- Ships with Node.js 22 (maintains Node 20 compatibility)
- New Commands -
data:pg:*(NGPG),data:maintenance:*,heroku search - Repl and Prompt changes interface changes to how repl and prompt mode work
Breaking Changes / Code Refactoring
-
BREAKING: Conversion to ECMAScript Modules (ESM), adding
"type": "module"to package.json -
BREAKING: All commands, libraries, and tests converted from CommonJS to ESM syntax
-
BREAKING: The
uxmodule was significantly slimmed down in @oclif/core v4, removing built-in prompts, progress bars, and table utilities. We've implemented custom output helpers using ink-based tables and our own formatting utilities which will change the output, particularly with tables. -
BREAKING: Removal of heroku-cli-plugin-ai as a direct dependency. This plugin will now require separate installation
-
BREAKING data:maintenance commands changes
- data:maintenances commands have been migrated to the core CLI from the data-maintenance plugin
- pg:maintenance, pg:maintenance:info, pg:maintenance:window, and redis:maintenance commands have been deprecated and removed.
-
BREAKING Invoking repl has been changed from
heroku --repltoheroku repl
Features
- New color scheme: Migrated from chalk-based @heroku-cli/color to ansis-based @heroku/heroku-cli-util for semantic color functions
- If you prefer a simple ANSI8-based theme to the new default color theme, set HEROKU_THEME=simple. To turn off colors entirely, set NO_COLOR=true
- Removed strip-ansi dependency in favor of ansis built-in capabilities
- Updated all CLI output with semantic colors
- Node.js support: Ships with Node 22, continued support for Node 20
- --prompt now a GLOBAL flag --prompt will now be included in documentation and help text for commands that utilize it
- New search command: Can’t remember the command you’re thinking of? Use
heroku searchto find it - Next-Gen PostgreSQL (NGPG) commands:
- New
data:pg:*command namespace for NGPG support data:pg:attachments:create,data:pg:attachments:destroy,data:pg:attachments:indexdata:pg:quotas:index,data:pg:quotas:updatedata:pg:create,data:pg:destroy,data:pg:docs,data:pg:fork,data:pg:psql,data:pg:settings,data:pg:update- NGPG types and command utilities (W-20610475)
- New
- New diff command: Adds
apps:diffinto the CLI
oclif v2 → v4 Upgrade
The Heroku CLI now uses @oclif/core v4, a major upgrade from v2. This brings significant improvements and modernizations:
oclif v3 improvements:
- Performance: Enhanced manifest caching for faster command loading
- ESM/CJS interoperability: Better support for mixing CommonJS and ESM plugins
- Flag enhancements: Added
charAliasesfor single-character flag aliases andFlags.optionfor improved type inference - Module system: Updated bin scripts for better ESM/CJS compatibility
oclif v4 improvements:
- Full ESM support: Complete ECMAScript Module support with seamless interoperability between CommonJS and ESM plugins
- Modular architecture: Changed to granular imports (e.g.,
import run from '@oclif/core/run') - Runtime auto-transpilation: Linked ESM plugins auto-transpile with
tsx - New hooks: Added
preparsehook for pre-processing commands - Enhanced TypeScript: Enabled
exactOptionalPropertyTypesfor stricter type checking
Build System
- Move from yarn to npm (W-19730551, #3365)
- Removed
.yarnrc.yml,.yarn/directory - Added
package-lock.json - Updated all CI/CD workflows to use npm
- Updated scripts to use npm commands
- Removed
- Remove monorepo structure (#3508)
- Removed lerna configuration
- Consolidated from
packages/cli/to root-level structure - Moved all source from
packages/cli/srctosrc/ - Moved all tests from
packages/cli/testtotest/ - Flattened repository structure
- Switch to commit-and-tag-version from standard-version (#3496)
- Added
.versionrc.jsonconfiguration - Updated release scripts
- Added
- Removed Snapcraft configuration (removed
snap/directory) - Removed Dockerfile.devcenter
Tests
- Upgrade @oclif/test v2 to @oclif/test v4 (#3447)
- Converted all tests to ESM
- Added
.mocharc.jsonfor test configuration - Migrated from eslint 7 to eslint 8
- Fixed an issue with git remote being created during test execution
Continuous Integration
- Updated CI workflows to usefor npm instead of yarn
- Updated release workflows for new monorepo-less structure
- Added npm scripts for use with deployment workflows
Code Refactoring
- Comprehensive ESM migration across all commands
- The following commands have been moved into the CLI repository from the
ps-execplugin:ps:copyps:execps:forwardps:socks
Miscellaneous Chores
- Updated bundled oclif plugins to v4+ compatible versions for compatibility with @oclif/core v4
@oclif/plugin-commands, @oclif/plugin-help, @oclif/plugin-help, @oclif/plugin-not-found, @oclif/plugin-plugins, @oclif/plugin-update, @oclif/plugin-version, @oclif/plugin-warn-if-update-available, @oclif/plugin-which - Additional varkious package dependency updates
- Removal of @heroku-cli/color (replaced with @heroku/heroku-cli-util)
- Removal of @heroku/eventsource (replaced with eventsource)
- Removal of sparkline as a dependencydepndency (added directly to codebase with TypeScriptTS support)
- Updated Node.js update scripts to work with Nnode 22
- Updated
.tool-versionsfor Node 22 - Updated Husky pre-commit hook to happen during prepare
- Many linting errors and warnings fixed throughout codebase
Documentation
- Updated README.md for new repository structure
- Updated command documentation in docs/