Skip to content

Commit 4df0070

Browse files
jackkinsellaSimenB
authored andcommitted
Add timeout to prevent notifier from locking CPU on MacOS (#8831)
1 parent 3ab2fc1 commit 4df0070

File tree

4 files changed

+21
-41
lines changed

4 files changed

+21
-41
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
### Performance
6262

6363
- `[jest-watcher]` Minor optimization for JestHook ([#8746](https://github.com/facebook/jest/pull/8746)
64+
- `[@jest/reporters]` Prevent runaway CPU useage with `--notify` on macOS ([#8830](https://github.com/facebook/jest/issues/8830))
6465

6566
## 24.8.0
6667

packages/jest-reporters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"jest-runtime": "^24.8.0",
2323
"jest-util": "^24.8.0",
2424
"jest-worker": "^24.6.0",
25-
"node-notifier": "^5.2.1",
25+
"node-notifier": "^5.4.2",
2626
"slash": "^2.0.0",
2727
"source-map": "^0.6.0",
2828
"string-length": "^2.0.0"

packages/jest-reporters/src/notify_reporter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export default class NotifyReporter extends BaseReporter {
118118
closeLabel: 'Close',
119119
icon,
120120
message,
121+
timeout: 10,
121122
title,
122123
},
123124
(err, _, metadata) => {

yarn.lock

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,12 +4033,7 @@ caniuse-api@^3.0.0:
40334033
lodash.memoize "^4.1.2"
40344034
lodash.uniq "^4.5.0"
40354035

4036-
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000984:
4037-
version "1.0.30000984"
4038-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz#dc96c3c469e9bcfc6ad5bdd24c77ec918ea76fe0"
4039-
integrity sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==
4040-
4041-
caniuse-lite@^1.0.30000955:
4036+
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000955, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000984:
40424037
version "1.0.30000985"
40434038
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz#0eb40f6c8a8c219155cbe43c4975c0efb4a0f77f"
40444039
integrity sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==
@@ -5558,16 +5553,11 @@ [email protected]:
55585553
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
55595554
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
55605555

5561-
electron-to-chromium@^1.3.122:
5556+
electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.191:
55625557
version "1.3.200"
55635558
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.200.tgz#78fb858b466269e8eb46d31a52562f00c865127f"
55645559
integrity sha512-PUurrpyDA74MuAjJRD+79ss5BqJlU3mdArRbuu4wO/dt6jc3Ic/6BDmFJxkdwbfq39cHf/XKm2vW98XSvut9Dg==
55655560

5566-
electron-to-chromium@^1.3.191:
5567-
version "1.3.191"
5568-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.191.tgz#c451b422cd8b2eab84dedabab5abcae1eaefb6f0"
5569-
integrity sha512-jasjtY5RUy/TOyiUYM2fb4BDaPZfm6CXRFeJDMfFsXYADGxUN49RBqtgB7EL2RmJXeIRUk9lM1U6A5yk2YJMPQ==
5570-
55715561
elliptic@^6.0.0:
55725562
version "6.5.0"
55735563
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca"
@@ -8253,6 +8243,11 @@ is-wsl@^1.1.0:
82538243
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
82548244
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
82558245

8246+
is-wsl@^2.1.0:
8247+
version "2.1.0"
8248+
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.0.tgz#94369bbeb2249ef07b831b1b08590e686330ccbb"
8249+
integrity sha512-pFTjpv/x5HRj8kbZ/Msxi9VrvtOMRBqaDi3OIcbwPI3OuH+r3lLxVWukLITBaOGJIbA/w2+M1eVmVa4XNQlAmQ==
8250+
82568251
82578252
version "2.0.1"
82588253
resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a"
@@ -9032,12 +9027,7 @@ lodash.uniq@^4.5.0:
90329027
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
90339028
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
90349029

9035-
lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.10:
9036-
version "4.17.14"
9037-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba"
9038-
integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==
9039-
9040-
lodash@^4.17.13:
9030+
lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.10:
90419031
version "4.17.15"
90429032
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
90439033
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
@@ -10015,16 +10005,16 @@ node-modules-regexp@^1.0.0:
1001510005
resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40"
1001610006
integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
1001710007

10018-
node-notifier@^5.2.1:
10019-
version "5.4.0"
10020-
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.0.tgz#7b455fdce9f7de0c63538297354f3db468426e6a"
10021-
integrity sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==
10008+
node-notifier@^5.2.1, node-notifier@^5.4.2:
10009+
version "5.4.2"
10010+
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.2.tgz#a1111b8c1a4c3eb68d98815cc04a899456b03f1a"
10011+
integrity sha512-85nkTziazE2dR4pyoLxMwz0b9MmxFQPVXYs/WlWI7CPtBkARJOV+89khdNjpbclXIJDECQYnTvh1xuZV3WHkCA==
1002210012
dependencies:
1002310013
growly "^1.3.0"
10024-
is-wsl "^1.1.0"
10025-
semver "^5.5.0"
10014+
is-wsl "^2.1.0"
10015+
semver "^6.3.0"
1002610016
shellwords "^0.1.1"
10027-
which "^1.3.0"
10017+
which "^1.3.1"
1002810018

1002910019
node-pre-gyp@^0.12.0:
1003010020
version "0.12.0"
@@ -10042,20 +10032,13 @@ node-pre-gyp@^0.12.0:
1004210032
semver "^5.3.0"
1004310033
tar "^4"
1004410034

10045-
node-releases@^1.1.13:
10035+
node-releases@^1.1.13, node-releases@^1.1.25:
1004610036
version "1.1.26"
1004710037
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.26.tgz#f30563edc5c7dc20cf524cc8652ffa7be0762937"
1004810038
integrity sha512-fZPsuhhUHMTlfkhDLGtfY80DSJTjOcx+qD1j5pqPkuhUHVS7xHZIg9EE4DHK8O3f0zTxXHX5VIkDG8pu98/wfQ==
1004910039
dependencies:
1005010040
semver "^5.3.0"
1005110041

10052-
node-releases@^1.1.25:
10053-
version "1.1.25"
10054-
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.25.tgz#0c2d7dbc7fed30fbe02a9ee3007b8c90bf0133d3"
10055-
integrity sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ==
10056-
dependencies:
10057-
semver "^5.3.0"
10058-
1005910042
"nopt@2 || 3":
1006010043
version "3.0.6"
1006110044
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
@@ -12476,12 +12459,7 @@ [email protected]:
1247612459
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
1247712460
integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
1247812461

12479-
semver@^6.0.0, semver@^6.2.0:
12480-
version "6.2.0"
12481-
resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db"
12482-
integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==
12483-
12484-
semver@^6.1.1:
12462+
semver@^6.0.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0:
1248512463
version "6.3.0"
1248612464
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
1248712465
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
@@ -14200,7 +14178,7 @@ which-module@^2.0.0:
1420014178
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
1420114179
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
1420214180

14203-
which@1, [email protected], which@^1.2.1, which@^1.2.9, which@^1.3.0, which@^1.3.1:
14181+
which@1, [email protected], which@^1.2.1, which@^1.2.9, which@^1.3.1:
1420414182
version "1.3.1"
1420514183
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
1420614184
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==

0 commit comments

Comments
 (0)