Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"babel-preset-minify": "^0.5.0",
"chai": "^4.1.2",
"chai-enzyme": "^1.0.0-beta.0",
"cheerio": "^1.0.0-0",
"cheerio": "1.0.0-rc.3",
"cross-env": "^5.2.0",
"css-loader": "^2.1.0",
"enzyme": "^3.3.0",
Expand All @@ -41,6 +41,7 @@
"prompt": "^1.0.0",
"react": "^16.3.2",
"react-dom": "^16.7.0",
"rimraf": "^2.6.3",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.3.0",
"rollup-plugin-license": "^0.7.0",
Expand All @@ -54,6 +55,14 @@
"dependencies": {
"prop-types": "^15.6.1"
},
"overrides": {
"enzyme": {
"cheerio": "1.0.0-rc.3"
}
},
"resolutions": {
"cheerio": "1.0.0-rc.3"
},
"files": [
"cjs",
"umd",
Expand All @@ -70,12 +79,14 @@
},
"scripts": {
"lint": "eslint .",
"test": "npm run tests",
"tests": "mocha",
"watch-tests": "mocha --watch",
"prepublish": "npm run build-cjs && npm run build-es && npm run build-umd",
"build-cjs": "rm -rf cjs && npm run build-development && npm run build-production",
"build-es": "rm -rf es && npm run build-es-development && npm run build-es-production",
"build-umd": "rm -rf umd && npm run build-umd-development && npm run build-umd-production",
"build": "npm run build-cjs && npm run build-es && npm run build-umd",
"prepublishOnly": "npm run build",
"build-cjs": "rimraf cjs && npm run build-development && npm run build-production",
"build-es": "rimraf es && npm run build-es-development && npm run build-es-production",
"build-umd": "rimraf umd && npm run build-umd-development && npm run build-umd-production",
"build-development": "cross-env BABEL_ENV=development NODE_ENV=development babel src -d cjs",
"build-es-development": "cross-env BABEL_ENV=es-development NODE_ENV=development babel src -d es",
"build-umd-development": "cross-env BABEL_ENV=umd-development NODE_ENV=development rollup --format umd --name ReactHotkeys -c --file umd/react-hotkeys.js",
Expand Down
9 changes: 6 additions & 3 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ function copyProps(src, target) {
}
global.window = window;
global.document = window.document;
global.navigator = {
userAgent: 'node.js',
};
Object.defineProperty(global, 'navigator', {
configurable: true,
value: {
userAgent: 'node.js',
},
});
global.requestAnimationFrame = function (callback) {
return setTimeout(callback, 0);
};
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1361,13 +1361,13 @@ check-error@^1.0.2:
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=

cheerio@^1.0.0-0, cheerio@^1.0.0-rc.2:
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=
cheerio@1.0.0-rc.3, cheerio@^1.0.0-rc.3:
version "1.0.0-rc.3"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6"
integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==
dependencies:
css-select "~1.2.0"
dom-serializer "~0.1.0"
dom-serializer "~0.1.1"
entities "~1.1.1"
htmlparser2 "^3.9.1"
lodash "^4.15.0"
Expand Down