diff --git a/.changeset/kind-suits-change.md b/.changeset/kind-suits-change.md new file mode 100644 index 0000000000..3d0c09b9b7 --- /dev/null +++ b/.changeset/kind-suits-change.md @@ -0,0 +1,5 @@ +--- +"@redocly/cli": patch +--- + +Updated React dependency to avoid vulnerable React version (19.0.0) affected by CVE-2025-55182. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 849723d41b..deb2b49ce8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -196,6 +196,24 @@ To update snapshots, run `npm run e2e -- -u`. If you made any changes, make sure to compile the code before running the tests. +### Smoke tests + +Smokes are for testing the CLI in different environments. + +To run them locally, please follow the steps described in the smoke GitHub actions: [smoke-basic](.github/workflows/smoke.yaml), [smoke-plugins](.github/workflows/smoke-plugins.yaml), [smoke-rebilly](.github/workflows/smoke-rebilly.yaml). + +To update smoke tests for the `build-docs` command (which sometimes fails due to external package updates), please follow the steps below: + +```sh +# Build and install the current CLI build locally +npm run compile +npm run pack:prepare +npm i -g redocly-cli.tgz + +# Re-build the docs +(cd __tests__/smoke/ && redocly build-docs openapi.yaml -o pre-built/redoc.html) +``` + ### Performance benchmark To run the performance benchmark locally, you should have `hyperfine` (v1.16.1+) installed on your machine. diff --git a/__tests__/miscellaneous/apply-per-api-decorators/nested/redocly.yaml b/__tests__/miscellaneous/apply-per-api-decorators/nested/redocly.yaml index 16ef578934..67f4626a71 100644 --- a/__tests__/miscellaneous/apply-per-api-decorators/nested/redocly.yaml +++ b/__tests__/miscellaneous/apply-per-api-decorators/nested/redocly.yaml @@ -5,7 +5,7 @@ apis: test/version: on remove-unused-components: on test@external-url: - root: https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml + root: https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml rules: info-contact: error plugins: diff --git a/__tests__/miscellaneous/apply-per-api-decorators/snapshot.js b/__tests__/miscellaneous/apply-per-api-decorators/snapshot.js index d89fa83f46..436e2a999b 100644 --- a/__tests__/miscellaneous/apply-per-api-decorators/snapshot.js +++ b/__tests__/miscellaneous/apply-per-api-decorators/snapshot.js @@ -37,15 +37,15 @@ components: bundling nested/openapi/main.yaml... 📦 Created a bundle for nested/openapi/main.yaml at stdout ms. -bundling https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml... -📦 Created a bundle for https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml at stdout ms. +bundling https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml... +📦 Created a bundle for https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml at stdout ms. `; exports[`E2E miscellaneous lint a specific api (when the api is specified as an alias and it points to an external URL) 1`] = ` -validating https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml... -[1] https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml:2:1 at #/info/contact +validating https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml... +[1] https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml:2:1 at #/info/contact Info object should contain \`contact\` field. @@ -58,7 +58,7 @@ Info object should contain \`contact\` field. Error was generated by the info-contact rule. -https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml: validated in ms +https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/v1/__tests__/miscellaneous/apply-per-api-decorators/nested/openapi/main.yaml: validated in ms ❌ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/smoke/pre-built/redoc.html b/__tests__/smoke/pre-built/redoc.html index 261fa77c78..c4e546f0e3 100644 --- a/__tests__/smoke/pre-built/redoc.html +++ b/__tests__/smoke/pre-built/redoc.html @@ -311,7 +311,7 @@ " class="sc-eVqvcJ sc-fszimp sc-etsjJW kIppRw jnwENr ljKHqG">

OK

Response samples

Content type
application/json
{
  • "message": "string"
}
+

Response samples

Content type
application/json
{
  • "message": "string"
}