Skip to content

Commit 545bf16

Browse files
committedJun 25, 2020
Upgrade deps
1 parent fe87a05 commit 545bf16

File tree

3 files changed

+1328
-700
lines changed

3 files changed

+1328
-700
lines changed
 

‎package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test:watch": "npm test -- --watch",
1111
"test:examples": "node examples/",
1212
"cover": "cross-env BABEL_ENV=commonjs istanbul cover node_modules/mocha/bin/_mocha -- --require babel-core/register --recursive",
13-
"lint": "eslint src test",
13+
"lint": "eslint src",
1414
"build": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
1515
"prepublish": "npm run clean && npm run lint && npm run test && npm run build"
1616
},
@@ -42,19 +42,19 @@
4242
"devDependencies": {
4343
"babel": "^6.23.0",
4444
"babel-cli": "^6.26.0",
45-
"babel-eslint": "^8.2.1",
46-
"babel-plugin-add-module-exports": "^0.2.1",
45+
"babel-eslint": "^10.1.0",
46+
"babel-plugin-add-module-exports": "^1.0.2",
4747
"babel-preset-es2015": "^6.24.1",
4848
"babel-preset-stage-2": "^6.24.1",
49-
"chai": "^4.1.2",
50-
"cross-env": "^5.1.3",
51-
"eslint": "^4.16.0",
52-
"eslint-config-airbnb": "^16.1.0",
53-
"eslint-plugin-import": "^2.7.0",
54-
"eslint-plugin-jsx-a11y": "^6.0.2",
55-
"eslint-plugin-react": "^7.4.0",
49+
"chai": "^4.2.0",
50+
"cross-env": "^7.0.2",
51+
"eslint": "^7.3.1",
52+
"eslint-config-airbnb": "^18.2.0",
53+
"eslint-plugin-import": "^2.21.2",
54+
"eslint-plugin-jsx-a11y": "^6.3.1",
55+
"eslint-plugin-react": "^7.20.0",
5656
"istanbul": "^1.0.0-alpha",
57-
"mocha": "^5.0.0",
58-
"rimraf": "^2.6.2"
57+
"mocha": "^8.0.1",
58+
"rimraf": "^3.0.2"
5959
}
6060
}

‎src/index.js

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
/* global window self */
22

3-
const isBrowser =
4-
typeof window !== 'undefined' && typeof window.document !== 'undefined';
3+
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
54

65
/* eslint-disable no-restricted-globals */
7-
const isWebWorker =
8-
typeof self === 'object' &&
9-
self.constructor &&
10-
self.constructor.name === 'DedicatedWorkerGlobalScope';
6+
const isWebWorker = typeof self === 'object'
7+
&& self.constructor
8+
&& self.constructor.name === 'DedicatedWorkerGlobalScope';
119
/* eslint-enable no-restricted-globals */
1210

13-
const isNode =
14-
typeof process !== 'undefined' &&
15-
process.versions != null &&
16-
process.versions.node != null;
11+
const isNode = typeof process !== 'undefined'
12+
&& process.versions != null
13+
&& process.versions.node != null;
1714

1815
/**
1916
* @see https://github.com/jsdom/jsdom/releases/tag/12.0.0
2017
* @see https://github.com/jsdom/jsdom/issues/1537
2118
*/
2219
/* eslint-disable no-undef */
23-
const isJsDom = () =>
24-
(typeof window !== 'undefined' && window.name === 'nodejs') ||
25-
navigator.userAgent.includes('Node.js') ||
26-
navigator.userAgent.includes('jsdom');
20+
const isJsDom = () => (typeof window !== 'undefined' && window.name === 'nodejs')
21+
|| navigator.userAgent.includes('Node.js')
22+
|| navigator.userAgent.includes('jsdom');
2723

28-
export { isBrowser, isWebWorker, isNode, isJsDom };
24+
export {
25+
isBrowser, isWebWorker, isNode, isJsDom
26+
};

‎yarn.lock

+1,303-673
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.