Skip to content

Commit

Permalink
chore: replace exit with exit-x (jestjs#15399)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored and mohammednumaan committed Jan 17, 2025
1 parent 8f03552 commit 96b53af
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

### Fixes

- `[*]` Replace `exit` with `exit-x` ([#15399](https://github.com/jestjs/jest/pull/15399))
- `[babel-plugin-jest-hoist]` Use `denylist` instead of the deprecated `blacklist` for Babel 8 support ([#14109](https://github.com/jestjs/jest/pull/14109))
- `[babel-plugin-jest-hoist]` Do not rely on buggy Babel behaviour ([#15415](https://github.com/jestjs/jest/pull/15415))
- `[expect]` Check error instance type for `toThrow/toThrowError` ([#14576](https://github.com/jestjs/jest/pull/14576))
Expand Down
3 changes: 1 addition & 2 deletions packages/create-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@jest/types": "workspace:*",
"chalk": "^4.0.0",
"exit": "^0.1.2",
"exit-x": "^0.2.2",
"graceful-fs": "^4.2.9",
"jest-config": "workspace:*",
"jest-util": "workspace:*",
Expand All @@ -37,7 +37,6 @@
"access": "public"
},
"devDependencies": {
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/prompts": "^2.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jest/src/runCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import * as path from 'path';
import chalk = require('chalk');
import exit = require('exit');
import exit = require('exit-x');
import * as fs from 'graceful-fs';
import prompts = require('prompts');
import {constants} from 'jest-config';
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
"@jest/test-result": "workspace:*",
"@jest/types": "workspace:*",
"chalk": "^4.0.0",
"exit": "^0.1.2",
"exit-x": "^0.2.2",
"import-local": "^3.0.2",
"jest-config": "workspace:*",
"jest-util": "workspace:*",
"jest-validate": "workspace:*",
"yargs": "^17.3.1"
},
"devDependencies": {
"@types/exit": "^0.1.30",
"@types/yargs": "^17.0.8"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import * as path from 'path';
import chalk = require('chalk');
import exit = require('exit');
import exit = require('exit-x');
import yargs = require('yargs');
import {getVersion, runCLI} from '@jest/core';
import type {AggregatedResult} from '@jest/test-result';
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"ansi-escapes": "^4.2.1",
"chalk": "^4.0.0",
"ci-info": "^4.0.0",
"exit": "^0.1.2",
"exit-x": "^0.2.2",
"graceful-fs": "^4.2.9",
"jest-changed-files": "workspace:*",
"jest-config": "workspace:*",
Expand All @@ -47,7 +47,6 @@
"devDependencies": {
"@jest/test-sequencer": "workspace:*",
"@jest/test-utils": "workspace:*",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/micromatch": "^4.0.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/TestScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import chalk = require('chalk');
import {GITHUB_ACTIONS} from 'ci-info';
import exit = require('exit');
import exit = require('exit-x');
import {
CoverageReporter,
DefaultReporter,
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {performance} from 'perf_hooks';
import type {WriteStream} from 'tty';
import chalk = require('chalk');
import exit = require('exit');
import exit = require('exit-x');
import * as fs from 'graceful-fs';
import {CustomConsole} from '@jest/console';
import type {AggregatedResult, TestContext} from '@jest/test-result';
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/runJest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as path from 'path';
import {performance} from 'perf_hooks';
import type {WriteStream} from 'tty';
import chalk = require('chalk');
import exit = require('exit');
import exit = require('exit-x');
import * as fs from 'graceful-fs';
import {CustomConsole} from '@jest/console';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as path from 'path';
import type {WriteStream} from 'tty';
import ansiEscapes = require('ansi-escapes');
import chalk = require('chalk');
import exit = require('exit');
import exit = require('exit-x');
import slash = require('slash');
import {TestPathPatterns} from '@jest/pattern';
import type {TestContext} from '@jest/test-result';
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/node": "*",
"chalk": "^4.0.0",
"collect-v8-coverage": "^1.0.0",
"exit": "^0.1.2",
"exit-x": "^0.2.2",
"glob": "^10.3.10",
"graceful-fs": "^4.2.9",
"istanbul-lib-coverage": "^3.0.0",
Expand All @@ -42,7 +42,6 @@
"devDependencies": {
"@jest/pattern": "workspace:*",
"@jest/test-utils": "workspace:*",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/istanbul-lib-coverage": "^2.0.0",
"@types/istanbul-lib-instrument": "^1.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/CoverageWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import exit = require('exit');
import exit = require('exit-x');
import * as fs from 'graceful-fs';
import type {Config} from '@jest/types';
import generateEmptyCoverage, {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/NotifyReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import * as path from 'path';
import * as util from 'util';
import exit = require('exit');
import exit = require('exit-x');
import type {AggregatedResult, TestContext} from '@jest/test-result';
import type {Config} from '@jest/types';
import {pluralize} from 'jest-util';
Expand Down
1 change: 0 additions & 1 deletion packages/jest-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@jest/test-utils": "workspace:*",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/source-map-support": "^0.5.0",
"jest-jasmine2": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runner/src/testWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*/

import exit = require('exit');
import exit = require('exit-x');
import type {
SerializableError,
TestFileEvent,
Expand Down
30 changes: 8 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3125,14 +3125,13 @@ __metadata:
"@jest/test-utils": "workspace:*"
"@jest/transform": "workspace:*"
"@jest/types": "workspace:*"
"@types/exit": ^0.1.30
"@types/graceful-fs": ^4.1.3
"@types/micromatch": ^4.0.7
"@types/node": "*"
ansi-escapes: ^4.2.1
chalk: ^4.0.0
ci-info: ^4.0.0
exit: ^0.1.2
exit-x: ^0.2.2
graceful-fs: ^4.2.9
jest-changed-files: "workspace:*"
jest-config: "workspace:*"
Expand Down Expand Up @@ -3363,7 +3362,6 @@ __metadata:
"@jest/transform": "workspace:*"
"@jest/types": "workspace:*"
"@jridgewell/trace-mapping": ^0.3.18
"@types/exit": ^0.1.30
"@types/graceful-fs": ^4.1.3
"@types/istanbul-lib-coverage": ^2.0.0
"@types/istanbul-lib-instrument": ^1.7.2
Expand All @@ -3374,7 +3372,7 @@ __metadata:
"@types/node-notifier": ^8.0.0
chalk: ^4.0.0
collect-v8-coverage: ^1.0.0
exit: ^0.1.2
exit-x: ^0.2.2
glob: ^10.3.10
graceful-fs: ^4.2.9
istanbul-lib-coverage: ^3.0.0
Expand Down Expand Up @@ -5415,15 +5413,6 @@ __metadata:
languageName: node
linkType: hard

"@types/exit@npm:^0.1.30":
version: 0.1.33
resolution: "@types/exit@npm:0.1.33"
dependencies:
"@types/node": "*"
checksum: 74e8e74ea3ce2c2a0ebc7dbf1ac06a93bc99a073872db203ced3de7b439985a932dce5bc63b6841b21f34929b1e2f5f7db28c11c39fe43c0b09c3d4fb6bb7eec
languageName: node
linkType: hard

"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33":
version: 4.19.5
resolution: "@types/express-serve-static-core@npm:4.19.5"
Expand Down Expand Up @@ -8505,11 +8494,10 @@ __metadata:
resolution: "create-jest@workspace:packages/create-jest"
dependencies:
"@jest/types": "workspace:*"
"@types/exit": ^0.1.30
"@types/graceful-fs": ^4.1.3
"@types/prompts": ^2.0.1
chalk: ^4.0.0
exit: ^0.1.2
exit-x: ^0.2.2
graceful-fs: ^4.2.9
jest-config: "workspace:*"
jest-util: "workspace:*"
Expand Down Expand Up @@ -10523,10 +10511,10 @@ __metadata:
languageName: node
linkType: hard

"exit@npm:^0.1.2":
version: 0.1.2
resolution: "exit@npm:0.1.2"
checksum: abc407f07a875c3961e4781dfcb743b58d6c93de9ab263f4f8c9d23bb6da5f9b7764fc773f86b43dd88030444d5ab8abcb611cb680fba8ca075362b77114bba3
"exit-x@npm:^0.2.2":
version: 0.2.2
resolution: "exit-x@npm:0.2.2"
checksum: c62a8e0f77b1de00059c2976ddb774c41d06969a4262d984a58cd51995be1fc0ce962329ea68722bba0c254adb3930cc3625dabaf079fe8031cd03e91db1ba51
languageName: node
linkType: hard

Expand Down Expand Up @@ -13150,10 +13138,9 @@ __metadata:
"@jest/core": "workspace:*"
"@jest/test-result": "workspace:*"
"@jest/types": "workspace:*"
"@types/exit": ^0.1.30
"@types/yargs": ^17.0.8
chalk: ^4.0.0
exit: ^0.1.2
exit-x: ^0.2.2
import-local: ^3.0.2
jest-config: "workspace:*"
jest-util: "workspace:*"
Expand Down Expand Up @@ -13531,7 +13518,6 @@ __metadata:
"@jest/test-utils": "workspace:*"
"@jest/transform": "workspace:*"
"@jest/types": "workspace:*"
"@types/exit": ^0.1.30
"@types/graceful-fs": ^4.1.3
"@types/node": "*"
"@types/source-map-support": ^0.5.0
Expand Down

0 comments on commit 96b53af

Please sign in to comment.