Skip to content

Commit e03ac45

Browse files
committed
Update benchmark libraries
Remove the slow and rarely-used libraries from the suite of implementations. Update the remaining packages. Close #1838
1 parent 751f7ec commit e03ac45

File tree

20 files changed

+313
-747
lines changed

20 files changed

+313
-747
lines changed

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<PROJECT_ROOT>/.*/__tests__/.*
66
<PROJECT_ROOT>/packages/.*/dist/.*
77
<PROJECT_ROOT>/packages/docs/.*
8+
.*/node_modules/@emotion/css/*
89
.*/node_modules/babel-plugin-transform-react-remove-prop-types/*
910

1011
[include]

packages/benchmarks/package.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@
99
"dependencies": {
1010
"aphrodite": "^2.4.0",
1111
"classnames": "^2.2.6",
12-
"d3-scale-chromatic": "^1.5.0",
13-
"emotion": "^10.0.27",
14-
"fela": "^11.0.2",
15-
"react-fela": "^11.0.2",
16-
"react-jss": "^10.0.4",
12+
"d3-scale-chromatic": "^2.0.0",
13+
"@emotion/css": "^11.0.0",
14+
"react-jss": "^10.5.0",
1715
"react-native-web": "0.14.9",
18-
"reactxp": "^2.0.0",
19-
"styled-components": "^5.0.0",
20-
"styled-jsx": "^3.2.4",
21-
"styletron-engine-atomic": "^1.4.4",
22-
"styletron-react": "^5.2.6"
16+
"styled-components": "^5.2.1",
17+
"styled-jsx": "^3.3.2"
2318
},
2419
"devDependencies": {
2520
"babel-plugin-react-native-web": "0.14.9",

packages/benchmarks/src/implementations/emotion/Dot.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import React from 'react';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33

44
const Dot = ({ size, x, y, children, color }) => (
55
<div
6-
className={css(styles.root, {
7-
borderBottomColor: color,
8-
borderRightWidth: `${size / 2}px`,
9-
borderBottomWidth: `${size / 2}px`,
10-
borderLeftWidth: `${size / 2}px`,
11-
marginLeft: `${x}px`,
12-
marginTop: `${y}px`
13-
})}
6+
className={css([
7+
styles.root,
8+
{
9+
borderBottomColor: color,
10+
borderRightWidth: `${size / 2}px`,
11+
borderBottomWidth: `${size / 2}px`,
12+
borderLeftWidth: `${size / 2}px`,
13+
marginLeft: `${x}px`,
14+
marginTop: `${y}px`
15+
}
16+
])}
1417
>
1518
{children}
1619
</div>

packages/benchmarks/src/implementations/emotion/View.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { css } from 'emotion';
1+
import { css } from '@emotion/css';
22
import React from 'react';
33

44
class View extends React.Component {
55
render() {
66
const { style, ...other } = this.props;
7-
return <div {...other} className={css(viewStyle, ...style)} />;
7+
return <div {...other} className={css([viewStyle, ...style])} />;
88
}
99
}
1010

packages/benchmarks/src/implementations/react-fela/Box.js

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

packages/benchmarks/src/implementations/react-fela/Dot.js

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

packages/benchmarks/src/implementations/react-fela/Provider.js

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

packages/benchmarks/src/implementations/react-fela/View.js

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

packages/benchmarks/src/implementations/react-fela/index.js

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

packages/benchmarks/src/implementations/reactxp/Box.js

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

packages/benchmarks/src/implementations/reactxp/Dot.js

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

packages/benchmarks/src/implementations/reactxp/Provider.js

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

packages/benchmarks/src/implementations/reactxp/index.js

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

packages/benchmarks/src/implementations/styled-components/Dot.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import styled from 'styled-components';
22
import View from './View';
33

4-
const Dot = styled(View).attrs({
5-
style: props => ({
4+
const Dot = styled(View).attrs(props => ({
5+
style: {
66
marginLeft: `${props.x}px`,
77
marginTop: `${props.y}px`,
88
borderRightWidth: `${props.size / 2}px`,
99
borderBottomWidth: `${props.size / 2}px`,
1010
borderLeftWidth: `${props.size / 2}px`,
1111
borderBottomColor: `${props.color}`
12-
})
13-
})`
12+
}
13+
}))`
1414
position: absolute;
1515
cursor: pointer;
1616
width: 0;

packages/benchmarks/src/implementations/styletron-react/Box.js

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

0 commit comments

Comments
 (0)