Skip to content

feat!: convert to typescript#45

Closed
michaelmalave wants to merge 8 commits intomainfrom
mm/feat/convert-to-typescript
Closed

feat!: convert to typescript#45
michaelmalave wants to merge 8 commits intomainfrom
mm/feat/convert-to-typescript

Conversation

@michaelmalave
Copy link
Copy Markdown

@michaelmalave michaelmalave commented Apr 8, 2026

Summary

This PR replaces the Ruby devcenter gem with @heroku-cli/heroku-cli-plugin-devcenter, a Node 20+ oclif plugin that implements heroku devcenter:open|pull|push|preview using TypeScript, HTTP calls to Dev Center, local markdown/YAML handling, ~/.netrc auth, and a local preview server.

  • Removes the Ruby CLI, gem layout, and bin/devcenter.
  • Adds src/dist/ build, ESLint (oclif config), CI (multi-OS/Node), Dependabot, components inventory, and updated README/CONTRIBUTING.
  • Aligns .c8rc.json and c8 --all --check-coverage with heroku/cli (80% gates on src/**/*.ts).
  • Adds a runCommand helper, plus nock/supertest/unit tests.
  • Uses DEVCENTER_CLI_CWD / DEVCENTER_CLI_TEST (and DEVCENTER_CLI_TEST_CONFIRM for pull) so tests stay isolated and non-interactive.
  • Drafts / private API: pull (and related client changes) now use a private API fallback leveraged by push for draft access

Breaking change: users must switch from the gem/devcenter binary to heroku devcenter:* via the npm plugin.

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

setup

npm install
npm run build
heroku plugins:link .

First heroku login. Then run help commands

heroku devcenter --help
heroku devcenter:open --help

this will open the page in your browser

heroku devcenter:open error-pages

these should create the .md files in the location you run from and open the preview locally

heroku devcenter:pull slowdb
heroku devcenter:pull https://devcenter.heroku.com/articles/slowdb
heroku devcenter:preview slowdb

This will send an update to the article, not publish if in drafts.

heroku devcenter:push slowdb

Screenshots (if applicable)

Related Issues

GUS work item: W-20867948

@michaelmalave michaelmalave requested a review from a team as a code owner April 8, 2026 19:30
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.

1 participant