Skip to content

Commit ad32141

Browse files
committed
Fix dependencies
1 parent 7e0fb3b commit ad32141

24 files changed

+1456
-1520
lines changed

package.json

+21-21
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,28 @@
5656
"react-dom": "^0.14.9 || >=15.3.0"
5757
},
5858
"devDependencies": {
59-
"@babel/cli": "^7.0.0-beta.42",
60-
"@babel/core": "^7.0.0-beta.42",
61-
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.42",
62-
"@babel/plugin-proposal-export-default-from": "^7.0.0-beta.42",
63-
"@babel/plugin-proposal-export-namespace-from": "^7.0.0-beta.42",
64-
"@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.42",
65-
"@babel/plugin-transform-runtime": "^7.0.0-beta.42",
66-
"@babel/preset-env": "^7.0.0-beta.42",
67-
"@babel/preset-react": "^7.0.0-beta.42",
68-
"@babel/register": "^7.0.0-beta.42",
59+
"@babel/cli": "7.0.0-beta.42",
60+
"@babel/core": "7.0.0-beta.42",
61+
"@babel/plugin-proposal-class-properties": "7.0.0-beta.42",
62+
"@babel/plugin-proposal-export-default-from": "7.0.0-beta.42",
63+
"@babel/plugin-proposal-export-namespace-from": "7.0.0-beta.42",
64+
"@babel/plugin-syntax-dynamic-import": "7.0.0-beta.42",
65+
"@babel/plugin-transform-runtime": "7.0.0-beta.42",
66+
"@babel/preset-env": "7.0.0-beta.42",
67+
"@babel/preset-react": "7.0.0-beta.42",
68+
"@babel/register": "7.0.0-beta.42",
6969
"babel-core": "^7.0.0-bridge.0",
7070
"babel-eslint": "^8.0.0",
71+
"babel-loader": "^8.0.0-beta.2",
7172
"babel-plugin-add-module-exports": "^0.2.1",
7273
"babel-plugin-dev-expression": "^0.2.1",
7374
"babel-plugin-istanbul": "^4.1.5",
7475
"chai": "^3.5.0",
7576
"chalk": "^2.3.2",
76-
"codecov": "^2.2.0",
77+
"codecov": "^3.0.4",
7778
"colors": "^1.2.1",
7879
"create-react-class": "^15.6.3",
79-
"cross-env": "^2.0.0",
80+
"cross-env": "^5.2.0",
8081
"enzyme": "^3.1.0",
8182
"eslint": "^4.19.1",
8283
"eslint-config-airbnb": "^16.1.0",
@@ -86,8 +87,8 @@
8687
"eslint-plugin-mocha": "^5.0.0",
8788
"eslint-plugin-prettier": "^2.6.0",
8889
"eslint-plugin-react": "^7.8.2",
89-
"execa": "^0.10.0",
90-
"fs-extra": "^6.0.1",
90+
"execa": "^0.11.0",
91+
"fs-extra": "^7.0.0",
9192
"husky": "^0.14.3",
9293
"karma": "^2.0.2",
9394
"karma-chrome-launcher": "^2.2.0",
@@ -103,20 +104,19 @@
103104
"lodash": "^4.17.10",
104105
"mocha": "^5.2.0",
105106
"prettier": "^1.12.1",
106-
"react": "^15.5.4",
107-
"react-dom": "^15.5.4",
108-
"react-test-renderer": "^15.6.2",
107+
"react": "^16.4.2",
108+
"react-dom": "^16.4.2",
109+
"react-test-renderer": "^16.4.2",
109110
"release-script": "^1.0.2",
110111
"sinon": "^2.3.2",
111112
"sinon-chai": "^2.8.0",
112113
"webpack": "^4.4.1"
113114
},
114115
"dependencies": {
115-
"@babel/runtime": "^7.0.0-beta.42",
116-
"babel-loader": "^8.0.0-beta.2",
116+
"@babel/runtime": "7.0.0-beta.42",
117117
"classnames": "^2.2.5",
118118
"dom-helpers": "^3.2.0",
119-
"enzyme-adapter-react-15": "^1.0.1",
119+
"enzyme-adapter-react-16": "^1.2.0",
120120
"invariant": "^2.2.4",
121121
"keycode": "^2.2.0",
122122
"prop-types": "^15.6.1",
@@ -125,7 +125,7 @@
125125
"react-prop-types": "^0.4.0",
126126
"react-transition-group": "^2.0.0",
127127
"uncontrollable": "^5.0.0",
128-
"warning": "^3.0.0"
128+
"warning": "^4.0.2"
129129
},
130130
"release-script": {
131131
"bowerRepo": "[email protected]:react-bootstrap/react-bootstrap-bower.git",

src/ProgressBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const defaultProps = {
7777
};
7878

7979
function getPercentage(now, min, max) {
80-
const percentage = (now - min) / (max - min) * 100;
80+
const percentage = ((now - min) / (max - min)) * 100;
8181
return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;
8282
}
8383

test/TabContainerSpec.js

+10
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ describe('<TabContainer>', () => {
173173
instance.assertSingle('[eventKey=2]').assertSingle('.active');
174174

175175
instance.setState({ eventKeys: [1], activeKey: 1 });
176+
// XXX I have no idea why this is needed but the test fails without it.
177+
instance.update();
176178
instance.assertSingle('[eventKey=1]').assertSingle('.active');
177179
});
178180

@@ -195,6 +197,8 @@ describe('<TabContainer>', () => {
195197
instance.assertSingle('[eventKey=3]').assertSingle('.active');
196198

197199
instance.setState({ eventKeys: [1, 2], activeKey: 2 });
200+
// XXX I have no idea why this is needed but the test fails without it.
201+
instance.update();
198202
instance.find(TabPane).length.should.equal(2);
199203
instance.assertSingle('[eventKey=2]').assertSingle('.active');
200204
});
@@ -221,9 +225,13 @@ describe('<TabContainer>', () => {
221225
instance.assertSingle('[eventKey=2]').assertSingle('.active');
222226

223227
instance.setState({ eventKeys: [1, 3], activeKey: 3 });
228+
// XXX I have no idea why this is needed but the test fails without it.
229+
instance.update();
224230
instance.assertSingle('[eventKey=3]').assertSingle('.active');
225231

226232
instance.setState({ eventKeys: [1, 4], activeKey: 4 });
233+
// XXX I have no idea why this is needed but the test fails without it.
234+
instance.update();
227235
instance.assertSingle('[eventKey=4]').assertSingle('.active');
228236
});
229237

@@ -244,6 +252,8 @@ describe('<TabContainer>', () => {
244252

245253
// But once event key changes again, make sure active state switches.
246254
instance.setState({ eventKeys: [1, 2] });
255+
// XXX I have no idea why this is needed but the test fails without it.
256+
instance.update();
247257
instance.assertSingle('[eventKey=1]').assertSingle('.active');
248258
});
249259

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import deprecated from 'prop-types-extra/lib/deprecated';
33
import { _resetWarned } from '../src/utils/deprecationWarning';
44

55
import Enzyme, { ShallowWrapper, ReactWrapper } from 'enzyme';
6-
import Adapter from 'enzyme-adapter-react-15';
6+
import Adapter from 'enzyme-adapter-react-16';
77

88
Enzyme.configure({ adapter: new Adapter() });
99

www/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"graphql-type-json": "^0.1.4",
2222
"lodash": "^4.15.0",
2323
"prop-types": "^15.6.0",
24-
"react": "^15.5.4",
24+
"react": "^16.4.2",
2525
"react-bootstrap": "*",
26-
"react-dom": "^15.5.4",
26+
"react-dom": "^16.4.2",
2727
"react-helmet": "^5.2.0",
2828
"react-live": "^1.9.2"
2929
},
@@ -32,7 +32,9 @@
3232
"@babel/preset-flow": "^7.0.0-beta.40"
3333
},
3434
"homepage": "https://react-bootstrap.github.io/",
35-
"keywords": ["gatsby"],
35+
"keywords": [
36+
"gatsby"
37+
],
3638
"license": "MIT",
3739
"repository": {
3840
"type": "git",

www/src/components/PageFooter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class PageFooter extends React.Component {
6262
target="_blank"
6363
>
6464
bootstrap
65-
</a>; licensed under{' '}
65+
</a>
66+
; licensed under{' '}
6667
<a
6768
href="https://creativecommons.org/licenses/by/3.0/"
6869
rel="noopener noreferrer"

www/src/components/PropTable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ class PropTable extends React.Component {
142142
<small>
143143
<em className="text-info">
144144
<Glyphicon glyph="info-sign" />
145-
&nbsp;{text}
145+
&nbsp;
146+
{text}
146147
</em>
147148
</small>
148149
</div>

www/src/examples/GridWithClearfix.js

+20-5
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,40 @@ const gridInstance = (
1616
<Grid>
1717
<Row className="show-grid">
1818
<Col sm={6} md={3}>
19-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
19+
<code>
20+
&lt;
21+
{'Col sm={6} md={3}'} /&gt;
22+
</code>
2023
<br />
2124
{dummySentences.slice(0, 6).join(' ')}
2225
</Col>
2326
<Col sm={6} md={3}>
24-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
27+
<code>
28+
&lt;
29+
{'Col sm={6} md={3}'} /&gt;
30+
</code>
2531
<br />
2632
{dummySentences.slice(0, 4).join(' ')}
2733
</Col>
2834
<Clearfix visibleSmBlock>
29-
<code>&lt;{'Clearfix visibleSmBlock'} /&gt;</code>
35+
<code>
36+
&lt;
37+
{'Clearfix visibleSmBlock'} /&gt;
38+
</code>
3039
</Clearfix>
3140
<Col sm={6} md={3}>
32-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
41+
<code>
42+
&lt;
43+
{'Col sm={6} md={3}'} /&gt;
44+
</code>
3345
<br />
3446
{dummySentences.slice(0, 6).join(' ')}
3547
</Col>
3648
<Col sm={6} md={3}>
37-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
49+
<code>
50+
&lt;
51+
{'Col sm={6} md={3}'} /&gt;
52+
</code>
3853
<br />
3954
{dummySentences.slice(0, 2).join(' ')}
4055
</Col>

www/src/examples/GridWithoutClearfix.js

+16-4
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,34 @@ const gridInstance = (
1616
<Grid>
1717
<Row className="show-grid">
1818
<Col sm={6} md={3}>
19-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
19+
<code>
20+
&lt;
21+
{'Col sm={6} md={3}'} /&gt;
22+
</code>
2023
<br />
2124
{dummySentences.slice(0, 6).join(' ')}
2225
</Col>
2326
<Col sm={6} md={3}>
24-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
27+
<code>
28+
&lt;
29+
{'Col sm={6} md={3}'} /&gt;
30+
</code>
2531
<br />
2632
{dummySentences.slice(0, 4).join(' ')}
2733
</Col>
2834
<Col sm={6} md={3}>
29-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
35+
<code>
36+
&lt;
37+
{'Col sm={6} md={3}'} /&gt;
38+
</code>
3039
<br />
3140
{dummySentences.slice(0, 6).join(' ')}
3241
</Col>
3342
<Col sm={6} md={3}>
34-
<code>&lt;{'Col sm={6} md={3}'} /&gt;</code>
43+
<code>
44+
&lt;
45+
{'Col sm={6} md={3}'} /&gt;
46+
</code>
3547
<br />
3648
{dummySentences.slice(0, 2).join(' ')}
3749
</Col>

www/src/examples/ThumbnailDiv.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<h3>Thumbnail label</h3>
66
<p>Description</p>
77
<p>
8-
<Button bsStyle="primary">Button</Button>&nbsp;
8+
<Button bsStyle="primary">Button</Button>
9+
&nbsp;
910
<Button bsStyle="default">Button</Button>
1011
</p>
1112
</Thumbnail>
@@ -15,7 +16,8 @@
1516
<h3>Thumbnail label</h3>
1617
<p>Description</p>
1718
<p>
18-
<Button bsStyle="primary">Button</Button>&nbsp;
19+
<Button bsStyle="primary">Button</Button>
20+
&nbsp;
1921
<Button bsStyle="default">Button</Button>
2022
</p>
2123
</Thumbnail>
@@ -25,7 +27,8 @@
2527
<h3>Thumbnail label</h3>
2628
<p>Description</p>
2729
<p>
28-
<Button bsStyle="primary">Button</Button>&nbsp;
30+
<Button bsStyle="primary">Button</Button>
31+
&nbsp;
2932
<Button bsStyle="default">Button</Button>
3033
</p>
3134
</Thumbnail>

www/src/examples/TooltipInCopy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ render(
3636
cleanse vegan chambray. A really ironic artisan{' '}
3737
<LinkWithTooltip tooltip="Another one here too" href="#" id="tooltip-3">
3838
whatever keytar
39-
</LinkWithTooltip>, scenester farm-to-table banksy Austin{' '}
39+
</LinkWithTooltip>
40+
, scenester farm-to-table banksy Austin{' '}
4041
<LinkWithTooltip tooltip="The last tip!" href="#" id="tooltip-4">
4142
twitter handle
4243
</LinkWithTooltip>{' '}

www/src/pages/components/button-group.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export default function ButtonGroupSection({ data }) {
6363
<p>
6464
You can place other button types within the{' '}
6565
<code>{'<ButtonGroup />'}</code> like{' '}
66-
<code>{'<DropdownButton />'}</code>s.
66+
<code>{'<DropdownButton />'}</code>
67+
s.
6768
</p>
6869
<ReactPlayground codeText={ButtonGroupNested} />
6970

www/src/pages/components/buttons.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export default function ButtonSection({ data }) {
101101
<p>
102102
When activating an asynchronous action from a button it is a good UX
103103
pattern to give the user feedback as to the loading state, this can
104-
easily be done by updating your <code>{'<Button />'}</code>&#8217;s
105-
props from a state change like below.
104+
easily be done by updating your <code>{'<Button />'}</code>
105+
&#8217;s props from a state change like below.
106106
</p>
107107
<ReactPlayground codeText={ButtonLoading} />
108108

www/src/pages/components/dropdowns.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,17 @@ export default function DropdownSection({ data }) {
153153
<a href="https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119">
154154
similarly to how it is implemented in{' '}
155155
<code>{'<Dropdown.Menu>'}</code>
156-
</a>.
156+
</a>
157+
.
157158
</p>
158159
<p>
159160
You will have to add <code>react-overlays</code> as a dependency and
160161
import <code>{'<RootCloseWrapper>'}</code> from{' '}
161162
<code>react-overlays</code> yourself like:{' '}
162163
<code>
163164
import RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper'
164-
</code>.
165+
</code>
166+
.
165167
</p>
166168
</div>
167169
<ReactPlayground codeText={DropdownButtonCustomMenu} />

www/src/pages/components/modal.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export default function ModalSection({ data }) {
5656
your container has the <code>modal-container</code> class.
5757
</p>
5858
<pre>
59-
{React.DOM.code(
59+
{React.createElement(
60+
'code',
6061
null,
6162
'.modal-container {\n' +
6263
' position: relative;\n' +

www/src/pages/components/navbar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export default function NavbarSection({ data }) {
2828
<p>
2929
For example <code>navbar-fixed-top</code> becomes the property{' '}
3030
<code>fixedTop</code>. The different properties are{' '}
31-
<code>fixedTop</code>, <code>fixedBottom</code>, <code>staticTop</code>
32-
, <code>inverse</code>, and <code>fluid</code>.
31+
<code>fixedTop</code>, <code>fixedBottom</code>, <code>staticTop</code>,{' '}
32+
<code>inverse</code>, and <code>fluid</code>.
3333
</p>
3434
<p>
3535
You can also align elements to the right by specifying the{' '}

www/src/pages/components/page-header.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ export default function PageHeaderSection({ data }) {
1717
<p>
1818
A simple shell for an <code>h1</code> to appropriately space out and
1919
segment sections of content on a page. It can utilize the{' '}
20-
<code>h1</code>&#8217;s default <code>small</code> element, as well as
21-
most other components (with additional styles).
20+
<code>h1</code>
21+
&#8217;s default <code>small</code> element, as well as most other
22+
components (with additional styles).
2223
</p>
2324
<ReactPlayground codeText={PageHeader} />
2425

0 commit comments

Comments
 (0)