-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: v9 backport of docs/test/build/refactor changes #1196
Merged
Conversation
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
- [x] forks `syncsDocsPath` logic and deprecates it (in favor of TBA) - [x] cleaner arg definitions in `baseCommand.ts` - [x] cleanups + improved response handling flexibility in `handleAPIv2Res` does the build + tests still pass?
## 🧰 Changes This is just a **very** small typing improvement on some of our `console.*` unit test spies.
cherry-picking over a few random refactors from #1159 that are mostly unrelated to the PR itself: - [x] removes unused fixtures - [x] smol copy tweaks for changelog command ("syncing" is reserved for bidi, this is "uploading" - [x] jsdoc tweaks, including deprecating APIv1-related cruft - [x] various type enhancements - [x] renaming a few things - [x] adding `oclif`'s `this` context (so we can simplify functions and add better debug logs) do tests still pass?
chunks out a lot of PR feedback and random changes from #1159: - [x] renames all "front matter" to "frontmatter" - [x] better `nock` and `fs` setup/teardown - [x] cherry-picking over c871520 - [x] various cleanups - [x] bumps deps: before: ```Package Current Wanted Latest Location Depended by @readme/better-ajv-errors 2.0.0 2.1.2 2.1.2 node_modules/@readme/better-ajv-errors rdme eslint 8.57.1 8.57.1 9.19.0 node_modules/eslint rdme oclif 4.17.20 4.17.21 4.17.21 node_modules/oclif rdme semver 7.6.3 7.7.0 7.7.0 node_modules/semver rdme undici 5.28.5 5.28.5 7.3.0 node_modules/undici rdme ``` after: ``` Package Current Wanted Latest Location Depended by eslint 8.57.1 8.57.1 9.19.0 node_modules/eslint rdme undici 5.28.5 5.28.5 7.3.0 node_modules/undici rdme ``` do tests still pass? --------- Co-authored-by: Jon Ursenbach <jon@ursenba.ch>
a few small behind-the-scenes changes to simplify how we build `rdme` for GitHub Actions users — no actual customer impact here. quick breakdown of the changes: - [x] replaces `@rollup/plugin-terser` with `rollup-plugin-esbuild` for minifying our GitHub Actions code. the latter accomplishes basically the same result as the former, but in a tiny fraction of the time. - [x] we previously forked our GHA build process into a development vs. production setup since terser takes so long. since `rollup-plugin-esbuild` adds a negligible amount of time to our build process, there's no need to have two setups. this PR combines them into a single build process. - [x] added a bunch of steps to our CI to further assert that the GitHub Actions build is what we expect. does CI still pass?
The owner of `eslint-plugin-vitest` lost their NPM access to it was moved into `@vitest/eslint-plugin` a little over a year ago. This upgrades our `@readme/eslint-config` package to pull that in.
## 🧰 Changes [node v20.18.3](https://nodejs.org/en/blog/release/v20.18.3) officially marked import attributes [as stable](https://nodejs.org/docs/latest-v20.x/api/esm.html#import-attributes). we have a lot of weird workarounds with our `oclif` setup in this repo in an effort to avoid import attributes and the ugly `ExperimentalWarning` outputs we see, but i don't think those should be a concern anymore, for a few reasons: - our minimum required node.js version is node 20, so it should be a non-disruptive change for users to upgrade to the latest node 20 channel - even if folks are on <20.18.2, the `ExperimentalWarning` outputs log to `stderr` so it shouldn't affect any command output-based workflows, which almost always are relying on `stdout`. plus, we discourage this kind of scripting and recommend folks use exit codes instead given the above, this PR brings back JSON imports of `package.json` and vastly simplifies a lot of weirdness in this codebase. ## 🧬 QA & Testing we've added a lot of good test coverage now and i've been playing around with the CLI and github actions build locally and everything seems to work as expected. very unlikely we'll run into the fiasco in #1117, especially now with the cleanups in this PR and #1172.
| 🚥 Resolves ISSUE_ID | | :------------------- | Ok take 2 updating the docs syncing command! Turns out I had a really out of date version locally, so it was easier just to make a new branch instead of trying to squash a bunch of merge conflicts. This updates the docs syncing to use the new version of rdme now that our main docs project is on Refactored. Provide as much information as you can on how to test what you've done. --------- Co-authored-by: Kanad Gupta <git@kanad.dev>
we lose some test coverage here but i'm not sure if there's a better solution
## 🧰 Changes rewrites our tests for `openapi validate` to be more compliant with [our contributing guidelines](https://github.com/readmeio/rdme/blob/next/CONTRIBUTING.md#code-style-guidelines). i initially wrote them this way to minimize the amount of legwork to get `oclif` working but this approach to testing is far more comprehensive and it should be much easier to drop in stray console logs for debugging purposes. ## 🧬 QA & Testing do tests still pass?
## 🧰 Changes continuing my work in #1188 with even more work to migrate over our tests to the more comprehensive `runCommand` helper: - [x] `openapi convert` - [x] `openapi inspect` - [x] `openapi reduce` - [x] `login` - [x] `logout` - [x] `whoami` the only outstanding tests using the now deprecated `runCommandAndReturnResult` helper are the changelog tests, but i'll swap those out if/when we get around to migrating that command over to APIv2. ## 🧬 QA & Testing no functional changes. do tests still pass?
1e98f71
to
61fd7a8
Compare
Before: ``` Package Current Wanted Latest Location Depended by @oclif/core 4.2.6 4.2.8 4.2.8 node_modules/@oclif/core rdme @oclif/plugin-autocomplete 3.2.20 3.2.24 3.2.24 node_modules/@oclif/plugin-autocomplete rdme @oclif/plugin-help 6.2.24 6.2.26 6.2.26 node_modules/@oclif/plugin-help rdme @oclif/plugin-not-found 3.2.40 3.2.44 3.2.44 node_modules/@oclif/plugin-not-found rdme @oclif/plugin-warn-if-update-available 3.1.32 3.1.35 3.1.35 node_modules/@oclif/plugin-warn-if-update-available rdme @oclif/test 4.1.9 4.1.11 4.1.11 node_modules/@oclif/test rdme @readme/better-ajv-errors 2.1.2 2.3.2 2.3.2 node_modules/@readme/better-ajv-errors rdme @readme/eslint-config 14.3.0 14.4.2 14.4.2 node_modules/@readme/eslint-config rdme @vitest/coverage-v8 3.0.5 3.0.7 3.0.7 node_modules/@vitest/coverage-v8 rdme @vitest/expect 3.0.5 3.0.7 3.0.7 node_modules/@vitest/expect rdme eslint 8.57.1 8.57.1 9.21.0 node_modules/eslint rdme knip 5.43.6 5.45.0 5.45.0 node_modules/knip rdme nock 14.0.0 14.0.1 14.0.1 node_modules/nock rdme oclif 4.17.25 4.17.34 4.17.34 node_modules/oclif rdme prettier 3.4.2 3.5.3 3.5.3 node_modules/prettier rdme rollup 4.34.1 4.34.9 4.34.9 node_modules/rollup rdme rollup-plugin-esbuild 6.2.0 6.2.1 6.2.1 node_modules/rollup-plugin-esbuild rdme tsx 4.19.2 4.19.3 4.19.3 node_modules/tsx rdme type-fest 4.33.0 4.36.0 4.36.0 node_modules/type-fest rdme typescript 5.7.3 5.8.2 5.8.2 node_modules/typescript rdme undici 5.28.5 5.28.5 7.4.0 node_modules/undici rdme vitest 3.0.5 3.0.7 3.0.7 node_modules/vitest rdme ``` After: ``` Package Current Wanted Latest Location Depended by eslint 8.57.1 8.57.1 9.21.0 node_modules/eslint rdme undici 5.28.5 5.28.5 7.4.0 node_modules/undici rdme ```
…ors (#1189) Over the past couple weeks I've been rewriting our OpenAPI parser, `@readme/openapi-parser`, to support a new error leveling system -- you can read up on details on this in readmeio/oas#943. This PR pulls in the fruits of my labor there and across `oas` and `oas-normalize`. * [x] Upgrades `oas-normalize` to pull in our new parser engine and error handling. The error leveling work is not being used within `rdme` but for things like specification validation that our parser does `rdme` will now be able to surface more than one of these errors at a time. 🎉 * Support for Node 18 has also been removed. * [x] Upgrades `oas` and `@readme/oas-examples` to pull in the removal of Node 18 support. All told this overhaul is mostly a drop-in replacement with the exception that instead of `SyntaxError` and `MissingPointerError` exceptions being thrown from the parser for some invalid API definition cases it will now always be a `ValidationError.`
erunion
approved these changes
Mar 19, 2025
🎉 This PR is included in version 9.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 10.2.0-next.6 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
refactor
Issues about tackling technical debt
released on @next
released on @v9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧰 Changes
backports a lot of random changes over to v9:
docs upload
owlfooding #1178everything in this PR is more or less behind-the-scenes changes to our tests, our build process, etc. and shouldn't have any actual impact on customers, hence i'm marking this PR as achore
.i've deliberately held off on bumping all of our deps in this PR since i want to have the changes from #1189 in their own PR that trigger a patch release on the v9 channel.edit: i've decided that i'm packing everything into here and will merge this via a merge commit. this includes all dep bumps, including backporting fixes for #1187 and #1046.
quick before/after of the outdated dependencies:
before
after
🧬 QA & Testing
do tests pass?