Skip to content

Commit

Permalink
Merge branch 'next' into oleh/openapi-adding-command-to-solve-circula…
Browse files Browse the repository at this point in the history
…rity-and-recursiveness
  • Loading branch information
olehshh authored Jan 8, 2025
2 parents 58ebfb6 + fbbffe4 commit ddf9ac2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
with:
rdme: openapi validate oas-examples-repo/3.1/json/petstore.json

# Docs: https://rdme-test.readme.io
# Docs: https://rdme-refactored-test.readme.io
- name: Run `openapi` command
uses: ./rdme-repo/
with:
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
- name: next
prerelease: true
- name: v9
channel: 9.x
range: 9.x

plugins:
- '@semantic-release/commit-analyzer'
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# [10.1.0-next.4](https://github.com/readmeio/rdme/compare/v10.1.0-next.3...v10.1.0-next.4) (2025-01-06)


### Features

* **v9:** backport openapi tooling etc. from v10 ([#1145](https://github.com/readmeio/rdme/issues/1145)) ([14828db](https://github.com/readmeio/rdme/commit/14828db4aa8d29c2509198ed2be53b91e9ce3fdb))

# [10.1.0-next.3](https://github.com/readmeio/rdme/compare/v10.1.0-next.2...v10.1.0-next.3) (2025-01-06)


### Bug Fixes

* **openapi:** type fixes in `prepareOas` ([#1141](https://github.com/readmeio/rdme/issues/1141)) ([fc55d28](https://github.com/readmeio/rdme/commit/fc55d285658e7918bc697398d7c2b10e8a39cacc))

# [9.1.0](https://github.com/readmeio/rdme/compare/v9.0.5...v9.1.0) (2025-01-06)


### Features

* **v9:** backport openapi tooling etc. from v10 ([#1145](https://github.com/readmeio/rdme/issues/1145)) ([14828db](https://github.com/readmeio/rdme/commit/14828db4aa8d29c2509198ed2be53b91e9ce3fdb))

# [10.1.0-next.2](https://github.com/readmeio/rdme/compare/v10.1.0-next.1...v10.1.0-next.2) (2025-01-06)


Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ When writing command logic, avoid using `console` statements (and correspondingl

<summary><b>Updated Guidance</b></summary>

When writing command logic, avoid using `console` statements. As modeled by [the `openapi upload` command](./src/commands/openapi/upload.ts), we use [`oclif`'s command methods](https://oclif.io/docs/commands/#command-methods) for writing to the console. This allows us to seamlessly integrate [`oclif`'s support for JSON output](https://oclif.io/docs/json/).
When writing command logic, avoid using `console` statements. As modeled by [the `openapi upload` command](https://github.com/readmeio/rdme/blob/1e199064b0418b11b56ce08bad3d96ff2bead10c/src/commands/openapi/upload.ts) (only available in `v10` and above), we use [`oclif`'s command methods](https://oclif.io/docs/commands/#command-methods) for writing to the console. This allows us to seamlessly integrate [`oclif`'s support for JSON output](https://oclif.io/docs/json/).

[The `@oclif/test` helper](https://github.com/oclif/test) automatically mocks any writes to `stdout` or `stderr`. This is great for properly asserting `rdme` outputs, but can be a bit confusing to develop with at first if you rely on `console.log` as part of your debugging since those statements won't get written to the console the way you'd expect.

If you rely on `console.log` (or something similar) during development, you can do the following to view your output:

1. Make sure you're using the `runCommand` helper in [this file](./__tests__/helpers/oclif.ts) and **not** `runCommandAndReturnResult`. See [this test file](./__tests__/commands/openapi/upload.test.ts) for an example.
1. Make sure you're using the `runCommand` helper in [this file](https://github.com/readmeio/rdme/blob/1e199064b0418b11b56ce08bad3d96ff2bead10c/__tests__/helpers/oclif.ts) and **not** `runCommandAndReturnResult`. See [this test file](https://github.com/readmeio/rdme/blob/1e199064b0418b11b56ce08bad3d96ff2bead10c/__tests__/commands/openapi/upload.test.ts) for an example.

2. Add a statement like this in your test:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ To set this up, check out [1Password's documentation on the ReadMe shell plugin]

```sh
export HTTPS_PROXY=https://proxy.example.com:5678
rdme openapi upload
rdme login
```

# GitHub Actions Configuration
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rdme",
"version": "10.1.0-next.3",
"version": "10.1.0-next.4",
"description": "ReadMe's official CLI and GitHub Action.",
"license": "MIT",
"author": "ReadMe <[email protected]> (https://readme.com)",
Expand Down

0 comments on commit ddf9ac2

Please sign in to comment.