Skip to content

Commit 48d711e

Browse files
authored
refactor(deps): Upgrade peer dependencies to latest working versions (#1180)
BREAKING CHANGE: Peer dependencies have been updated and will require host applications to update as well to avoid npm warnings.
1 parent 8a4c294 commit 48d711e

File tree

6 files changed

+192
-313
lines changed

6 files changed

+192
-313
lines changed

conf/webpack.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const safeParser = require('postcss-safe-parser');
99
const packageJSON = require('../package.json');
1010
const license = require('./license');
1111

12-
const { BannerPlugin, DefinePlugin } = webpack;
12+
const { BannerPlugin, DefinePlugin, IgnorePlugin } = webpack;
1313
const noReactSuffix = '.no.react';
1414
const isRelease = process.env.NODE_ENV === 'production';
1515
const isDev = process.env.NODE_ENV === 'dev';
@@ -67,7 +67,6 @@ function getConfig(isReactExternalized) {
6767
examples: path.join(__dirname, '../examples/src'), // for examples only
6868
'react-intl-locale-data': path.resolve(`node_modules/react-intl/locale-data/${locale}`),
6969
'box-ui-elements-locale-data': path.resolve(`i18n/${language}`),
70-
moment: path.resolve('src/utils/MomentShim'), // Hack to leverage Intl instead
7170
'rsg-components/Wrapper': path.join(__dirname, '../examples/Wrapper'), // for examples only
7271
},
7372
},
@@ -84,8 +83,7 @@ function getConfig(isReactExternalized) {
8483
test: /\.(js|mjs)$/,
8584
loader: 'babel-loader',
8685
// For webpack dev build perf we want to exlcude node_modules unless we want to support legacy browsers like IE11
87-
// Pikaday complains about moment.js which we don't use, hence excluding it from compilation as its already es5
88-
exclude: shouldIncludeAllSupportedBrowsers ? /node_modules\/pikaday/ : /node_modules/,
86+
exclude: shouldIncludeAllSupportedBrowsers ? [] : /node_modules/,
8987
},
9088
{
9189
test: /\.s?css$/,
@@ -115,6 +113,9 @@ function getConfig(isReactExternalized) {
115113
},
116114
}),
117115
new BannerPlugin(license),
116+
new IgnorePlugin({
117+
resourceRegExp: /moment$/, // Moment is optionally included by Pikaday, but is not needed in our bundle
118+
}),
118119
],
119120
stats,
120121
};

examples/src/SelectorDropdownExamples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const SelectorDropdownExamples = () => (
131131
'The Chronic',
132132
'Straight Outta Compton',
133133
'Reasonable Doubt',
134-
'Super long name that should be truncated, we should see the dots at the very end, adding some more text here, should truncate at any moment now, please truncate soon',
134+
'Super long name that should be truncated, we should see the dots at the very end, adding some more text here, should truncate at any second now, please truncate soon',
135135
]}
136136
placeholder="Select an album"
137137
title="Album"

package.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"@babel/preset-react": "^7.0.0",
145145
"@babel/template": "^7.0.0",
146146
"@babel/types": "^7.0.0",
147-
"@box/frontend": "^1.1.1",
147+
"@box/frontend": "^1.4.0",
148148
"@box/languages": "^1.0.0",
149149
"@commitlint/cli": "^7.2.1",
150150
"@commitlint/config-conventional": "^7.1.2",
@@ -189,12 +189,13 @@
189189
"eslint-plugin-lodash": "^5.1.0",
190190
"eslint-plugin-prettier": "^2.6.2",
191191
"eslint-plugin-react": "^7.8.2",
192-
"filesize": "^3.6.1",
192+
"eslint-plugin-react-hooks": "^1.6.0",
193+
"filesize": "^4.1.2",
193194
"flow-bin": "^0.95.1",
194195
"flow-copy-source": "^2.0.2",
195196
"flow-typed": "^2.5.1",
196197
"form-serialize": "^0.7.2",
197-
"formik": "^1.5.2",
198+
"formik": "^1.5.4",
198199
"husky": "^1.1.2",
199200
"immutable": "^3.7.4",
200201
"intl": "^1.2.5",
@@ -206,13 +207,13 @@
206207
"lodash": "^4.17.11",
207208
"mini-css-extract-plugin": "^0.4.2",
208209
"mocha": "^5.2.0",
209-
"mousetrap": "^1.6.1",
210+
"mousetrap": "^1.6.3",
210211
"mutationobserver-shim": "^0.3.3",
211212
"node-sass": "^4.9.3",
212213
"npm-run-all": "^4.1.3",
213214
"nsp": "^3.2.1",
214215
"optimize-css-assets-webpack-plugin": "^5.0.1",
215-
"pikaday": "^1.7.0",
216+
"pikaday": "^1.8.0",
216217
"postcss-loader": "^3.0.0",
217218
"postcss-safe-parser": "^4.0.1",
218219
"prettier": "^1.16.4",
@@ -222,21 +223,21 @@
222223
"query-string": "5.1.1",
223224
"raf": "^3.4.0",
224225
"react": "^16.8.0",
225-
"react-animate-height": "^2.0.4",
226+
"react-animate-height": "^2.0.8",
226227
"react-beautiful-dnd": "^9.0.2",
227228
"react-dom": "^16.8.0",
228-
"react-draggable": "^3.0.4",
229+
"react-draggable": "^3.3.0",
229230
"react-immutable-proptypes": "^2.1.0",
230-
"react-intl": "^2.3.0",
231-
"react-measure": "^2.2.2",
232-
"react-modal": "^3.5.1",
231+
"react-intl": "^2.8.0",
232+
"react-measure": "^2.3.0",
233+
"react-modal": "^3.8.1",
233234
"react-process-string": "^1.2.0",
234-
"react-router-dom": "^4.3.1",
235+
"react-router-dom": "^5.0.0",
235236
"react-styleguidist": "^8.0.6",
236237
"react-tether": "1.0.1",
237-
"react-textarea-autosize": "^6.1.0",
238-
"react-virtualized": "^9.20.1",
239-
"regenerator-runtime": "^0.12.1",
238+
"react-textarea-autosize": "^7.1.0",
239+
"react-virtualized": "^9.21.0",
240+
"regenerator-runtime": "^0.13.2",
240241
"sass-lint": "^1.12.1",
241242
"sass-loader": "^7.1.0",
242243
"sass-variable-parser": "^1.2.2",
@@ -261,30 +262,30 @@
261262
"axios": "^0.18.0",
262263
"classnames": "^2.2.5",
263264
"draft-js": "^0.10.1",
264-
"filesize": "^3.6.0",
265+
"filesize": "^4.1.2",
265266
"form-serialize": "^0.7.2",
266-
"formik": "^1.5.2",
267+
"formik": "^1.5.4",
267268
"immutable": "^3.7.4",
268269
"jsuri": "^1.3.1",
269270
"lodash": "^4.17.5",
270-
"mousetrap": "^1.6.1",
271-
"pikaday": "^1.6.1",
271+
"mousetrap": "^1.6.3",
272+
"pikaday": "^1.8.0",
272273
"query-string": "5.1.1",
273274
"react": "^16.8.0",
274-
"react-animate-height": "^2.0.4",
275+
"react-animate-height": "^2.0.8",
275276
"react-beautiful-dnd": "^9.0.2",
276277
"react-dom": "^16.8.0",
277-
"react-draggable": "^3.0.4",
278+
"react-draggable": "^3.3.0",
278279
"react-immutable-proptypes": "^2.1.0",
279-
"react-intl": "^2.3.0",
280-
"react-measure": "^2.2.2",
281-
"react-modal": "^3.5.1",
280+
"react-intl": "^2.8.0",
281+
"react-measure": "^2.3.0",
282+
"react-modal": "^3.8.1",
282283
"react-process-string": "^1.2.0",
283-
"react-router-dom": "^4.3.1",
284+
"react-router-dom": "^5.0.0",
284285
"react-tether": "^1.0.0",
285-
"react-textarea-autosize": "^6.1.0",
286-
"react-virtualized": "^9.20.1",
287-
"regenerator-runtime": "^0.11.1",
286+
"react-textarea-autosize": "^7.1.0",
287+
"react-virtualized": "^9.21.0",
288+
"regenerator-runtime": "^0.13.2",
288289
"scroll-into-view-if-needed": "^1.5.0",
289290
"tabbable": "^1.1.2",
290291
"uuid": "^3.3.2"

src/components/slide-carousel/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@ const Slide = require('./Slide').default;
88
<div style={ { width: "700px" } }>
99
<SlideCarousel contentHeight="250px" initialIndex={3} title="Love & Happiness">
1010
<Slide>
11-
<Logo/>
1211
<p>who said what? <button type="button">Me</button></p>
1312
</Slide>
1413
<Slide>
15-
<SelectedItemsEmptyState/>
1614
<p>Exquisite cordially mr happiness of neglected distrusts. Boisterous impossible unaffected he me everything. Is fine loud deal an rent open give. Find upon and sent spot song son eyes. Do endeavor he differed carriage is learning my graceful. Feel plan know is he like on pure. See burst found sir met think hopes are marry among. Delightful remarkably new assistance saw literature mrs favourable.</p>
1715
</Slide>
1816
<Slide className="classy">
19-
<TrashEmptyState/>
2017
<p>Received shutters expenses ye he pleasant. Drift as blind above at up. No up simple county stairs do should praise as. Drawings sir gay together landlord had law smallest. Formerly welcomed attended declared met say unlocked. Jennings outlived no dwelling denoting in peculiar as he believed. Behaviour excellent middleton be as it curiosity departure ourselves.</p>
2118
</Slide>
2219
<Slide>
23-
<UpdatesEmptyState/>
2420
<p>Ye to misery wisdom plenty polite to as. Prepared interest proposal it he exercise. My wishing an in attempt ferrars. Visited eat you why service looking engaged. At place no walls hopes rooms fully in. Roof hope shy tore leaf joy paid boy. Noisier out brought entered detract because sitting sir. Fat put occasion rendered off humanity has.</p>
2521
</Slide>
2622
<Slide>
2723
<p>Extended kindness trifling remember he confined outlived if. Assistance sentiments yet unpleasing say. Open they an busy they my such high. An active dinner wishes at unable hardly no talked on. Immediate him her resolving his favourite. Wished denote abroad at branch at. Arrival entered an if drawing request. How daughters not promotion few knowledge contented. Yet winter law behind number stairs garret excuse. Minuter we natural conduct gravity if pointed oh no. Am immediate unwilling of attempted admitting disposing it. Handsome opinions on am at it ladyship.</p>
2824
</Slide>
2925
</SlideCarousel>
3026
</div>
31-
```
27+
```

src/utils/MomentShim.js

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

0 commit comments

Comments
 (0)