-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
1 parent
5adfb86
commit f36df6f
Showing
68 changed files
with
121 additions
and
749 deletions.
There are no files selected for viewing
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
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
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
1 change: 0 additions & 1 deletion
1
...gins/babel-plugin-amp-story-supported-languages/test/fixtures/transform/replace/output.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
1 change: 0 additions & 1 deletion
1
...abel-plugins/babel-plugin-deep-pure/test/fixtures/transform/ignored-not-import/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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
const pure = v => v; | ||
|
||
const ignored = pure(foo() || new Bar() || pure(pure(foo('bar', bar(), new Baz())) || 'foo')); |
7 changes: 0 additions & 7 deletions
7
...bel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/ignored/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 |
---|---|---|
@@ -1,24 +1,17 @@ | ||
// Import does not end with core/dom/jsx so we ignore this file. | ||
|
||
/** @jsx Preact.createElement */ | ||
import * as Preact from 'preact'; | ||
|
||
() => Preact.createElement("svg", null); | ||
|
||
() => Preact.createElement("svg", { | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}); | ||
|
||
() => Preact.createElement("path", { | ||
foo: "bar" | ||
}); | ||
|
||
() => Preact.createElement("circle", { | ||
foo: "bar" | ||
}); | ||
|
||
() => Preact.createElement("div", null); | ||
|
||
() => Preact.createElement("span", { | ||
class: "whatever" | ||
}); |
6 changes: 0 additions & 6 deletions
6
...l-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-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 |
---|---|---|
@@ -1,26 +1,20 @@ | ||
/** @jsx jsx.createElement */ | ||
import * as jsx from '../ANYWHERE_THAT_LEADS_TO/core/dom/jsx'; | ||
|
||
() => jsx.createElement("svg", { | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}); | ||
|
||
() => jsx.createElement("svg", { | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}); | ||
|
||
() => jsx.createElement("path", { | ||
foo: "bar", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}); | ||
|
||
() => jsx.createElement("circle", { | ||
foo: "bar", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}); | ||
|
||
() => jsx.createElement("div", null); | ||
|
||
() => jsx.createElement("span", { | ||
class: "whatever" | ||
}); |
16 changes: 6 additions & 10 deletions
16
...el-plugin-imported-helpers/test/fixtures/transform-assertions/imported-helpers/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 |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import _objectSpread from "@babel/runtime/helpers/objectSpread2"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
|
||
const _foo = foo, | ||
a = _foo.a, | ||
b = _foo.b, | ||
c = _objectWithoutPropertiesLoose(_foo, ["a", "b"]); | ||
|
||
a = _foo.a, | ||
b = _foo.b, | ||
c = _objectWithoutPropertiesLoose(_foo, ["a", "b"]); | ||
const _bar = bar, | ||
d = _bar.d, | ||
e = _bar.e, | ||
f = _objectWithoutPropertiesLoose(_bar, ["d", "e"]); | ||
|
||
d = _bar.d, | ||
e = _bar.e, | ||
f = _objectWithoutPropertiesLoose(_bar, ["d", "e"]); | ||
const g = _objectSpread({}, foo); | ||
|
||
const h = _objectSpread({ | ||
bar | ||
}, bar); |
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
5 changes: 0 additions & 5 deletions
5
...tem/babel-plugins/babel-plugin-jsx-style-object/test/fixtures/transform/nested/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 |
---|---|---|
@@ -1,11 +1,6 @@ | ||
import * as jsx from 'ANYWHERE_LEADING_TO/core/dom/jsx'; | ||
|
||
const logicalAnd = () => <div style={x && "background:red;"} />; | ||
|
||
const logicalAndDeep = () => <div style={x && foo && "color:red;"} />; | ||
|
||
const logicalOr = () => <div style={x || "background:red;"} />; | ||
|
||
const ternary = () => <div style={x ? "color:red;" : "background:red;"} />; | ||
|
||
const ternaryNested = () => <div style={x ? y ? "color:red;" : null : "background:red;"} />; |
11 changes: 0 additions & 11 deletions
11
...abel-plugins/babel-plugin-jsx-style-object/test/fixtures/transform/transformed/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 |
---|---|---|
@@ -1,39 +1,28 @@ | ||
import { jsxStylePropertyString as _jsxStylePropertyString2 } from "#core/dom/jsx/style-property-string"; | ||
import { jsxStylePropertyString as _jsxStylePropertyString } from "#core/dom/jsx/style-property-string"; | ||
import * as jsx from 'ANYWHERE_LEADING_TO/core/dom/jsx'; | ||
|
||
const randomObjectExpressionsAreUnmodified = () => ({ | ||
background, | ||
color: null | ||
}); | ||
|
||
const nonObjectExpressionsAreUnmodified = () => <div> | ||
<div style={foo} /> | ||
<div style={foo ? 'foo: bar;' : null} /> | ||
</div>; | ||
|
||
const red = 'red'; | ||
|
||
const otherAttributesAreUnmodified = () => <div foo={{ | ||
color: null, | ||
'background-color': red, | ||
backgroundImage, | ||
opacity: 0, | ||
width: 100 | ||
}} />; | ||
|
||
const modified = () => <div style={"background-color:red;" + _jsxStylePropertyString("background-image", backgroundImage, true) + "opacity:0;" + "width:100px;"} />; | ||
|
||
const emptyStringValueIsRemoved = () => <div style={""} />; | ||
|
||
let dynamic = 0; | ||
|
||
function modifyDynamicValue() { | ||
dynamic = 1; | ||
} | ||
|
||
let backgroundColor = 'blue'; | ||
|
||
const constants = () => <div style={"background-color:blue;" + "width:100px;" + "color:white;" + _jsxStylePropertyString2("opacity", dynamic)} />; | ||
|
||
const empty = () => <div style={""} />; |
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
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
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
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
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
Oops, something went wrong.