Skip to content

refactor: updates apps and apps:create commands to use sdk - #3720

Merged
tlowrimore-heroku merged 8 commits into
feat/heroku-sdk-integrationfrom
tl/refactor/sdk-apps-commands
May 28, 2026
Merged

tlowrimore-heroku merged 8 commits into
feat/heroku-sdk-integrationfrom
tl/refactor/sdk-apps-commands

Conversation

@tlowrimore-heroku

@tlowrimore-heroku tlowrimore-heroku commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Updates the apps and apps:create commands to use SDK instead of heroku-client
  • Updates corresponding tests to mock the SDK functions, instead of mocking network calls
  • Updates the sdk-command-migration skill to handle cases where the API client is passed into the command

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

  • Passing tests should suffice

Related Issues

GUS work item: W-22264732

Bumps @heroku/sdk to 0.4.1 and @heroku/types to 0.3.2; the latter
adds the missing hasRequestBody flag on configVar.update, which
this migration relies on to set config vars from the heroku.yml
manifest.
…gap guidance

Adds guidance learned from migrating apps:create, where the codemod
returned "no change" because the command threaded the APIClient through
helpers, and where a missing hasRequestBody flag in @heroku/types
silently dropped the configVar.update body at runtime.

- Pre-flight P3: distinguish direct vs helper-threaded shapes with a
  grep diagnostic so the next migrator catches the helper case before
  running the codemod.
- Step 1.2: new "Body silently dropped" entry with a tsx one-liner that
  prints the route's hasRequestBody flag, plus the @heroku/types bump
  recovery path.
- Step 1.2a: manual-migration recipe for helper-threaded commands -
  type Platform = HerokuSDK['platform'], APIClient import drop, and a
  note that direct + helper-threaded shapes can coexist.
- Step 1.4: clarify that existing nock tests will fail post-migration
  on Node 20+ (undici bypasses nock); distinguish real regressions
  from nock noise by stack-trace location.
- Step 1.5: document the n/no-extraneous-import quirk on type-only
  imports from @heroku/types/3.sdk; allow lockfile bumps in the source
  commit when driven by a route-metadata gap.
- Self-review checklist: add helper-threading callsite check and
  APIClient import drop; relax the no-incidental-lockfile-edits rule to
  match Step 1.5.
@tlowrimore-heroku
tlowrimore-heroku force-pushed the tl/refactor/sdk-apps-commands branch from aa67757 to 211f565 Compare May 26, 2026 21:19
@tlowrimore-heroku tlowrimore-heroku changed the title refactor: updates apps commands to use sdk refactor: updates apps and apps:create commands to use sdk May 26, 2026
@tlowrimore-heroku
tlowrimore-heroku marked this pull request as ready for review May 26, 2026 21:45
@tlowrimore-heroku
tlowrimore-heroku requested a review from a team as a code owner May 26, 2026 21:45
@tlowrimore-heroku

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@michaelmalave michaelmalave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved but left a comment about types since TeamApp and App are different. Is there work going on to later resolve that?

Comment thread src/commands/apps/create.ts Outdated
Comment thread src/commands/apps/index.ts Outdated
@tlowrimore-heroku
tlowrimore-heroku merged commit 47bea82 into feat/heroku-sdk-integration May 28, 2026
4 of 17 checks passed
@tlowrimore-heroku
tlowrimore-heroku deleted the tl/refactor/sdk-apps-commands branch May 28, 2026 19:17

This branch had an error being deployed

1 failed deployment
AcceptanceTests — 7cccdfc9 Deployed May 28, 2026 by tlowrimore-heroku via acceptance (20.x, ubuntu-latest) #8603
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