Skip to content

Commit 765eee5

Browse files
committed
chore(dependencies): Upgrade dev dependencies
1 parent b5cc4af commit 765eee5

File tree

5 files changed

+626
-401
lines changed

5 files changed

+626
-401
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ cache:
1111
directories:
1212
- "node_modules"
1313
before_script:
14-
- 'if [[ -n "$TRAVIS_TAG" ]] && [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then yarn run create-github-release || true; fi'
14+
- 'if [[ -n "$TRAVIS_TAG" ]] && [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then yarn run create-github-release; fi'
1515
script:
1616
- yarn lint
1717
- yarn test -- --ci
18-
after_success: yarn website:build
18+
after_success: yarn website
1919
deploy:
2020
provider: pages
2121
skip_cleanup: true

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88
"clean:commonjs": "rimraf lib",
99
"clean:umd": "rimraf dist",
1010
"create-github-release": "conventional-github-releaser -p angular",
11-
"build:commonjs": "BABEL_OUTPUT=commonjs babel src/ --out-dir lib/ --ignore **/__tests__,**/__mocks__",
11+
"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": "BABEL_TARGET=rollup yarn rollup -c",
13+
"build:umd": "cross-env BABEL_TARGET=rollup yarn rollup -c",
1414
"build": "npm-run-all clean:* --parallel build:*",
1515
"format": "eslint src --fix",
1616
"lint": "eslint src",
1717
"precommit": "lint-staged",
1818
"prebump": "run-s lint test",
1919
"prepublish": "yarn run build",
2020
"release": "standard-version --sign",
21-
"test": "BABEL_OUTPUT=commonjs jest",
21+
"test": "cross-env BABEL_OUTPUT=commonjs jest",
2222
"start": "webpack-dev-server --inline --content-base examples/",
23-
"website:build": "rimraf examples/dist && webpack && cp -R examples/src/example examples/dist"
23+
"website": "run-s website:clean website:build website:redirect",
24+
"website:clean": "rimraf examples/dist",
25+
"website:build": "webpack",
26+
"website:redirect": "cp -R examples/src/example examples/dist"
2427
},
2528
"repository": {
2629
"type": "git",
@@ -59,7 +62,7 @@
5962
"babel-plugin-transform-react-remove-prop-types": "^0.4.0",
6063
"babel-preset-env": "^2.0.0-beta.2",
6164
"babel-preset-react": "^7.0.0-beta.2",
62-
"conventional-github-releaser": "^1.1.12",
65+
"conventional-github-releaser": "^2.0.0",
6366
"cross-env": "^5.0.0",
6467
"css-loader": "^0.28.0",
6568
"enzyme": "^3.1.0",

src/components/UncontrolledTabs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ export default class UncontrolledTabs extends Component {
152152
let wasTabFocused = false;
153153

154154
if (canUseActiveElement) {
155-
wasTabFocused = React.Children
156-
.toArray(child.props.children)
155+
wasTabFocused = React.Children.toArray(child.props.children)
157156
.filter(isTab)
158157
.some((tab, i) => document.activeElement === this.getTab(i));
159158
}

src/helpers/propTypes.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ export function onSelectPropType(props, propName, componentName, location, propF
5151

5252
if (prop && typeof prop !== 'function') {
5353
error = new Error(
54-
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${componentName}\`, expected \`function\`.`,
54+
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
55+
componentName
56+
}\`, expected \`function\`.`,
5557
);
5658
} else if (props.selectedIndex != null && prop == null) {
5759
error = new Error(
58-
`The ${location} \`${name}\` is marked as required in \`${componentName}\`, but its value is \`undefined\` or \`null\`.
60+
`The ${location} \`${name}\` is marked as required in \`${
61+
componentName
62+
}\`, but its value is \`undefined\` or \`null\`.
5963
\`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.
6064
If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`,
6165
);
@@ -71,12 +75,18 @@ export function selectedIndexPropType(props, propName, componentName, location,
7175

7276
if (prop != null && typeof prop !== 'number') {
7377
error = new Error(
74-
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${componentName}\`, expected \`number\`.`,
78+
`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to \`${
79+
componentName
80+
}\`, expected \`number\`.`,
7581
);
7682
} else if (props.defaultIndex != null && prop != null) {
7783
return new Error(
78-
`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` in \`${componentName}\`.
79-
Either remove \`${name}\` to let \`${componentName}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`,
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.`,
8090
);
8191
}
8292

0 commit comments

Comments
 (0)