Skip to content

refactor: use @heroku/sdk for sessions commands - #4090

Merged
erika-wallace merged 4 commits into
v12.0.0from
ew/sdk-sessions
Nov 20, 2026
Merged

erika-wallace merged 4 commits into
v12.0.0from
ew/sdk-sessions

Conversation

@erika-wallace

@erika-wallace erika-wallace commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR migrates the sessions:index and sessions:destroy commands to @heroku/sdk.

  • Replaced raw Platform API calls to @heroku/sdk resource methods (platform.oauthSession.*)
  • Deleted src/lib/sessions/sessions.ts — the local OAuthSession interface it exported is no longer needed now that the SDK's own oauthSession resource types are used.
  • Rewrote test files for both commands to stub HerokuSDK.prototype.platform instead of intercepting HTTP with nock.

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

Notes:

Setup:

  1. Pull down this branch
  2. npm i && npm run build

Steps:

  1. ./bin/run sessions — verify your OAuth sessions list, sorted alphabetically by description, or No OAuth sessions.
  2. Log into the Heroku Dashboard in a browser (e.g. in a guest profile) to create a new, disposable session
  3. ./bin/run sessions — identify the new browser session's ID
  4. ./bin/run sessions:destroy <browser-id> — verify the spinner displays
  5. ./bin/run sessions — verify the session is destroyed and removed

Screenshots (if applicable)

Related Issues

GUS work item: W-23387756

@erika-wallace
erika-wallace requested a review from a team as a code owner November 20, 2026 18:45
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 18:45 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 18:45 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 18:45 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 18:45 — with GitHub Actions Active
@github-actions github-actions Bot added the size/S Small PR (code churn < 100) label Nov 20, 2026
Comment thread package-lock.json Resolved

@sbosio sbosio 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.

Great work. I left one single comment, but it's more of a question, non-blocking.

@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 21:40 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 21:40 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 21:40 — with GitHub Actions Active
@erika-wallace
erika-wallace deployed to AcceptanceTests November 20, 2026 21:40 — with GitHub Actions Active
@erika-wallace
erika-wallace merged commit 7996121 into v12.0.0 Nov 20, 2026
20 checks passed
@erika-wallace
erika-wallace deleted the ew/sdk-sessions branch November 20, 2026 22:10

This branch was successfully deployed

1 active deployment
AcceptanceTests — 097a1d00 Deployed Nov 20, 2026 by erika-wallace via acceptance (24.x, ubuntu-latest) #9816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR (code churn < 100)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants