Skip to content

Commit f77f19b

Browse files
tatomyrJLekawa
andauthored
fix: build-docs failure with React 19 (#1892)
* fix: build-docs failure with React 19 * Apply suggestions from code review --------- Co-authored-by: Jacek Łękawa <[email protected]>
1 parent 4e5ef2b commit f77f19b

File tree

8 files changed

+193
-825
lines changed

8 files changed

+193
-825
lines changed

.changeset/proud-windows-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/cli": patch
3+
---
4+
5+
Fixed an issue where the `build-docs` command failed when React 19 was installed in the project folder.

.github/workflows/smoke.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ jobs:
297297
docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
298298
docker run --rm -v $PWD:/spec redocly/cli:latest build-docs openapi.yaml
299299
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
300-
if [[ "$(wc -l redoc-static.html)" == "300 redoc-static.html" ]]; then
300+
if [[ "$(wc -l redoc-static.html)" == "324 redoc-static.html" ]]; then
301301
echo "Docs built correctly."
302302
else
303-
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 300 lines in redoc-static.html)."
303+
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 324 lines in redoc-static.html)."
304304
exit 1
305305
fi

__tests__/build-docs/build-docs-with-config-option/snapshot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`E2E build-docs build docs with config option 1`] = `
44
Found nested/redocly.yaml and using theme.openapi options
55
Prerendering docs
66
7-
🎉 bundled successfully in: nested/redoc-static.html (33 KiB) [⏱ <test>ms].
7+
🎉 bundled successfully in: nested/redoc-static.html (36 KiB) [⏱ <test>ms].
88
99
1010
`;

__tests__/build-docs/simple-build-docs/snapshot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`E2E build-docs simple build-docs 1`] = `
44
Found undefined and using theme.openapi options
55
Prerendering docs
66
7-
🎉 bundled successfully in: redoc-static.html (324 KiB) [⏱ <test>ms].
7+
🎉 bundled successfully in: redoc-static.html (330 KiB) [⏱ <test>ms].
88
99
1010
`;

__tests__/commands.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ describe('E2E', () => {
667667
(<any>expect(cleanupOutput(result))).toMatchSpecificSnapshot(join(testPath, 'snapshot.js'));
668668

669669
expect(fs.existsSync(join(testPath, 'nested/redoc-static.html'))).toEqual(true);
670-
expect(fs.statSync(join(testPath, 'nested/redoc-static.html')).size).toEqual(32952);
670+
expect(fs.statSync(join(testPath, 'nested/redoc-static.html')).size).toEqual(36237);
671671
});
672672
});
673673

__tests__/smoke/run-smoke.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ $2 redocly-lint
1717
$2 redocly-bundle
1818
$2 redocly-build-docs
1919
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
20-
if [[ "$(wc -l redoc-static.html)" == "300 redoc-static.html" ]]; then
20+
if [[ "$(wc -l redoc-static.html)" == "324 redoc-static.html" ]]; then
2121
echo "Docs built correctly."
2222
else
23-
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 300 lines in redoc-static.html)."
23+
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 324 lines in redoc-static.html)."
2424
exit 1
2525
fi

0 commit comments

Comments
 (0)