Skip to content

Commit

Permalink
Move from "process.exit" to "exit" (#7327)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and SimenB committed Mar 19, 2019
1 parent 26c865d commit e3bc4f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `[jest-each]` Fix test function type ([#8145](https://github.com/facebook/jest/pull/8145))
- `[pretty-format]` Print `BigInt` as a readable number instead of `{}` ([#8138](https://github.com/facebook/jest/pull/8138))
- `[jest-fake-timers]` `getTimerCount` not taking immediates and ticks into account ([#8139](https://github.com/facebook/jest/pull/8139))
- `[jest-worker]` Move from `process.exit` to `exit` ([#7327](https://github.com/facebook/jest/pull/7327))

### Chore & Maintenance

Expand All @@ -17,7 +18,7 @@
- `[docs]` Improve description of optional arguments in ExpectAPI.md ([#8126](https://github.com/facebook/jest/pull/8126)
- `[*]` Move @types/node to the root package.json [#8129](https://github.com/facebook/jest/pull/8129))
- `[*]` Add documentation and tests related to auto-mocking ([#8099](https://github.com/facebook/jest/pull/8099))
- `[*]` Add `jest-watch-typeahead` as a devDependency ([#6449](https://github.com/facebook/jest/pull/6449/files))
- `[*]` Add `jest-watch-typeahead` as a devDependency ([#6449](https://github.com/facebook/jest/pull/6449))
- `[*]` upgrade TS to 3.4.0-dev\* for inceremental builds ([#8149](https://github.com/facebook/jest/pull/8149))

### Performance
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"dependencies": {
"exit": "^0.1.2",
"merge-stream": "^1.0.1",
"supports-color": "^6.1.0"
},
"devDependencies": {
"@types/exit": "^0.1.30",
"@types/merge-stream": "^1.1.2",
"@types/supports-color": "^5.3.0",
"get-stream": "^4.1.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-worker/src/workers/processChild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

import exit from 'exit';

import {
CHILD_MESSAGE_CALL,
CHILD_MESSAGE_END,
Expand Down Expand Up @@ -106,7 +108,7 @@ function end(): void {
}

function exitProcess(): void {
process.exit(0);
exit(0);
}

function execMethod(method: string, args: Array<any>): void {
Expand Down

0 comments on commit e3bc4f5

Please sign in to comment.