Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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

2 changes: 1 addition & 1 deletion code/renderers/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"expect-type": "^0.15.0",
"html-tags": "^3.1.0",
"prop-types": "^15.7.2",
"react-element-to-jsx-string": "npm:@7rulnik/react-element-to-jsx-string@15.0.1",
"react-element-to-jsx-string": "patch:react-element-to-jsx-string@npm%3A@7rulnik/react-element-to-jsx-string@15.0.1#~/.yarn/patches/@7rulnik-react-element-to-jsx-string-npm-15.0.1-e53b67c4b3.patch",
"require-from-string": "^2.0.2",
"ts-dedent": "^2.0.0",
"type-fest": "^5.6.0"
Expand Down
12 changes: 12 additions & 0 deletions code/renderers/react/src/docs/jsxDecorator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ describe('renderJsx', () => {
</Container>
`);
});

// Regression for #27127: react-element-to-jsx-string used to omit boolean
// props explicitly set to `false`. Patched via algolia/react-element-to-jsx-string#733
// so a `false` prop is rendered while a `true` prop keeps the shorthand syntax.
it('should render boolean props set to false', () => {
expect(renderJsx(<div hidden={false} draggable={true} />, {})).toMatchInlineSnapshot(`
<div
draggable
hidden={false}
/>
`);
});
});

// @ts-expect-error (Converted from ts-ignore)
Expand Down
16 changes: 15 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9067,7 +9067,7 @@ __metadata:
prop-types: "npm:^15.7.2"
react-docgen: "npm:^8.0.2"
react-docgen-typescript: "npm:^2.2.2"
react-element-to-jsx-string: "npm:@7rulnik/react-element-to-jsx-string@15.0.1"
react-element-to-jsx-string: "patch:react-element-to-jsx-string@npm%3A@7rulnik/react-element-to-jsx-string@15.0.1#~/.yarn/patches/@7rulnik-react-element-to-jsx-string-npm-15.0.1-e53b67c4b3.patch"
require-from-string: "npm:^2.0.2"
ts-dedent: "npm:^2.0.0"
type-fest: "npm:^5.6.0"
Expand Down Expand Up @@ -26993,6 +26993,20 @@ __metadata:
languageName: node
linkType: hard

"react-element-to-jsx-string@patch:react-element-to-jsx-string@npm%3A@7rulnik/react-element-to-jsx-string@15.0.1#~/.yarn/patches/@7rulnik-react-element-to-jsx-string-npm-15.0.1-e53b67c4b3.patch":
version: 15.0.1
resolution: "react-element-to-jsx-string@patch:@7rulnik/react-element-to-jsx-string@npm%3A15.0.1#~/.yarn/patches/@7rulnik-react-element-to-jsx-string-npm-15.0.1-e53b67c4b3.patch::version=15.0.1&hash=a50fcc"
dependencies:
"@base2/pretty-print-object": "npm:1.0.1"
is-plain-object: "npm:5.0.0"
react-is: "npm:18.1.0"
peerDependencies:
react: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0
react-dom: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0
checksum: 10c0/33f06a86ad7f8ea81bcdc0dc1111f42a7030910b9c8d5deba0adbc79eaaa38618976211d928ee664142286108b7c2955a5ab7709288c86778d1077f21a8177c3
languageName: node
linkType: hard

"react-fast-compare@npm:^3.0.1, react-fast-compare@npm:^3.2.0":
version: 3.2.2
resolution: "react-fast-compare@npm:3.2.2"
Expand Down