Skip to content

Commit

Permalink
chore(deps): Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Feb 17, 2018
1 parent 5a5c831 commit 647e8d2
Show file tree
Hide file tree
Showing 4 changed files with 2,338 additions and 1,617 deletions.
10 changes: 4 additions & 6 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

const target = process.env.BABEL_TARGET;
const output = process.env.BABEL_OUTPUT;
const modules = target === 'rollup' || output == null ? false : output;
const modules = output == null ? false : output;

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

if (target === 'rollup') {
options.plugins.push('external-helpers');
} else if (target === 'examples') {
if (target === 'examples') {
options.plugins.push(['transform-react-remove-prop-types', { removeImport: true }]);
} else {
options.plugins.push(['transform-react-remove-prop-types', { mode: 'wrap' }]);
Expand Down
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"create-github-release": "conventional-github-releaser -p angular",
"build:commonjs": "cross-env BABEL_OUTPUT=commonjs babel src/ --out-dir lib/ --ignore **/__tests__,**/__mocks__",
"build:esm": "babel src/ --out-dir esm/ --ignore **/__tests__,**/__mocks__",
"build:umd": "cross-env BABEL_TARGET=rollup yarn rollup -c",
"build:umd": "yarn rollup -c",
"build": "npm-run-all clean:* --parallel build:*",
"format": "eslint src --fix",
"lint": "eslint src",
Expand Down Expand Up @@ -51,17 +51,18 @@
"react": "^0.14.9 || ^15.3.0 || ^16.0.0"
},
"devDependencies": {
"babel-cli": "^7.0.0-beta.2",
"babel-core": "^7.0.0-beta.2",
"@babel/cli": "^7.0.0-beta.40",
"@babel/core": "^7.0.0-beta.40",
"@babel/plugin-external-helpers": "^7.0.0-beta.40",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.40",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40",
"@babel/preset-env": "^7.0.0-beta.40",
"@babel/preset-react": "^7.0.0-beta.40",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.0.1",
"babel-jest": "^21.3.0-beta.1",
"babel-jest": "^22.2.2",
"babel-loader": "^7.1.2",
"babel-plugin-external-helpers": "^7.0.0-beta.2",
"babel-plugin-transform-class-properties": "^7.0.0-beta.2",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.0",
"babel-preset-env": "^2.0.0-beta.2",
"babel-preset-react": "^7.0.0-beta.2",
"conventional-github-releaser": "^2.0.0",
"cross-env": "^5.0.0",
"css-loader": "^0.28.0",
Expand All @@ -79,10 +80,10 @@
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"husky": "^0.14.3",
"jest": "^21.3.0-beta.1",
"jest": "^22.3.0",
"less": "^2.7.3",
"less-loader": "^4.0.5",
"lint-staged": "^4.0.4",
"lint-staged": "^6.0.0",
"npm-run-all": "^4.1.1",
"prettier": "^1.2.2",
"react": "^16.0.0",
Expand All @@ -91,15 +92,15 @@
"react-modal": "^3.0.0",
"react-test-renderer": "^16.0.0",
"rimraf": "^2.5.2",
"rollup": "^0.51.5",
"rollup-plugin-babel": "^3.0.2",
"rollup": "^0.56.1",
"rollup-plugin-babel": "^4.0.0-beta.1",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-ignore": "^1.0.3",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"rollup-plugin-uglify": "^3.0.0",
"standard-version": "^4.2.0",
"style-loader": "^0.19.0",
"style-loader": "^0.20.0",
"uglifyjs-webpack-plugin": "^1.0.1",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.4"
Expand Down
36 changes: 17 additions & 19 deletions src/helpers/propTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export function childrenPropType(props, propName, componentName) {
if (isTab(child)) {
if (!tabListFound || listTabs.indexOf(child) === -1) {
error = new Error(
"Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.",
"Found a 'Tab' component outside of the 'TabList' component. 'Tab' components " +
"have to be inside the 'TabList' component.",
);
}
tabsCount++;
Expand All @@ -36,7 +37,7 @@ export function childrenPropType(props, propName, componentName) {

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

if (prop && typeof prop !== 'function') {
error = new Error(
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
componentName
}\`, expected \`function\`.`,
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied ` +
`to \`${componentName}\`, expected \`function\`.`,
);
} else if (props.selectedIndex != null && prop == null) {
error = new Error(
`The ${location} \`${name}\` is marked as required in \`${
componentName
}\`, but its value is \`undefined\` or \`null\`.
\`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.
If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`,
`The ${location} \`${name}\` is marked as required in \`${componentName}\`, but ` +
`its value is \`undefined\` or \`null\`.\n` +
`\`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.\n` +
`If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`,
);
}

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

if (prop != null && typeof prop !== 'number') {
error = new Error(
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
componentName
}\`, expected \`number\`.`,
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to ` +
`\`${componentName}\`, expected \`number\`.`,
);
} else if (props.defaultIndex != null && prop != null) {
return new Error(
`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` in \`${
componentName
}\`.
Either remove \`${name}\` to let \`${
componentName
}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`,
`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` ` +
`in \`${componentName}\`.\n` +
`Either remove \`${name}\` to let \`${componentName}\` handle the selected ` +
`tab internally or remove \`defaultIndex\` to handle it yourself.`,
);
}

Expand Down
Loading

0 comments on commit 647e8d2

Please sign in to comment.