Skip to content

refactor: convert certs to esm#3327

Merged
eablack merged 10 commits intov11.0.0from
eb/convert-certs-to-esm
Jul 2, 2025
Merged

refactor: convert certs to esm#3327
eablack merged 10 commits intov11.0.0from
eb/convert-certs-to-esm

Conversation

@eablack
Copy link
Contributor

@eablack eablack commented Jun 30, 2025

W-18575907

Description

This converts the certs commands to esm and makes them availabe in the v11 branch. This PR involves a lot of formatting changes (like, for instance, adding .js to imports), and also refactors a few things to make them easier to stub in a test within an esm world:

This also deletes the certs:auto:wait command, which was hidden and didn't actually do anything. Seems to have been left in a "to be implemented" state, and never implemented.

There was an interesting interaction I discovered where our new table implementation (which uses ink under the covers) really doesn't like us messing with timeouts. lolex was breaking a test, so I implemented the time freeze in another way. This can be seen here: https://github.com/heroku/cli/pull/3327/files#diff-4ef25adc806db52a740fe9bdde046dcf777f073c47badf0e1340b78323765f79R590-R594

A minor bug was also uncovered in a different command, apps:transfer related to inquirer. That has been fixed

Testing

For destructive actions (e.g., certs:add) please make sure to use a test app. We don't want to make certs changes to production or staging apps.

  1. Pull down this branch and yarn build
  2. ./bin/run certs --app APP where APP has a cert
  3. ./bin/run certs:generate --app APP where APP is test app
  4. ./bin/run certs:add --app APP where APP is a test app
  5. ../bin/run certs:auto:enable -app APP where APP is a test app
  6. ./bin/run certs:auto:disable -app APP where APP is a test app
  7. Run other certs commands as you see fit

@eablack eablack changed the title Eb/convert certs to esm refactor: convert certs to esm Jun 30, 2025
@eablack eablack temporarily deployed to AcceptanceTests June 30, 2025 17:52 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests June 30, 2025 17:52 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests June 30, 2025 20:01 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests June 30, 2025 20:01 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests July 1, 2025 18:14 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests July 1, 2025 18:14 — with GitHub Actions Inactive
@eablack eablack marked this pull request as ready for review July 1, 2025 18:25
@eablack eablack requested a review from a team as a code owner July 1, 2025 18:25
@eablack eablack temporarily deployed to AcceptanceTests July 1, 2025 18:53 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests July 1, 2025 18:53 — with GitHub Actions Inactive
Copy link
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

Looks great!

@eablack eablack merged commit 19b54e2 into v11.0.0 Jul 2, 2025
8 checks passed
@eablack eablack deleted the eb/convert-certs-to-esm branch July 2, 2025 15:59
eablack added a commit that referenced this pull request Jul 17, 2025
* convert certs:add to esm

* convert certs:generate to esm

* Convert certs:index to esm

* convert certs:info to esm

* convert certs:remove to esm

* convert certs:update to esm

* convert certs auto refresh, disable, enable, index to esm

* Fix shared cert update tests

* Fix issue with lolex had with ink. Switch to explicitly stubbing date.now

* Fix inquirer usage, revert lolex updates
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