-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 🧰 Changes i took a stab at this in [#962](#962) but ran into issues at the time but oclif has since shipped a lot of handy features (and plus the work that folks did on `owl` got me excited about oclif again) so i decided to revive this and i got it all working 🥹 here's a high-level overview: - [x] refactors all commands, associated helper functions, and github actions build process to be oclif-friendly - [x] converts all tests to use oclif test utilities BREAKING CHANGE: the `rdme` GitHub Actions is now a [the `node20` JavaScript action](https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions) rather than [a Docker container action](https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runs-for-docker-container-actions). BREAKING CHANGE: `rdme` is now powered by [`oclif`](https://oclif.io/). The formatting and content of certain error messages and outputs may have changed. Please continue to only utilize exit codes to determine command successes/failures. completed tasks: - [x] a handful of tests are still failing, hoping that oclif/test#652 gets merged in) - [x] github actions dry runs are failing (but i got them working in [#1067](https://github.com/readmeio/rdme/pull/1067))[^1] - [x] remove all docker build/tagging/release code - [x] update `semantic-release` workflow to support this new process. here are the assets we'll need to consider every time we tag a release ([link](https://github.com/readmeio/rdme/blob/d01d76fe3c2e4a98b4f5c415be03e589fbe3b56e/.releaserc.yml#L30)): - [x] command list README (i.e., the one generated by `oclif readme` - [x] we do **not** need to update `action.yml` on every release anymore - [x] everything in `dist-gha` (the two JS files ~~and `package.json`~~) - [x] (do we need an `oclif` manifest in this directory? probably not?) - [x] we might not actually need to track this duplicated `package.json` — what if we used the [`runs.pre`](https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runspre) script to generate it? - [x] package/package-lock.json - [x] CHANGELOG.md - [x] `oclif` manifest (this one is interesting... we probably shouldn't git track it but it should be included in our npm assets) ## 🧬 QA & Testing to test this out, check out this branch and play around: ```sh npm ci bin/dev.js whoami ``` i've confirmed in a separate repo that the action works as expected: https://github.com/readmeio/oas-examples/actions/runs/11902772744/job/33168462740 i ticketed a few follow-ups in RM-11447 (resolves RM-8260) [^1]: i'm going to move away from the docker-based github action builds — it's pretty complex and unfortunately doesn't play nicely with oclif. i figured out a way to get it working with pre-built JS dists in [#1067](#1067) that is just as fast (if not faster) than before.
- Loading branch information
1 parent
6df2f0d
commit 5e05f93
Showing
113 changed files
with
8,820 additions
and
6,575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# test result artifacts | ||
coverage/ | ||
|
||
# release build artifacts | ||
dist/ | ||
exe/ | ||
dist-gha/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
.env | ||
coverage/ | ||
dist/ | ||
exe/ | ||
node_modules/ | ||
|
||
# required for building with TS + oclif + GitHub Actions | ||
dist-gha/package.json | ||
oclif.manifest.json | ||
src/package.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# invalid files | ||
__tests__/__fixtures__/invalid-json/yikes.json | ||
CHANGELOG.md | ||
|
||
# test result artifacts | ||
coverage/ | ||
|
||
# release build artifacts | ||
CHANGELOG.md | ||
dist/ | ||
exe/ | ||
documentation/commands.md | ||
dist-gha/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.