Skip to content

Commit 0b220d0

Browse files
jquensegaearon
authored andcommitted
Remove old IE polyfill code (#10238)
* Upgrade DOM Fixtures Upgrade to react-scripts v1 and include required polyfills for older browsers * Remove ChangeEvent polyfills for unsupported browsers
1 parent c1833b4 commit 0b220d0

File tree

21 files changed

+191
-253
lines changed

21 files changed

+191
-253
lines changed

fixtures/dom/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
"version": "0.1.0",
44
"private": true,
55
"devDependencies": {
6-
"react-scripts": "0.9.5"
6+
"react-scripts": "1.0.0"
77
},
88
"dependencies": {
99
"classnames": "^2.2.5",
10-
"query-string": "^4.2.3",
10+
"core-js": "^2.4.1",
1111
"prop-types": "^15.5.6",
12+
"query-string": "^4.2.3",
1213
"react": "^15.4.1",
1314
"react-dom": "^15.4.1",
1415
"semver": "^5.3.0"

fixtures/dom/public/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
-->
1616
<title>React App</title>
1717
<script src="https://unpkg.com/[email protected]/prop-types.js"></script>
18-
<script src="react-loader.js"></script>
1918
</head>
2019
<body>
2120
<div id="root"></div>

fixtures/dom/public/react-loader.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

fixtures/dom/src/components/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const React = window.React;
21
import Header from './Header';
32
import Fixtures from './fixtures';
4-
53
import '../style.css';
64

5+
const React = window.React;
6+
77
function App() {
88
return (
99
<div>

fixtures/dom/src/components/fixtures/buttons/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const React = window.React;
2-
31
import FixtureSet from '../../FixtureSet';
42
import TestCase from '../../TestCase';
53

4+
const React = window.React;
5+
66
function onButtonClick() {
77
window.alert(`This shouldn't have happened!`);
88
}

fixtures/dom/src/components/fixtures/error-handling/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const React = window.React;
2-
31
import FixtureSet from '../../FixtureSet';
42
import TestCase from '../../TestCase';
53

4+
const React = window.React;
5+
66
function BadRender(props) {
77
throw props.error;
88
}

fixtures/dom/src/components/fixtures/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const React = window.React;
21
import RangeInputFixtures from './range-inputs';
32
import TextInputFixtures from './text-inputs';
43
import SelectFixtures from './selects';
@@ -10,6 +9,8 @@ import ButtonFixtures from './buttons';
109
import DateInputFixtures from './date-inputs';
1110
import ErrorHandling from './error-handling';
1211

12+
const React = window.React;
13+
1314
/**
1415
* A simple routing component that renders the appropriate
1516
* fixture based on the location pathname.
@@ -41,4 +42,4 @@ function FixturesPage() {
4142
}
4243
}
4344

44-
module.exports = FixturesPage;
45+
export default FixturesPage;

fixtures/dom/src/components/fixtures/number-inputs/NumberInputDecimal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const React = window.React;
2-
31
import Fixture from '../../Fixture';
42

3+
const React = window.React;
4+
55
class NumberInputDecimal extends React.Component {
66
state = {value: '.98'};
77
changeValue = () => {

fixtures/dom/src/components/fixtures/number-inputs/NumberInputExtraZeroes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const React = window.React;
2-
31
import Fixture from '../../Fixture';
42

3+
const React = window.React;
4+
55
class NumberInputExtraZeroes extends React.Component {
66
state = {value: '3.0000'};
77
changeValue = () => {

fixtures/dom/src/components/fixtures/number-inputs/NumberTestCase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const React = window.React;
2-
31
import Fixture from '../../Fixture';
42

3+
const React = window.React;
4+
55
class NumberTestCase extends React.Component {
66
state = {value: ''};
77
onChange = event => {

0 commit comments

Comments
 (0)