-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
187 changed files
with
1,209 additions
and
4 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
.../transforms/src/react/jsx/fixture/nextReact/optimisation.react.constant-elements/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class App extends React.Component { | ||
render() { | ||
const navbarHeader = <div className="navbar-header"> | ||
<a className="navbar-brand" href="/"> | ||
<img src="/img/logo/logo-96x36.png" /> | ||
</a> | ||
</div>; | ||
|
||
return <div> | ||
<nav className="navbar navbar-default"> | ||
<div className="container"> | ||
{navbarHeader} | ||
</div> | ||
</nav> | ||
</div>; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...nsforms/src/react/jsx/fixture/nextReact/optimisation.react.constant-elements/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"plugins": [ | ||
["external-helpers", { "helperVersion": "7.100.0" }], | ||
"transform-react-constant-elements", | ||
"transform-classes", | ||
"syntax-jsx" | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
...ransforms/src/react/jsx/fixture/nextReact/optimisation.react.constant-elements/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
var _ref = <div className="navbar-header"> | ||
<a className="navbar-brand" href="/"> | ||
<img src="/img/logo/logo-96x36.png" /> | ||
</a> | ||
</div>; | ||
|
||
let App = /*#__PURE__*/function (_React$Component) { | ||
babelHelpers.inherits(App, _React$Component); | ||
|
||
var _super = babelHelpers.createSuper(App); | ||
|
||
function App() { | ||
babelHelpers.classCallCheck(this, App); | ||
return _super.apply(this, arguments); | ||
} | ||
|
||
babelHelpers.createClass(App, [{ | ||
key: "render", | ||
value: function render() { | ||
const navbarHeader = _ref; | ||
return <div> | ||
<nav className="navbar navbar-default"> | ||
<div className="container"> | ||
{navbarHeader} | ||
</div> | ||
</nav> | ||
</div>; | ||
} | ||
}]); | ||
return App; | ||
}(React.Component); |
9 changes: 9 additions & 0 deletions
9
ecmascript/transforms/src/react/jsx/fixture/nextReact/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"plugins": [ | ||
"external-helpers", | ||
["transform-react-jsx", { "runtime": "automatic" }], | ||
"transform-react-display-name", | ||
"transform-arrow-functions" | ||
], | ||
"sourceType": "module" | ||
} |
2 changes: 2 additions & 0 deletions
2
...transforms/src/react/jsx/fixture/nextReact/pragma-works-with-no-space-at-the-end/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* @jsxImportSource foo*/ | ||
<div>Hi</div>; |
6 changes: 6 additions & 0 deletions
6
...ansforms/src/react/jsx/fixture/nextReact/pragma-works-with-no-space-at-the-end/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { jsx as _jsx } from "foo/jsx-runtime"; | ||
|
||
/* @jsxImportSource foo*/ | ||
_jsx("div", { | ||
children: "Hi" | ||
}); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-add-quotes-es3/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var es3 = <F aaa new const var default foo-bar/>; |
6 changes: 6 additions & 0 deletions
6
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-add-quotes-es3/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "automatic" }], | ||
"transform-property-literals" | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-add-quotes-es3/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var es3 = /*#__PURE__*/_jsx(F, { | ||
aaa: true, | ||
"new": true, | ||
"const": true, | ||
"var": true, | ||
"default": true, | ||
"foo-bar": true | ||
}); |
1 change: 1 addition & 0 deletions
1
...ript/transforms/src/react/jsx/fixture/nextReact/should-allow-constructor-as-prop/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Component constructor="foo" />; |
6 changes: 6 additions & 0 deletions
6
...pt/transforms/src/react/jsx/fixture/nextReact/should-allow-constructor-as-prop/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx(Component, { | ||
constructor: "foo" | ||
}); |
1 change: 1 addition & 0 deletions
1
...pt/transforms/src/react/jsx/fixture/nextReact/should-allow-deeper-js-namespacing/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Namespace.DeepNamespace.Component />; |
4 changes: 4 additions & 0 deletions
4
.../transforms/src/react/jsx/fixture/nextReact/should-allow-deeper-js-namespacing/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx(Namespace.DeepNamespace.Component, {}); |
1 change: 1 addition & 0 deletions
1
...t/transforms/src/react/jsx/fixture/nextReact/should-allow-elements-as-attributes/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div attr=<div /> /> |
6 changes: 6 additions & 0 deletions
6
...transforms/src/react/jsx/fixture/nextReact/should-allow-elements-as-attributes/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
attr: /*#__PURE__*/_jsx("div", {}) | ||
}); |
1 change: 1 addition & 0 deletions
1
...cript/transforms/src/react/jsx/fixture/nextReact/should-allow-js-namespacing/blacklist.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
React.createElement(Namespace.Component, null); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-allow-js-namespacing/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Namespace.Component />; |
4 changes: 4 additions & 0 deletions
4
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-allow-js-namespacing/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx(Namespace.Component, {}); |
12 changes: 12 additions & 0 deletions
12
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-allow-nested-fragments/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div> | ||
< > | ||
<> | ||
<span>Hello</span> | ||
<span>world</span> | ||
</> | ||
<> | ||
<span>Goodbye</span> | ||
<span>world</span> | ||
</> | ||
</> | ||
</div> |
22 changes: 22 additions & 0 deletions
22
...cript/transforms/src/react/jsx/fixture/nextReact/should-allow-nested-fragments/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: /*#__PURE__*/_jsxs(_Fragment, { | ||
children: [/*#__PURE__*/_jsxs(_Fragment, { | ||
children: [/*#__PURE__*/_jsx("span", { | ||
children: "Hello" | ||
}), /*#__PURE__*/_jsx("span", { | ||
children: "world" | ||
})] | ||
}), /*#__PURE__*/_jsxs(_Fragment, { | ||
children: [/*#__PURE__*/_jsx("span", { | ||
children: "Goodbye" | ||
}), /*#__PURE__*/_jsx("span", { | ||
children: "world" | ||
})] | ||
})] | ||
}) | ||
}); |
15 changes: 15 additions & 0 deletions
15
.../react/jsx/fixture/nextReact/should-avoid-wrapping-in-extra-parens-if-not-needed/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var x = <div> | ||
<Component /> | ||
</div>; | ||
|
||
var x = <div> | ||
{props.children} | ||
</div>; | ||
|
||
var x = <Composite> | ||
{props.children} | ||
</Composite>; | ||
|
||
var x = <Composite> | ||
<Composite2 /> | ||
</Composite>; |
17 changes: 17 additions & 0 deletions
17
...eact/jsx/fixture/nextReact/should-avoid-wrapping-in-extra-parens-if-not-needed/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx("div", { | ||
children: /*#__PURE__*/_jsx(Component, {}) | ||
}); | ||
|
||
var x = /*#__PURE__*/_jsx("div", { | ||
children: props.children | ||
}); | ||
|
||
var x = /*#__PURE__*/_jsx(Composite, { | ||
children: props.children | ||
}); | ||
|
||
var x = /*#__PURE__*/_jsx(Composite, { | ||
children: /*#__PURE__*/_jsx(Composite2, {}) | ||
}); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-convert-simple-tags/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = <div></div>; |
3 changes: 3 additions & 0 deletions
3
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-convert-simple-tags/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx("div", {}); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-convert-simple-text/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = <div>text</div>; |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-convert-simple-text/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx("div", { | ||
children: "text" | ||
}); |
1 change: 1 addition & 0 deletions
1
...cript/transforms/src/react/jsx/fixture/nextReact/should-disallow-spread-children/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>{...children}</div>; |
3 changes: 3 additions & 0 deletions
3
...t/transforms/src/react/jsx/fixture/nextReact/should-disallow-spread-children/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "Spread children are not supported in React." | ||
} |
1 change: 1 addition & 0 deletions
1
...cript/transforms/src/react/jsx/fixture/nextReact/should-disallow-xml-namespacing/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Namespace:Component />; |
3 changes: 3 additions & 0 deletions
3
...t/transforms/src/react/jsx/fixture/nextReact/should-disallow-xml-namespacing/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning." | ||
} |
3 changes: 3 additions & 0 deletions
3
...ript/transforms/src/react/jsx/fixture/nextReact/should-escape-xhtml-jsxattribute/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div id="wôw" />; | ||
<div id="\w" />; | ||
<div id="w < w" />; |
16 changes: 16 additions & 0 deletions
16
...pt/transforms/src/react/jsx/fixture/nextReact/should-escape-xhtml-jsxattribute/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
id: "w\xF4w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
id: "\\w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
id: "w < w" | ||
}); |
12 changes: 12 additions & 0 deletions
12
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-escape-xhtml-jsxtext/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div>wow</div>; | ||
<div>wôw</div>; | ||
|
||
<div>w & w</div>; | ||
<div>w & w</div>; | ||
|
||
<div>w w</div>; | ||
<div>this should not parse as unicode: \u00a0</div>; | ||
<div>this should parse as nbsp: </div>; | ||
<div>this should parse as unicode: {'\u00a0 '}</div>; | ||
|
||
<div>w < w</div>; |
47 changes: 47 additions & 0 deletions
47
ecmascript/transforms/src/react/jsx/fixture/nextReact/should-escape-xhtml-jsxtext/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "wow" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "w\xF4w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "w & w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "w & w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "w \xA0 w" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "this should not parse as unicode: \\u00a0" | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "this should parse as nbsp: \xA0 " | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsxs("div", { | ||
children: ["this should parse as unicode: ", '\u00a0 '] | ||
}); | ||
|
||
/*#__PURE__*/ | ||
_jsx("div", { | ||
children: "w < w" | ||
}); |
11 changes: 11 additions & 0 deletions
11
...ipt/transforms/src/react/jsx/fixture/nextReact/should-handle-attributed-elements/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var HelloMessage = React.createClass({ | ||
render: function() { | ||
return <div>Hello {this.props.name}</div>; | ||
} | ||
}); | ||
|
||
React.render(<HelloMessage name={ | ||
<span> | ||
Sebastian | ||
</span> | ||
} />, mountNode); |
15 changes: 15 additions & 0 deletions
15
...t/transforms/src/react/jsx/fixture/nextReact/should-handle-attributed-elements/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
var HelloMessage = React.createClass({ | ||
displayName: "HelloMessage", | ||
render: function () { | ||
return /*#__PURE__*/_jsxs("div", { | ||
children: ["Hello ", this.props.name] | ||
}); | ||
} | ||
}); | ||
React.render( /*#__PURE__*/_jsx(HelloMessage, { | ||
name: /*#__PURE__*/_jsx("span", { | ||
children: "Sebastian" | ||
}) | ||
}), mountNode); |
1 change: 1 addition & 0 deletions
1
...nsforms/src/react/jsx/fixture/nextReact/should-handle-has-own-property-correctly/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<hasOwnProperty>testing</hasOwnProperty>; |
6 changes: 6 additions & 0 deletions
6
...forms/src/react/jsx/fixture/nextReact/should-handle-has-own-property-correctly/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
/*#__PURE__*/ | ||
_jsx("hasOwnProperty", { | ||
children: "testing" | ||
}); |
5 changes: 5 additions & 0 deletions
5
...rms/src/react/jsx/fixture/nextReact/should-have-correct-comma-in-nested-children/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var x = <div> | ||
<div><br /></div> | ||
<Component>{foo}<br />{bar}</Component> | ||
<br /> | ||
</div>; |
10 changes: 10 additions & 0 deletions
10
...s/src/react/jsx/fixture/nextReact/should-have-correct-comma-in-nested-children/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsxs("div", { | ||
children: [/*#__PURE__*/_jsx("div", { | ||
children: /*#__PURE__*/_jsx("br", {}) | ||
}), /*#__PURE__*/_jsxs(Component, { | ||
children: [foo, /*#__PURE__*/_jsx("br", {}), bar] | ||
}), /*#__PURE__*/_jsx("br", {})] | ||
}); |
16 changes: 16 additions & 0 deletions
16
...t/jsx/fixture/nextReact/should-insert-commas-after-expressions-before-whitespace/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var x = | ||
<div | ||
attr1={ | ||
"foo" + "bar" | ||
} | ||
attr2={ | ||
"foo" + "bar" + | ||
|
||
"baz" + "bug" | ||
} | ||
attr3={ | ||
"foo" + "bar" + | ||
"baz" + "bug" | ||
} | ||
attr4="baz"> | ||
</div> |
8 changes: 8 additions & 0 deletions
8
...jsx/fixture/nextReact/should-insert-commas-after-expressions-before-whitespace/output.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx("div", { | ||
attr1: "foo" + "bar", | ||
attr2: "foo" + "bar" + "baz" + "bug", | ||
attr3: "foo" + "bar" + "baz" + "bug", | ||
attr4: "baz" | ||
}); |
1 change: 1 addition & 0 deletions
1
...sforms/src/react/jsx/fixture/nextReact/should-not-add-quotes-to-identifier-names/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var e = <F aaa new const var default foo-bar/>; |
Oops, something went wrong.