Skip to content

Commit 647e8d2

Browse files
committed
chore(deps): Update dependencies
1 parent 5a5c831 commit 647e8d2

File tree

4 files changed

+2338
-1617
lines changed

4 files changed

+2338
-1617
lines changed

.babelrc.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
const target = process.env.BABEL_TARGET;
44
const output = process.env.BABEL_OUTPUT;
5-
const modules = target === 'rollup' || output == null ? false : output;
5+
const modules = output == null ? false : output;
66

77
const options = {
8-
presets: [['env', { loose: true, modules }], 'react'],
9-
plugins: ['transform-object-rest-spread', ['transform-class-properties', { loose: true }]],
8+
presets: [['@babel/env', { loose: true, modules }], '@babel/react'],
9+
plugins: ['@babel/proposal-object-rest-spread', ['@babel/proposal-class-properties', { loose: true }]],
1010
};
1111

12-
if (target === 'rollup') {
13-
options.plugins.push('external-helpers');
14-
} else if (target === 'examples') {
12+
if (target === 'examples') {
1513
options.plugins.push(['transform-react-remove-prop-types', { removeImport: true }]);
1614
} else {
1715
options.plugins.push(['transform-react-remove-prop-types', { mode: 'wrap' }]);

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"create-github-release": "conventional-github-releaser -p angular",
1111
"build:commonjs": "cross-env BABEL_OUTPUT=commonjs babel src/ --out-dir lib/ --ignore **/__tests__,**/__mocks__",
1212
"build:esm": "babel src/ --out-dir esm/ --ignore **/__tests__,**/__mocks__",
13-
"build:umd": "cross-env BABEL_TARGET=rollup yarn rollup -c",
13+
"build:umd": "yarn rollup -c",
1414
"build": "npm-run-all clean:* --parallel build:*",
1515
"format": "eslint src --fix",
1616
"lint": "eslint src",
@@ -51,17 +51,18 @@
5151
"react": "^0.14.9 || ^15.3.0 || ^16.0.0"
5252
},
5353
"devDependencies": {
54-
"babel-cli": "^7.0.0-beta.2",
55-
"babel-core": "^7.0.0-beta.2",
54+
"@babel/cli": "^7.0.0-beta.40",
55+
"@babel/core": "^7.0.0-beta.40",
56+
"@babel/plugin-external-helpers": "^7.0.0-beta.40",
57+
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.40",
58+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40",
59+
"@babel/preset-env": "^7.0.0-beta.40",
60+
"@babel/preset-react": "^7.0.0-beta.40",
61+
"babel-core": "^7.0.0-0",
5662
"babel-eslint": "^8.0.1",
57-
"babel-jest": "^21.3.0-beta.1",
63+
"babel-jest": "^22.2.2",
5864
"babel-loader": "^7.1.2",
59-
"babel-plugin-external-helpers": "^7.0.0-beta.2",
60-
"babel-plugin-transform-class-properties": "^7.0.0-beta.2",
61-
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.2",
6265
"babel-plugin-transform-react-remove-prop-types": "^0.4.0",
63-
"babel-preset-env": "^2.0.0-beta.2",
64-
"babel-preset-react": "^7.0.0-beta.2",
6566
"conventional-github-releaser": "^2.0.0",
6667
"cross-env": "^5.0.0",
6768
"css-loader": "^0.28.0",
@@ -79,10 +80,10 @@
7980
"html-loader": "^0.5.1",
8081
"html-webpack-plugin": "^2.30.1",
8182
"husky": "^0.14.3",
82-
"jest": "^21.3.0-beta.1",
83+
"jest": "^22.3.0",
8384
"less": "^2.7.3",
8485
"less-loader": "^4.0.5",
85-
"lint-staged": "^4.0.4",
86+
"lint-staged": "^6.0.0",
8687
"npm-run-all": "^4.1.1",
8788
"prettier": "^1.2.2",
8889
"react": "^16.0.0",
@@ -91,15 +92,15 @@
9192
"react-modal": "^3.0.0",
9293
"react-test-renderer": "^16.0.0",
9394
"rimraf": "^2.5.2",
94-
"rollup": "^0.51.5",
95-
"rollup-plugin-babel": "^3.0.2",
95+
"rollup": "^0.56.1",
96+
"rollup-plugin-babel": "^4.0.0-beta.1",
9697
"rollup-plugin-commonjs": "^8.2.6",
9798
"rollup-plugin-ignore": "^1.0.3",
9899
"rollup-plugin-node-resolve": "^3.0.0",
99100
"rollup-plugin-replace": "^2.0.0",
100-
"rollup-plugin-uglify": "^2.0.1",
101+
"rollup-plugin-uglify": "^3.0.0",
101102
"standard-version": "^4.2.0",
102-
"style-loader": "^0.19.0",
103+
"style-loader": "^0.20.0",
103104
"uglifyjs-webpack-plugin": "^1.0.1",
104105
"webpack": "^3.6.0",
105106
"webpack-dev-server": "^2.9.4"

src/helpers/propTypes.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export function childrenPropType(props, propName, componentName) {
2525
if (isTab(child)) {
2626
if (!tabListFound || listTabs.indexOf(child) === -1) {
2727
error = new Error(
28-
"Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.",
28+
"Found a 'Tab' component outside of the 'TabList' component. 'Tab' components " +
29+
"have to be inside the 'TabList' component.",
2930
);
3031
}
3132
tabsCount++;
@@ -36,7 +37,7 @@ export function childrenPropType(props, propName, componentName) {
3637

3738
if (!error && tabsCount !== panelsCount) {
3839
error = new Error(
39-
`There should be an equal number of 'Tab' and 'TabPanel' in \`${componentName}\`.` +
40+
`There should be an equal number of 'Tab' and 'TabPanel' in \`${componentName}\`. ` +
4041
`Received ${tabsCount} 'Tab' and ${panelsCount} 'TabPanel'.`,
4142
);
4243
}
@@ -51,17 +52,17 @@ export function onSelectPropType(props, propName, componentName, location, propF
5152

5253
if (prop && typeof prop !== 'function') {
5354
error = new Error(
54-
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
55-
componentName
56-
}\`, expected \`function\`.`,
55+
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied ` +
56+
`to \`${componentName}\`, expected \`function\`.`,
5757
);
5858
} else if (props.selectedIndex != null && prop == null) {
5959
error = new Error(
60-
`The ${location} \`${name}\` is marked as required in \`${
61-
componentName
62-
}\`, but its value is \`undefined\` or \`null\`.
63-
\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.
64-
If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`,
60+
`The ${location} \`${name}\` is marked as required in \`${componentName}\`, but ` +
61+
`its value is \`undefined\` or \`null\`.\n` +
62+
`\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will ` +
63+
`make the tabs not do anything, as \`selectedIndex\` indicates that you want to ` +
64+
`handle the selected tab yourself.\n` +
65+
`If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`,
6566
);
6667
}
6768

@@ -75,18 +76,15 @@ export function selectedIndexPropType(props, propName, componentName, location,
7576

7677
if (prop != null && typeof prop !== 'number') {
7778
error = new Error(
78-
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
79-
componentName
80-
}\`, expected \`number\`.`,
79+
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to ` +
80+
`\`${componentName}\`, expected \`number\`.`,
8181
);
8282
} else if (props.defaultIndex != null && prop != null) {
8383
return new Error(
84-
`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` in \`${
85-
componentName
86-
}\`.
87-
Either remove \`${name}\` to let \`${
88-
componentName
89-
}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`,
84+
`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` ` +
85+
`in \`${componentName}\`.\n` +
86+
`Either remove \`${name}\` to let \`${componentName}\` handle the selected ` +
87+
`tab internally or remove \`defaultIndex\` to handle it yourself.`,
9088
);
9189
}
9290

0 commit comments

Comments
 (0)