From a3d1e2eb4bb24e2974c88e8868b44cde987eebb2 Mon Sep 17 00:00:00 2001 From: Aleksei Bondarenko Date: Fri, 4 Jul 2025 02:59:37 +0300 Subject: [PATCH 01/11] fix: `bigint` cause error (#15702) --- CHANGELOG.md | 4 ++++ packages/expect/src/__tests__/toThrowMatchers.test.ts | 9 +++++++++ packages/expect/src/toThrowMatchers.ts | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c16fa303bfdf..f69c2ac2754a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## main +### Fixes + +- `[expect]` Fix `bigint` error ([#15702](https://github.com/jestjs/jest/pull/15702)) + ## 30.0.4 ### Features diff --git a/packages/expect/src/__tests__/toThrowMatchers.test.ts b/packages/expect/src/__tests__/toThrowMatchers.test.ts index 5685771c7ac4..cf005d5284bd 100644 --- a/packages/expect/src/__tests__/toThrowMatchers.test.ts +++ b/packages/expect/src/__tests__/toThrowMatchers.test.ts @@ -328,6 +328,15 @@ describe('toThrow', () => { }); }); + test('isNot false, cause is bigint', () => { + jestExpect(() => { + throw new Error('Message', {cause: 0n}); + }).toThrow({ + cause: 0n, + message: 'Message', + }); + }); + test('isNot false, cause is object', () => { jestExpect(() => { throw new Error('Message', { diff --git a/packages/expect/src/toThrowMatchers.ts b/packages/expect/src/toThrowMatchers.ts index 9c6ec8989625..c9a4cbbb1c03 100644 --- a/packages/expect/src/toThrowMatchers.ts +++ b/packages/expect/src/toThrowMatchers.ts @@ -486,7 +486,10 @@ function createMessageAndCause(error: Error) { if (seen.has(value)) return; seen.add(value); // stop circular references } - return value === undefined ? String(undefined) : value; + if (typeof value === 'bigint' || value === undefined) { + return String(value); + } + return value; }); } From fd3d6cf9fe416b549a74b6577e5e1ea1130e3659 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sun, 6 Jul 2025 09:21:24 +0300 Subject: [PATCH 02/11] fix: optimize replaceAll with regexp (#15719) --- packages/jest-each/src/table/array.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/jest-each/src/table/array.ts b/packages/jest-each/src/table/array.ts index 77fa7d883779..20c3e2fa1d0a 100644 --- a/packages/jest-each/src/table/array.ts +++ b/packages/jest-each/src/table/array.ts @@ -17,7 +17,7 @@ const PRETTY_PLACEHOLDER = '%p'; const INDEX_PLACEHOLDER = '%#'; const NUMBER_PLACEHOLDER = '%$'; const PLACEHOLDER_PREFIX = '%'; -const ESCAPED_PLACEHOLDER_PREFIX = /%%/g; +const ESCAPED_PLACEHOLDER_PREFIX = '%%'; const JEST_EACH_PLACEHOLDER_ESCAPE = '@@__JEST_EACH_PLACEHOLDER_ESCAPE__@@'; export default function array( @@ -77,17 +77,11 @@ const formatTitle = ( rowIndex, ), ) - .replaceAll( - new RegExp(JEST_EACH_PLACEHOLDER_ESCAPE, 'g'), - PLACEHOLDER_PREFIX, - ); + .replaceAll(JEST_EACH_PLACEHOLDER_ESCAPE, PLACEHOLDER_PREFIX); const normalisePlaceholderValue = (value: unknown) => typeof value === 'string' - ? value.replaceAll( - new RegExp(PLACEHOLDER_PREFIX, 'g'), - JEST_EACH_PLACEHOLDER_ESCAPE, - ) + ? value.replaceAll(PLACEHOLDER_PREFIX, JEST_EACH_PLACEHOLDER_ESCAPE) : value; const getMatchingPlaceholders = (title: string) => From 81e7b33dbaff8bb9d6ebfd483b41aa4ee425478d Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Wed, 9 Jul 2025 10:51:19 -0400 Subject: [PATCH 03/11] Fix link to constraints (#15732) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0383bea65419..38485642a6d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -111,7 +111,7 @@ Ran all test suites. ## Checking Constraints -We use [Yarn Constraints](https://yarnpkg.com/features/constraints) to enforce various rules across the repository. They are declared inside the [`constraints.pro` file](https://github.com/jestjs/jest/blob/main/constraints.pro) and their purposes are documented with comments. +We use [Yarn Constraints](https://yarnpkg.com/features/constraints) to enforce various rules across the repository. They are declared inside the [`yarn.config.cjs` file](https://github.com/jestjs/jest/blob/main/yarn.config.cjs) and their purposes are documented with comments. Constraints can be checked with `yarn constraints`, and fixed with `yarn constraints --fix`. Generally speaking: From c2b2faa1e1ae945561cce025bc27b9b8360b2965 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 9 Jul 2025 17:56:42 +0300 Subject: [PATCH 04/11] fix: optimize match siblings (#15722) --- packages/jest-runtime/src/helpers.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/jest-runtime/src/helpers.ts b/packages/jest-runtime/src/helpers.ts index e725a758eb4a..a99ebf9b28c7 100644 --- a/packages/jest-runtime/src/helpers.ts +++ b/packages/jest-runtime/src/helpers.ts @@ -43,15 +43,17 @@ export const findSiblingsWithFileExtension = ( const matches = glob .sync(`${pathToModule}.*`, {windowsPathsNoEscape: true}) - .map(match => slash(match)) .map(match => { - const relativePath = path.posix.relative(slashedDirname, match); + const slashedMap = slash(match); + const relativePath = path.posix.relative(slashedDirname, slashedMap); - return path.posix.dirname(match) === slashedDirname - ? `./${relativePath}` - : relativePath; + const slashedPath = + path.posix.dirname(slashedMap) === slashedDirname + ? `./${relativePath}` + : relativePath; + + return `\t'${slashedPath}'`; }) - .map(match => `\t'${match}'`) .join('\n'); if (matches) { From 37b16862e6116e572f25479fb5459b8a0da73a4c Mon Sep 17 00:00:00 2001 From: Yaroslav Serhieiev Date: Wed, 9 Jul 2025 17:59:56 +0300 Subject: [PATCH 05/11] fix: prevent double teardown on test environment error (#15731) --- .../environmentTeardownError.test.ts | 21 +++++++++++++++++++ .../EnvironmentWithTeardownError.js | 17 +++++++++++++++ .../environmentTeardownError.test.js | 9 ++++++++ e2e/environment-teardown-error/package.json | 5 +++++ packages/jest-runner/src/runTest.ts | 7 +++++-- 5 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 e2e/__tests__/environmentTeardownError.test.ts create mode 100644 e2e/environment-teardown-error/EnvironmentWithTeardownError.js create mode 100644 e2e/environment-teardown-error/__tests__/environmentTeardownError.test.js create mode 100644 e2e/environment-teardown-error/package.json diff --git a/e2e/__tests__/environmentTeardownError.test.ts b/e2e/__tests__/environmentTeardownError.test.ts new file mode 100644 index 000000000000..5ed1c0f119a7 --- /dev/null +++ b/e2e/__tests__/environmentTeardownError.test.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import runJest from '../runJest'; + +// This test ensures that if a custom environment's teardown throws, Jest reports the real error, not an internal error. +describe('Environment Teardown Error', () => { + it('reports the error thrown from teardown() in a custom environment', () => { + const {stderr, exitCode} = runJest('environment-teardown-error'); + expect(exitCode).toBe(1); + expect(stderr).toMatch('teardown error from custom environment'); + // Should NOT contain the internal error that was seen in the regression + expect(stderr).not.toMatch( + 'The "object" argument must be of type object. Received null', + ); + }); +}); diff --git a/e2e/environment-teardown-error/EnvironmentWithTeardownError.js b/e2e/environment-teardown-error/EnvironmentWithTeardownError.js new file mode 100644 index 000000000000..e0e0fc85c993 --- /dev/null +++ b/e2e/environment-teardown-error/EnvironmentWithTeardownError.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const NodeEnvironment = require('jest-environment-node').default; + +class EnvironmentWithTeardownError extends NodeEnvironment { + async teardown() { + await super.teardown(); + throw new Error('teardown error from custom environment'); + } +} + +module.exports = EnvironmentWithTeardownError; diff --git a/e2e/environment-teardown-error/__tests__/environmentTeardownError.test.js b/e2e/environment-teardown-error/__tests__/environmentTeardownError.test.js new file mode 100644 index 000000000000..fc944407b1c9 --- /dev/null +++ b/e2e/environment-teardown-error/__tests__/environmentTeardownError.test.js @@ -0,0 +1,9 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +'use strict'; + +test('Environment must tear down with a correct error stack trace', () => {}); diff --git a/e2e/environment-teardown-error/package.json b/e2e/environment-teardown-error/package.json new file mode 100644 index 000000000000..9712a8d46502 --- /dev/null +++ b/e2e/environment-teardown-error/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "/EnvironmentWithTeardownError.js" + } +} diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index ccc756fed968..05256db47aa7 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -217,8 +217,11 @@ async function runTestInternal( ); sourcemapSupport.resetRetrieveHandlers(); - await environment.teardown(); - isTornDown = true; + try { + await environment.teardown(); + } finally { + isTornDown = true; + } } }; From 6c6edd894921eb627ded8cae754d91174d1645aa Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 10 Jul 2025 01:52:36 +0200 Subject: [PATCH 06/11] more thorough fallback to ts loaders if node TypeScript support doesn't work out (#15720) --- .../__snapshots__/jest.config.ts.test.ts.snap | 19 +++++++++-- .../src/readConfigFileAndSetRootDir.ts | 34 ++++++++++++------- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap b/e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap index fa3e71e73fa1..3a51ef8a6068 100644 --- a/e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap +++ b/e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap @@ -15,12 +15,20 @@ Ran all test suites." exports[`on node >=24 invalid JS in jest.config.ts (node with native TS support) 1`] = ` "Error: Jest: Failed to parse the TypeScript config file <> - SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: Expected ';', got 'string literal (ll break this file yo, 'll break this file yo)'" + both with the native node TypeScript support and configured TypeScript loaders. + Errors were: + - SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: Expected ';', got 'string literal (ll break this file yo, 'll break this file yo)' + - TSError: ⨯ Unable to compile TypeScript: +jest.config.ts(1,16): error TS2304: Cannot find name 'i'. +jest.config.ts(1,17): error TS1005: ';' expected. +jest.config.ts(1,39): error TS1002: Unterminated string literal." `; exports[`on node ^23.6 invalid JS in jest.config.ts (node with native TS support) 1`] = ` "Error: Jest: Failed to parse the TypeScript config file <> - SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: x Expected ';', got 'string literal (ll break this file yo, 'll break this file yo)' + both with the native node TypeScript support and configured TypeScript loaders. + Errors were: + - SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX]: x Expected ';', got 'string literal (ll break this file yo, 'll break this file yo)' ,---- 1 | export default i'll break this file yo : ^^^^^^^^^^^^^^^^^^^^^^ @@ -29,7 +37,12 @@ exports[`on node ^23.6 invalid JS in jest.config.ts (node with native TS support ,---- 1 | export default i'll break this file yo : ^^^^^^^^^^^^^^^^^^^^^^ - \`----" + \`---- + + - TSError: ⨯ Unable to compile TypeScript: +jest.config.ts(1,16): error TS2304: Cannot find name 'i'. +jest.config.ts(1,17): error TS1005: ';' expected. +jest.config.ts(1,39): error TS1002: Unterminated string literal." `; exports[`traverses directory tree up until it finds jest.config 1`] = ` diff --git a/packages/jest-config/src/readConfigFileAndSetRootDir.ts b/packages/jest-config/src/readConfigFileAndSetRootDir.ts index eae78332fc89..f71d1af715ba 100644 --- a/packages/jest-config/src/readConfigFileAndSetRootDir.ts +++ b/packages/jest-config/src/readConfigFileAndSetRootDir.ts @@ -45,21 +45,29 @@ export default async function readConfigFileAndSetRootDir( try { // Try native node TypeScript support first. configObject = await requireOrImportModule(configPath); - } catch (error) { - if ( - !( - error instanceof SyntaxError && - // Likely ESM in a file interpreted as CJS, which means it needs to be - // compiled. We ignore the error and try to load it with a loader. - /Unexpected token '(export|import)'/.test(error.message) - ) - ) { - throw error; + } catch (requireOrImportModuleError) { + if (!(requireOrImportModuleError instanceof SyntaxError)) { + throw requireOrImportModuleError; + } + try { + // Likely ESM in a file interpreted as CJS, which means it needs to be + // compiled. We ignore the error and try to load it with a loader. + configObject = await loadTSConfigFile(configPath); + } catch (loadTSConfigFileError) { + // If we still encounter an error, we throw both messages combined. + // This string is caught further down and merged into a new error message. + // eslint-disable-next-line no-throw-literal + throw ( + // Preamble text is added further down: + // Jest: Failed to parse the TypeScript config file ${configPath}\n + ' both with the native node TypeScript support and configured TypeScript loaders.\n' + + ' Errors were:\n' + + ` - ${requireOrImportModuleError}\n` + + ` - ${loadTSConfigFileError}` + ); } } - } - // Fall back to `ts-node` etc. if this cannot be natively parsed/executed. - if (!configObject) { + } else { configObject = await loadTSConfigFile(configPath); } } else if (isJSON) { From 4d573817e20d331382df74e3a07a1e74dd300ae3 Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Sun, 13 Jul 2025 19:38:22 -0400 Subject: [PATCH 07/11] Allow `testMatch` to take a string value (#15734) --- CHANGELOG.md | 4 ++++ packages/jest-config/src/ValidConfig.ts | 11 +++++++---- .../jest-config/src/__tests__/normalize.test.ts | 14 +++++++++++++- packages/jest-config/src/normalize.ts | 5 ++++- packages/jest-schemas/src/raw-types.ts | 2 +- packages/jest-types/src/Config.ts | 2 +- .../versioned_docs/version-30.0/Configuration.md | 4 ++-- 7 files changed, 32 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f69c2ac2754a..31652ea233da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## main +### Features + +- `[jest-config]` Allow `testMatch` to take a string value + ### Fixes - `[expect]` Fix `bigint` error ([#15702](https://github.com/jestjs/jest/pull/15702)) diff --git a/packages/jest-config/src/ValidConfig.ts b/packages/jest-config/src/ValidConfig.ts index 135e19778198..f40c1c9247d1 100644 --- a/packages/jest-config/src/ValidConfig.ts +++ b/packages/jest-config/src/ValidConfig.ts @@ -156,10 +156,13 @@ export const initialOptions: Config.InitialOptions = { }, testFailureExitCode: 1, testLocationInResults: false, - testMatch: [ - '**/__tests__/**/*.?([mc])[jt]s?(x)', - '**/?(*.)+(spec|test).?([mc])[jt]s?(x)', - ], + testMatch: multipleValidOptions( + '**/__tests__/**/?(*.)+(spec|test).?([mc])[jt]s?(x)', + [ + '**/__tests__/**/*.?([mc])[jt]s?(x)', + '**/?(*.)+(spec|test).?([mc])[jt]s?(x)', + ], + ), testNamePattern: 'test signature', testPathIgnorePatterns: [NODE_MODULES_REGEXP], testRegex: multipleValidOptions( diff --git a/packages/jest-config/src/__tests__/normalize.test.ts b/packages/jest-config/src/__tests__/normalize.test.ts index f978c31b9466..3939302c890a 100644 --- a/packages/jest-config/src/__tests__/normalize.test.ts +++ b/packages/jest-config/src/__tests__/normalize.test.ts @@ -954,7 +954,7 @@ describe('testMatch', () => { ).rejects.toThrowErrorMatchingSnapshot(); }); - it('normalizes testMatch', async () => { + it('normalizes testMatch root directory', async () => { const {options} = await normalize( { rootDir: '/root', @@ -965,6 +965,18 @@ describe('testMatch', () => { expect(options.testMatch).toEqual(['/root/**/*.js']); }); + + it('normalizes testMatch to array', async () => { + const {options} = await normalize( + { + rootDir: '/root', + testMatch: '**/*.js', + }, + {} as Config.Argv, + ); + + expect(options.testMatch).toEqual(['**/*.js']); + }); }); describe('moduleDirectories', () => { diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 2b0fa06e348a..e2ed840cf020 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -769,9 +769,12 @@ export default async function normalize( case 'moduleDirectories': case 'testMatch': { + const option = oldOptions[key]; + const rawValue = + Array.isArray(option) || option == null ? option : [option]; const replacedRootDirTags = _replaceRootDirTags( escapeGlobCharacters(options.rootDir), - oldOptions[key], + rawValue, ); if (replacedRootDirTags) { diff --git a/packages/jest-schemas/src/raw-types.ts b/packages/jest-schemas/src/raw-types.ts index dc1de9b2b1b6..e1b034485da1 100644 --- a/packages/jest-schemas/src/raw-types.ts +++ b/packages/jest-schemas/src/raw-types.ts @@ -323,7 +323,7 @@ export const InitialOptions = Type.Partial( testEnvironmentOptions: Type.Record(Type.String(), Type.Unknown()), testFailureExitCode: Type.Integer(), testLocationInResults: Type.Boolean(), - testMatch: Type.Array(Type.String()), + testMatch: Type.Union([Type.String(), Type.Array(Type.String())]), testNamePattern: Type.String(), testPathIgnorePatterns: Type.Array(Type.String()), testRegex: Type.Union([Type.String(), Type.Array(Type.String())]), diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index 6591b6f5f3de..1a0a9d0b64ff 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -470,7 +470,7 @@ export type Argv = Arguments< testEnvironment: string; testEnvironmentOptions: string; testFailureExitCode: string | null | undefined; - testMatch: Array; + testMatch: string | Array; testNamePattern: string; testPathIgnorePatterns: Array; testPathPatterns: Array; diff --git a/website/versioned_docs/version-30.0/Configuration.md b/website/versioned_docs/version-30.0/Configuration.md index 14904fe06b1d..bf189e7c99cb 100644 --- a/website/versioned_docs/version-30.0/Configuration.md +++ b/website/versioned_docs/version-30.0/Configuration.md @@ -2045,7 +2045,7 @@ This does not change the exit code in the case of Jest errors (e.g. invalid conf ::: -### `testMatch` \[array<string>] +### `testMatch` \[string | array<string>] (default: `[ "**/__tests__/**/*.?([mc])[jt]s?(x)", "**/?(*.)+(spec|test).?([mc])[jt]s?(x)" ]`) @@ -2073,7 +2073,7 @@ These pattern strings match against the full path. Use the `` string to Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.[mc]?[jt]sx?$` -The pattern or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array<string>]](#testmatch-arraystring), but note that you cannot specify both options. +The pattern or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [string | array<string>]](#testmatch-arraystring), but note that you cannot specify both options. The following is a visualization of the default regex: From 2a436b81249e31db22b27d1182ae15b439290efe Mon Sep 17 00:00:00 2001 From: SOUHAILA SERBOUT Date: Fri, 18 Jul 2025 03:06:04 +0200 Subject: [PATCH 08/11] [CI Energy Waste] Deduplicate static checks in CI workflow (#15739) --- .github/workflows/nodejs.yml | 41 +++++------------------------------- CHANGELOG.md | 1 + 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index cfefe6701472..969a7d835ea9 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -56,8 +56,8 @@ jobs: - name: Run tests depending on type information run: yarn test-with-type-info - typecheck: - name: Typecheck Examples and Tests + static-checks: + name: Static Checks (Lint, Typecheck, Yarn Validate) runs-on: ubuntu-latest needs: prepare-yarn-cache-ubuntu @@ -71,30 +71,14 @@ jobs: cache: yarn - name: install run: yarn --immutable - - name: build + - name: build TypeScript run: yarn build:ts + - name: build JavaScript + run: yarn build:js - name: typecheck examples run: yarn typecheck:examples - name: typecheck tests run: yarn typecheck:tests - - lint: - name: Lint - runs-on: ubuntu-latest - needs: prepare-yarn-cache-ubuntu - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: lts/* - cache: yarn - - name: install - run: yarn --immutable - - name: build - run: yarn build:js - name: verify Yarn PnP compatibility run: yarn verify-pnp - name: run eslint @@ -105,21 +89,6 @@ jobs: run: yarn check-changelog - name: check copyright headers run: yarn check-copyright-headers - - yarn-validate: - name: Validate Yarn dependencies and constraints - runs-on: ubuntu-latest - needs: prepare-yarn-cache-ubuntu - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: lts/* - cache: yarn - - name: install - run: yarn --immutable - name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")' run: yarn constraints - name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")' diff --git a/CHANGELOG.md b/CHANGELOG.md index 31652ea233da..84ec7ed5d1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixes - `[expect]` Fix `bigint` error ([#15702](https://github.com/jestjs/jest/pull/15702)) +- `[ci]` Deduplicate static checks in CI workflow by combining typecheck, lint, and yarn-validate jobs ## 30.0.4 From 60f6375b5852006ae09d6b186400017ac95b01b3 Mon Sep 17 00:00:00 2001 From: James Ide Date: Mon, 21 Jul 2025 19:25:04 -0700 Subject: [PATCH 09/11] Support workerIdleMemoryLimit=0 to always restart worker child processes between test files (#15740) Co-authored-by: Christoph Nakazawa --- CHANGELOG.md | 1 + .../src/__tests__/stringToBytes.test.ts | 14 +++++-- packages/jest-config/src/stringToBytes.ts | 4 +- packages/jest-core/src/testSchedulerHelper.ts | 2 +- packages/jest-worker/src/types.ts | 4 ++ .../src/workers/ChildProcessWorker.ts | 30 +++++++++------ .../__tests__/ChildProcessWorker.test.ts | 37 +++++++++++++++++++ .../version-29.7/Configuration.md | 1 + 8 files changed, 76 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ec7ed5d1bf..5694d8dd6ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - `[jest-config]` Allow `testMatch` to take a string value +- `[jest-worker]` Let `workerIdleMemoryLimit` accept 0 to always restart worker child processes ### Fixes diff --git a/packages/jest-config/src/__tests__/stringToBytes.test.ts b/packages/jest-config/src/__tests__/stringToBytes.test.ts index 8f47598bd0b8..93809554f91e 100644 --- a/packages/jest-config/src/__tests__/stringToBytes.test.ts +++ b/packages/jest-config/src/__tests__/stringToBytes.test.ts @@ -8,6 +8,10 @@ import stringToBytes from '../stringToBytes'; describe('numeric input', () => { + test('0 should be 0', () => { + expect(stringToBytes(0)).toBe(0); + }); + test('> 1 represents bytes', () => { expect(stringToBytes(50.8)).toBe(50); }); @@ -33,6 +37,10 @@ describe('numeric input', () => { describe('string input', () => { describe('numeric passthrough', () => { + test('0 should be 0', () => { + expect(stringToBytes('0')).toBe(0); + }); + test('> 1 represents bytes', () => { expect(stringToBytes('50.8')).toBe(50); }); @@ -55,10 +63,8 @@ describe('string input', () => { }); describe('parsing', () => { - test('0% should throw an error', () => { - expect(() => stringToBytes('0%', 51)).toThrow( - 'Unexpected numerical input', - ); + test('0%', () => { + expect(stringToBytes('0%', 51)).toBe(0); }); test('30%', () => { diff --git a/packages/jest-config/src/stringToBytes.ts b/packages/jest-config/src/stringToBytes.ts index 05907845163e..ee81ff94efef 100644 --- a/packages/jest-config/src/stringToBytes.ts +++ b/packages/jest-config/src/stringToBytes.ts @@ -68,7 +68,9 @@ function stringToBytes( } if (typeof input === 'number') { - if (input <= 1 && input > 0) { + if (input === 0) { + return 0; + } else if (input <= 1 && input > 0) { if (percentageReference) { return Math.floor(input * percentageReference); } else { diff --git a/packages/jest-core/src/testSchedulerHelper.ts b/packages/jest-core/src/testSchedulerHelper.ts index 121025f3746c..cb3219952348 100644 --- a/packages/jest-core/src/testSchedulerHelper.ts +++ b/packages/jest-core/src/testSchedulerHelper.ts @@ -48,7 +48,7 @@ export function shouldRunInBand( return ( // When specifying a memory limit, workers should be used - !workerIdleMemoryLimit && + workerIdleMemoryLimit === undefined && (oneWorkerOrLess || oneTestOrLess || (tests.length <= 20 && timings.length > 0 && areFastTests)) diff --git a/packages/jest-worker/src/types.ts b/packages/jest-worker/src/types.ts index 1110da98a271..197f3f3d315c 100644 --- a/packages/jest-worker/src/types.ts +++ b/packages/jest-worker/src/types.ts @@ -175,6 +175,10 @@ export type WorkerOptions = { * a job is complete. So you could have a resource limit of 500MB but an idle * limit of 50MB. The latter will only trigger if after a job has completed the * memory usage hasn't returned back down under 50MB. + * + * Special case: setting this to 0 will restart the worker process after each + * job completes, providing complete process isolation between test files + * regardless of memory usage. */ idleMemoryLimit?: number; /** diff --git a/packages/jest-worker/src/workers/ChildProcessWorker.ts b/packages/jest-worker/src/workers/ChildProcessWorker.ts index 6b0a75a0807a..74e2c3c37edc 100644 --- a/packages/jest-worker/src/workers/ChildProcessWorker.ts +++ b/packages/jest-worker/src/workers/ChildProcessWorker.ts @@ -90,7 +90,7 @@ export default class ChildProcessWorker this._stdout = null; this._stderr = null; this._childIdleMemoryUsage = null; - this._childIdleMemoryUsageLimit = options.idleMemoryLimit || null; + this._childIdleMemoryUsageLimit = options.idleMemoryLimit ?? null; this._childWorkerPath = options.childWorkerPath || require.resolve('./processChild'); @@ -342,13 +342,16 @@ export default class ChildProcessWorker this._childIdleMemoryUsage && this._childIdleMemoryUsage > limit ) { - this.state = WorkerStates.RESTARTING; - - this.killChild(); + this._restart(); } } } + private _restart(): void { + this.state = WorkerStates.RESTARTING; + this.killChild(); + } + private _onExit(exitCode: number | null, signal: NodeJS.Signals | null) { this._workerReadyPromise = undefined; this._resolveWorkerReady = undefined; @@ -440,11 +443,16 @@ export default class ChildProcessWorker this._request = null; if ( - this._childIdleMemoryUsageLimit && + this._childIdleMemoryUsageLimit !== null && this._child.connected && hasRequest ) { - this.checkMemoryUsage(); + if (this._childIdleMemoryUsageLimit === 0) { + // Special case: `idleMemoryLimit` of `0` means always restart. + this._restart(); + } else { + this.checkMemoryUsage(); + } } return onProcessEnd(...args); @@ -542,17 +550,17 @@ export default class ChildProcessWorker * Gets updated memory usage and restarts if required */ checkMemoryUsage(): void { - if (this._childIdleMemoryUsageLimit) { + if (this._childIdleMemoryUsageLimit === null) { + console.warn( + 'Memory usage of workers can only be checked if a limit is set', + ); + } else { this._memoryUsageCheck = true; this._child.send([CHILD_MESSAGE_MEM_USAGE], err => { if (err) { console.error('Unable to check memory usage', err); } }); - } else { - console.warn( - 'Memory usage of workers can only be checked if a limit is set', - ); } } diff --git a/packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.ts b/packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.ts index 4fdf2c4bed67..3d41231d592f 100644 --- a/packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.ts +++ b/packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.ts @@ -19,6 +19,7 @@ import { PARENT_MESSAGE_MEM_USAGE, PARENT_MESSAGE_OK, type WorkerOptions, + WorkerStates, } from '../../types'; jest.useFakeTimers(); @@ -674,3 +675,39 @@ it('should check for memory limits and restart if above absolute limit', async ( expect(totalmem).not.toHaveBeenCalled(); expect(forkInterface.kill).toHaveBeenCalledTimes(1); }); + +it('should restart immediately when limit is 0 without checking memory', () => { + const worker = new Worker({ + forkOptions: {}, + idleMemoryLimit: 0, + maxRetries: 3, + workerPath: '/tmp/foo', + } as WorkerOptions); + + const onProcessStart = jest.fn(); + const onProcessEnd = jest.fn(); + const onCustomMessage = jest.fn(); + + worker.send( + [CHILD_MESSAGE_CALL, false, 'test', []] as ChildMessageCall, + onProcessStart, + onProcessEnd, + onCustomMessage, + ); + + expect(onProcessStart).toHaveBeenCalledTimes(1); + expect(onProcessEnd).not.toHaveBeenCalled(); + expect(onCustomMessage).not.toHaveBeenCalled(); + + forkInterface.emit('message', [PARENT_MESSAGE_OK]); + expect(onProcessEnd).toHaveBeenCalledTimes(1); + expect(onCustomMessage).not.toHaveBeenCalled(); + + expect(totalmem).not.toHaveBeenCalled(); + expect(forkInterface.send).not.toHaveBeenCalledWith( + [CHILD_MESSAGE_MEM_USAGE], + expect.any(Function), + ); + expect(worker.state).toBe(WorkerStates.RESTARTING); + expect(forkInterface.kill).toHaveBeenCalledTimes(1); +}); diff --git a/website/versioned_docs/version-29.7/Configuration.md b/website/versioned_docs/version-29.7/Configuration.md index 1781e0ee39af..c16cbf93cb5f 100644 --- a/website/versioned_docs/version-29.7/Configuration.md +++ b/website/versioned_docs/version-29.7/Configuration.md @@ -2463,6 +2463,7 @@ Specifies the memory limit for workers before they are recycled and is primarily After the worker has executed a test the memory usage of it is checked. If it exceeds the value specified the worker is killed and restarted. The limit can be specified in a number of different ways and whatever the result is `Math.floor` is used to turn it into an integer value: +- `0` - Always restart the worker between tests. - `<= 1` - The value is assumed to be a percentage of system memory. So 0.5 sets the memory limit of the worker to half of the total system memory - `\> 1` - Assumed to be a fixed byte value. Because of the previous rule if you wanted a value of 1 byte (I don't know why) you could use `1.1`. - With units From 1fb766f1456a5b04ead2e9aaf8081bb2700e199b Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 22 Jul 2025 11:25:52 +0900 Subject: [PATCH 10/11] Update `CHANGELOG.md`. --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5694d8dd6ed3..e0179da15bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## main +## 30.0.5 + ### Features - `[jest-config]` Allow `testMatch` to take a string value @@ -8,7 +10,6 @@ ### Fixes - `[expect]` Fix `bigint` error ([#15702](https://github.com/jestjs/jest/pull/15702)) -- `[ci]` Deduplicate static checks in CI workflow by combining typecheck, lint, and yarn-validate jobs ## 30.0.4 From 22236cf58b66039f81893537c90dee290bab427f Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 22 Jul 2025 11:28:15 +0900 Subject: [PATCH 11/11] v30.0.5 --- lerna.json | 2 +- packages/babel-jest/package.json | 2 +- packages/create-jest/package.json | 2 +- packages/expect-utils/package.json | 2 +- packages/expect/package.json | 2 +- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-create-cache-key-function/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-environment-jsdom-abstract/package.json | 2 +- packages/jest-environment-jsdom/package.json | 2 +- packages/jest-environment-node/package.json | 2 +- packages/jest-environment/package.json | 2 +- packages/jest-expect/package.json | 2 +- packages/jest-fake-timers/package.json | 2 +- packages/jest-globals/package.json | 2 +- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-leak-detector/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-mock/package.json | 2 +- packages/jest-phabricator/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve-dependencies/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-schemas/package.json | 2 +- packages/jest-snapshot-utils/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-test-result/package.json | 2 +- packages/jest-test-sequencer/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- packages/pretty-format/package.json | 2 +- packages/test-globals/package.json | 2 +- packages/test-utils/package.json | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/lerna.json b/lerna.json index c0a983037eba..e534f378d0ae 100644 --- a/lerna.json +++ b/lerna.json @@ -8,5 +8,5 @@ "syncWorkspaceLock": true } }, - "version": "30.0.4" + "version": "30.0.5" } diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 09c49bc98f2c..94955b34f30d 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/create-jest/package.json b/packages/create-jest/package.json index fd27d57ef8ec..43c51a2e885e 100644 --- a/packages/create-jest/package.json +++ b/packages/create-jest/package.json @@ -1,7 +1,7 @@ { "name": "create-jest", "description": "Create a new Jest project", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/expect-utils/package.json b/packages/expect-utils/package.json index 8ff3f7bf4878..8a8d5d560044 100644 --- a/packages/expect-utils/package.json +++ b/packages/expect-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/expect-utils", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/expect/package.json b/packages/expect/package.json index 7274b49d7a3b..1828ed10d34b 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index e82324c086ce..aa173657d299 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index d47e9c4efdd7..8c14e30f927e 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index a79c97d28fa4..f28a5dc175d1 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "30.0.4", + "version": "30.0.5", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index de317d45924e..c06dce165be5 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index a1c5d2d844cf..12d9967265ac 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 41a0e75fa27e..8c7c112cb234 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "30.0.4", + "version": "30.0.5", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { diff --git a/packages/jest-create-cache-key-function/package.json b/packages/jest-create-cache-key-function/package.json index c51338b9f6be..2ad0ce4c8e5f 100644 --- a/packages/jest-create-cache-key-function/package.json +++ b/packages/jest-create-cache-key-function/package.json @@ -1,6 +1,6 @@ { "name": "@jest/create-cache-key-function", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 4abd3ff7461a..097ee5057776 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 9ccc7b1280e6..a9afb75a000f 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "30.0.2", + "version": "30.0.5", "description": "Parameterised tests for Jest", "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/packages/jest-environment-jsdom-abstract/package.json b/packages/jest-environment-jsdom-abstract/package.json index 9a4d7a6266fd..b9f4e76ef8bf 100644 --- a/packages/jest-environment-jsdom-abstract/package.json +++ b/packages/jest-environment-jsdom-abstract/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment-jsdom-abstract", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index c8efcb342865..f66af76c2d66 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 594c697cf3d9..4d6eba4fec05 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 64e38f91c4b7..105ea75ac3aa 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-expect/package.json b/packages/jest-expect/package.json index f130c4e28ab8..9a0f240c2db5 100644 --- a/packages/jest-expect/package.json +++ b/packages/jest-expect/package.json @@ -1,6 +1,6 @@ { "name": "@jest/expect", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index b7846ea09196..dc6d3946da9a 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index f56b8b5f236f..c80250b362b2 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index fa4fef9ae76b..946ba413b1c3 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 3471523d424e..ef8ba3fe95ea 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 916d06fafafe..90be10d87209 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 917e9d67fb46..953bf82843ea 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index b50176a89dad..501549e9ffbf 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 7670b6523c95..7d2e3d9bb1cb 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index ad6c8e928426..a5b57cd08d69 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 5493a2f4fd02..78220395c8b8 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,7 +1,7 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "30.0.4", + "version": "30.0.5", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 22330763ff2f..b296062d9f2a 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 99a6ccbc36fe..5ab06fa92fb2 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 99c01206bb67..45afb1e435c9 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 0aef94f2e4d1..e05827eef568 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-schemas/package.json b/packages/jest-schemas/package.json index 51a0e8b79a70..aaa90f18a332 100644 --- a/packages/jest-schemas/package.json +++ b/packages/jest-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@jest/schemas", - "version": "30.0.1", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-snapshot-utils/package.json b/packages/jest-snapshot-utils/package.json index 08ea1b32a702..0994a9ab33de 100644 --- a/packages/jest-snapshot-utils/package.json +++ b/packages/jest-snapshot-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/snapshot-utils", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 956a88d7fd66..491c75f1e9a4 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index e77f87e54caf..0308c672207c 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index c0b9a8606102..4d0ee49545c1 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 2548594fe81c..2744c9b3f932 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "30.0.4", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index ef6496103495..3c42b84add20 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "30.0.1", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index cf9737bcd3e1..a85c9bb76f43 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index f629b0be046c..4de069743b28 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index b4251df8f652..13169bc78734 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,7 +1,7 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "30.0.4", + "version": "30.0.5", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 2abe54da4461..ce61f1525db9 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/jest/package.json b/packages/jest/package.json index c4f2e5abd8df..3abfaaf15d24 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "30.0.4", + "version": "30.0.5", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index ad6a15a9d39c..10f7898a519c 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "30.0.2", + "version": "30.0.5", "repository": { "type": "git", "url": "https://github.com/jestjs/jest.git", diff --git a/packages/test-globals/package.json b/packages/test-globals/package.json index ef6ef4188ce8..999424519018 100644 --- a/packages/test-globals/package.json +++ b/packages/test-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-globals", - "version": "30.0.4", + "version": "30.0.5", "private": true, "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index af0837ef9cae..4c7871556151 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-utils", - "version": "30.0.4", + "version": "30.0.5", "private": true, "main": "./build/index.js", "types": "./build/index.d.ts",