Skip to content

Commit a7b9b7d

Browse files
Merge branch 'release/2.0.0'
2 parents 6e69d39 + 5ab4911 commit a7b9b7d

File tree

10 files changed

+57
-30
lines changed

10 files changed

+57
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ puphpet/
6767

6868
# VisualStudioCode
6969
.vscode/*
70+
artifacts/

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
33
- "node"
4-
- "4"
4+
- "6"
55
env:
66
global:
77
- SAUCE_USERNAME=wimpyprogrammer
@@ -14,8 +14,6 @@ addons:
1414
artifacts:
1515
paths:
1616
- artifacts/
17-
jwt:
18-
secure: DI9J+mvFZNvINUcq//aq1+HtWlWcphVTaSAmifQ1DYAKcQ8nEXaQYds1Fzu0yeW2KfAH6rWxNsdmHIPkgzJxP50lXyuUYVKisU1y0jVpkKQSZBNB6hTRNSJxVk7ZqPDa78/zfUuiVUszUuTIBymFod3yq1zYdwJ8eUQmc25tTZ2GcmfAUmsO1qt48nFopxSgeVaduzm5fdvB8nkn+mEFWBBlICgPX0h4RVMzt6ozlX57iwvqVppErCphHuelOXcUQXmOUPIPN/MAR04ia8XBTYTh48ZrbI9RRxMJFfbnUiCDyPXKsznPgBGnQUFpFYIFSVYShz1i/j7h+jSvHDI0xorAviY/u0tWwa+qn+cOWaQFfSu4wkdcwDjpvkTKdY87Hi+uyzToyo1oNN479O907u4sRHNWHx3q6uquzEFm79K1XR3zK1AE4ElIlRa10GXiYS3vH1rUx1oUQVZJiEkwy+Vrl8pAp1Gwpq/lJpqj/Ps2C1LDPBX7c9tP7+R5sOM7pRGuhPK3zTqxelPoZ88urHGIPCnIN9O+8rjgOK1yqSWVufz29Y/wuvwvD7y+Uz99asyxS5HoqNrorcrQdEPznv3GoDU/gOZHMqTJWmbqkuHVU4T8lVvqgAIdfYzaXrzttpKCgeF5+jP3ThS358l+86c76XXf7eLWxHWU84LSr6Q=
1917
sauce_connect: true
2018
before_install:
2119
- nvm install-latest-npm
@@ -26,3 +24,6 @@ script:
2624
after_script:
2725
- find artifacts/ -name "*.log"
2826
- cat artifacts/sauce_connect.log
27+
cache:
28+
directories:
29+
- node_modules

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# react-responsive-breakpoints
22

3+
[![npm package](https://badge.fury.io/js/react-responsive-breakpoints.svg)](https://badge.fury.io/js/react-responsive-breakpoints)
4+
![node version](https://img.shields.io/node/v/react-responsive-breakpoints.svg)
35
[![Build Status](https://travis-ci.org/wimpyprogrammer/react-responsive-breakpoints.svg?branch=feature%2Fautomated-builds)](https://travis-ci.org/wimpyprogrammer/react-responsive-breakpoints)
46
[![codecov](https://codecov.io/gh/wimpyprogrammer/react-responsive-breakpoints/branch/master/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/react-responsive-breakpoints)
57
[![Known Vulnerabilities](https://snyk.io/test/github/wimpyprogrammer/react-responsive-breakpoints/badge.svg)](https://snyk.io/test/github/wimpyprogrammer/react-responsive-breakpoints)

artifacts/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This directory is required for Sauce Connect to generate a log file.
2+
3+
It's contents are excluded from source control.

karma-ci.conf.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const browsersToTest = {
3535
base: 'SauceLabs',
3636
browserName: 'safari',
3737
platform: 'macOS 10.13',
38-
version: '11.0',
38+
version: '11.1',
3939
},
4040
};
4141

karma-common.conf.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ module.exports = (
33
frameworks: ['mocha', 'viewport'],
44

55
files: [
6-
'src/**/*.js',
6+
'test-setup.js',
77
],
88

99
preprocessors: {
10-
'src/**/*.js': ['webpack'],
10+
'test-setup.js': ['webpack'],
1111
},
1212

1313
reporters: ['mocha', 'coverage'],
@@ -24,15 +24,26 @@ module.exports = (
2424

2525
webpack: {
2626

27+
mode: 'development',
28+
2729
resolve: {
2830
alias: {
2931
'react/addons': `${__dirname}/node_modules/react/dist/react-with-addons.js`,
3032
},
3133
},
3234

3335
module: {
34-
loaders: [
35-
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
36+
rules: [
37+
{
38+
test: /\.js$/,
39+
include: [
40+
`${__dirname}/src/`,
41+
`${__dirname}/node_modules/sinon/`,
42+
],
43+
use: {
44+
loader: 'babel-loader',
45+
},
46+
},
3647
],
3748
},
3849

package.json

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"name": "react-responsive-breakpoints",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"description": "A higher-order React component to translate CSS breakpoints into properties",
55
"main": "lib/index.js",
66
"files": [
77
"lib/**/!(*.spec).js"
88
],
9+
"engines": {
10+
"node": ">=6"
11+
},
912
"scripts": {
1013
"build": "npm run clean && babel src --out-dir lib",
1114
"clean": "rimraf lib",
@@ -33,44 +36,45 @@
3336
"lodash.throttle": "^4.1.1"
3437
},
3538
"devDependencies": {
36-
"ajv": "^5.5.2",
39+
"airbnb-js-shims": "^2.1.0",
3740
"babel-cli": "^6.26.0",
41+
"babel-core": "^6.0.0",
3842
"babel-loader": "^7.1.2",
3943
"babel-plugin-istanbul": "^4.1.5",
4044
"babel-plugin-transform-object-rest-spread": "^6.26.0",
4145
"babel-preset-es2015": "^6.24.1",
4246
"babel-preset-react": "^6.24.1",
4347
"babel-register": "^6.26.0",
4448
"chai": "^4.1.2",
45-
"codecov": "^3.0.0",
49+
"codecov": "^3.0.1",
4650
"cross-env": "^5.0.5",
4751
"dirty-chai": "^2.0.1",
48-
"enzyme": "^3.3.0",
49-
"enzyme-adapter-react-16": "^1.1.0",
50-
"enzyme-adapter-react-helper": "^1.2.2",
51-
"eslint": "^4.6.1",
52-
"eslint-config-airbnb": "^16.1.0",
53-
"eslint-plugin-import": "^2.7.0",
54-
"eslint-plugin-jsx-a11y": "^6.0.3",
55-
"eslint-plugin-react": "^7.3.0",
56-
"karma": "^2.0.0",
52+
"enzyme": "^3.5.0",
53+
"enzyme-adapter-react-16": "^1.3.0",
54+
"enzyme-adapter-react-helper": "^1.3.0",
55+
"eslint": "^5.3.0",
56+
"eslint-config-airbnb": "^17.1.0",
57+
"eslint-plugin-import": "^2.14.0",
58+
"eslint-plugin-jsx-a11y": "^6.1.1",
59+
"eslint-plugin-react": "^7.11.1",
60+
"karma": "^3.0.0",
5761
"karma-coverage": "^1.1.1",
5862
"karma-mocha": "^1.3.0",
5963
"karma-mocha-reporter": "^2.2.4",
6064
"karma-sauce-launcher": "^1.2.0",
61-
"karma-viewport": "^0.4.2",
62-
"karma-webpack": "^2.0.4",
65+
"karma-viewport": "^1.0.0",
66+
"karma-webpack": "^3.0.0",
6367
"lodash.merge": "^4.6.0",
6468
"lodash.once": "^4.1.1",
65-
"mocha": "^4.0.1",
66-
"publish-please": "^2.3.1",
69+
"mocha": "^5.0.0",
70+
"publish-please": "^3.2.0",
6771
"react": "*",
6872
"react-dom": "*",
6973
"react-test-renderer": "*",
7074
"rimraf": "^2.6.2",
71-
"sinon": "^4.1.3",
72-
"sinon-chai": "^2.13.0",
73-
"webpack": "^3.6.0"
75+
"sinon": "^6.0.1",
76+
"sinon-chai": "^3.2.0",
77+
"webpack": "^4.16.5"
7478
},
7579
"peerDependencies": {
7680
"react": "*"

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import withBreakpointsCustom from './withBreakpointsCustom';
1+
const withBreakpointsCustom = require('./withBreakpointsCustom').default;
22

33
module.exports = {
44
withBreakpointsCustom,

src/withBreakpointsCustom.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import sinonChai from 'sinon-chai';
99
import once from 'lodash.once';
1010

1111
import withBreakpointsCustom from './withBreakpointsCustom';
12-
import '../test-setup';
1312

1413
const customStylesId = 'karma-test-styles';
1514
let isWindowResized = false;
@@ -56,7 +55,7 @@ const InnerComponent = () => <div />;
5655
const sandbox = sinon.createSandbox();
5756

5857
afterEach((done) => {
59-
sandbox.reset();
58+
sandbox.resetHistory();
6059

6160
if (isWindowResized) {
6261
viewport.reset();

test-setup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
/* eslint-env mocha */
22
import configure from 'enzyme-adapter-react-helper';
33

4+
// ES2015 polyfills for Sinon and Enzyme
5+
import 'airbnb-js-shims/target/es2015';
6+
47
configure();
8+
9+
const testsContext = require.context('./src/', true, /\.spec\.js$/);
10+
testsContext.keys().forEach(testsContext);

0 commit comments

Comments
 (0)