github heroku/cli v11.0.0

one day ago

Summary

This is a major release with extensive changes. The primary changes are:

  1. Upgrade to oclif v4 from v2
  2. Conversion to ECMAScript Modules (ESM) throughout the entire codebase
  3. Removal of the monorepo structure - consolidated to single package
  4. Migration from yarn to npm for package management and workflows
  5. Introduction of a new semantic color system with the ansis library replacing chalk
  6. Ships with Node.js 22 (maintains Node 20 compatibility)
  7. New Commands - data:pg:* (NGPG), data:maintenance:*, heroku search
  8. 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 ux module 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 --repl to heroku 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 search to 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:index
    • data:pg:quotas:index, data:pg:quotas:update
    • data: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 diff command: Adds apps:diff into 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 charAliases for single-character flag aliases and Flags.option for 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 preparse hook for pre-processing commands
  • Enhanced TypeScript: Enabled exactOptionalPropertyTypes for 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
  • Remove monorepo structure (#3508)
    • Removed lerna configuration
    • Consolidated from packages/cli/ to root-level structure
    • Moved all source from packages/cli/src to src/
    • Moved all tests from packages/cli/test to test/
    • Flattened repository structure
  • Switch to commit-and-tag-version from standard-version (#3496)
    • Added .versionrc.json configuration
    • Updated release scripts
  • 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.json for 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-exec plugin:
    • ps:copy
    • ps:exec
    • ps:forward
    • ps: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-versions for 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/

Don't miss a new cli release

NewReleases is sending notifications on new releases.