Skip to content

Commit df8bba5

Browse files
authored
Merge branch 'main' into fix-broken-links
2 parents 7220ddb + 7ea9a40 commit df8bba5

File tree

137 files changed

+12640
-12399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+12640
-12399
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
'eslint:recommended',
3333
'plugin:markdown/recommended',
3434
'plugin:import/errors',
35-
'plugin:eslint-comments/recommended',
35+
'plugin:@eslint-community/eslint-comments/recommended',
3636
'plugin:unicorn/recommended',
3737
'plugin:promise/recommended',
3838
'plugin:prettier/recommended',
@@ -348,8 +348,8 @@ module.exports = {
348348
],
349349
rules: {
350350
'@typescript-eslint/ban-types': 'off',
351-
'eslint-comments/disable-enable-pair': 'off',
352-
'eslint-comments/no-unlimited-disable': 'off',
351+
'@eslint-community/eslint-comments/disable-enable-pair': 'off',
352+
'@eslint-community/eslint-comments/no-unlimited-disable': 'off',
353353
'prefer-rest-params': 'off',
354354
'prefer-spread': 'off',
355355
'sort-keys ': 'off',
@@ -478,8 +478,11 @@ module.exports = {
478478
'default-case': 'off',
479479
'dot-notation': 'off',
480480
eqeqeq: ['error', 'smart'],
481-
'eslint-comments/disable-enable-pair': ['error', {allowWholeFile: true}],
482-
'eslint-comments/no-unused-disable': 'error',
481+
'@eslint-community/eslint-comments/disable-enable-pair': [
482+
'error',
483+
{allowWholeFile: true},
484+
],
485+
'@eslint-community/eslint-comments/no-unused-disable': 'error',
483486
'func-names': 'off',
484487
'func-style': ['off', 'declaration'],
485488
'global-require': 'off',

.github/workflows/nodejs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ jobs:
213213
- name: map coverage
214214
run: node ./scripts/mapCoverage.mjs
215215
if: always()
216-
- uses: codecov/codecov-action@v4
216+
- uses: codecov/codecov-action@v5
217217
if: always()
218218
with:
219219
directory: ./coverage
220+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node-version: [16.x, 18.x, 20.x, 22.x]
18+
node-version: [16.x, 18.x, 20.x, 22.x, 23.x]
1919
name: Node v${{ matrix.node-version }}
2020
runs-on: ${{ inputs.os }}
2121

.vscode/launch.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
"windows": {
1717
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
1818
}
19+
},
20+
{
21+
"name": "Attach to jest",
22+
"type": "node",
23+
"request": "attach",
24+
"port": 9229
1925
}
2026
]
2127
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/dist/commonjs/index.d.ts b/dist/commonjs/index.d.ts
2+
index f59de7602a528afde714e56dcf8c25ee496e39fb..804042b5ff381b8594307296de29d31d1b564c92 100644
3+
--- a/dist/commonjs/index.d.ts
4+
+++ b/dist/commonjs/index.d.ts
5+
@@ -837,7 +837,7 @@ export declare namespace LRUCache {
6+
*
7+
* Changing any of these will alter the defaults for subsequent method calls.
8+
*/
9+
-export declare class LRUCache<K extends {}, V extends {}, FC = unknown> implements Map<K, V> {
10+
+export declare class LRUCache<K extends {}, V extends {}, FC = unknown> {
11+
#private;
12+
/**
13+
* {@link LRUCache.OptionsBase.ttl}
14+
diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts
15+
index f59de7602a528afde714e56dcf8c25ee496e39fb..804042b5ff381b8594307296de29d31d1b564c92 100644
16+
--- a/dist/esm/index.d.ts
17+
+++ b/dist/esm/index.d.ts
18+
@@ -837,7 +837,7 @@ export declare namespace LRUCache {
19+
*
20+
* Changing any of these will alter the defaults for subsequent method calls.
21+
*/
22+
-export declare class LRUCache<K extends {}, V extends {}, FC = unknown> implements Map<K, V> {
23+
+export declare class LRUCache<K extends {}, V extends {}, FC = unknown> {
24+
#private;
25+
/**
26+
* {@link LRUCache.OptionsBase.ttl}

.yarn/patches/psl-npm-1.9.0-a546edad1a.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

.yarn/plugins/@yarnpkg/plugin-constraints.cjs

Lines changed: 32 additions & 32 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.8.6.cjs renamed to .yarn/releases/yarn-3.8.7.cjs

Lines changed: 116 additions & 116 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ packageExtensions:
1818
"@docsearch/react@*":
1919
dependencies:
2020
"@algolia/client-search": ^4.9.1
21+
"@react-native/babel-plugin-codegen@*":
22+
peerDependencies:
23+
"@babel/preset-env": ^7.1.6
24+
"@react-native/babel-preset@*":
25+
peerDependencies:
26+
"@babel/preset-env": ^7.1.6
27+
"@react-native/community-cli-plugin@*":
28+
peerDependencies:
29+
"@babel/preset-env": ^7.1.6
30+
"@react-native/metro-babel-transformer@*":
31+
peerDependencies:
32+
"@babel/preset-env": ^7.1.6
2133
babel-plugin-transform-flow-enums@*:
2234
peerDependencies:
2335
"@babel/core": ^7.0.0
@@ -33,4 +45,4 @@ plugins:
3345
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
3446
spec: "@yarnpkg/plugin-workspace-tools"
3547

36-
yarnPath: .yarn/releases/yarn-3.8.6.cjs
48+
yarnPath: .yarn/releases/yarn-3.8.7.cjs

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- `[jest-circus]` Add a `retryImmediately` option to `jest.retryTimes` ([#14696](https://github.com/jestjs/jest/pull/14696))
99
- `[jest-circus, jest-jasmine2]` Allow `setupFilesAfterEnv` to export an async function ([#10962](https://github.com/jestjs/jest/issues/10962))
1010
- `[jest-circus, jest-test-result]` Add `startedAt` timestamp in `TestCaseResultObject` within `onTestCaseResult` ([#15145](https://github.com/jestjs/jest/pull/15145))
11+
- `[jest-cli]` Export `buildArgv` ([#15310](https://github.com/facebook/jest/pull/15310))
1112
- `[jest-config]` [**BREAKING**] Add `mts` and `cts` to default `moduleFileExtensions` config ([#14369](https://github.com/facebook/jest/pull/14369))
1213
- `[jest-config]` [**BREAKING**] Update `testMatch` and `testRegex` default option for supporting `mjs`, `cjs`, `mts`, and `cts` ([#14584](https://github.com/jestjs/jest/pull/14584))
1314
- `[jest-config]` Loads config file from provided path in `package.json` ([#14044](https://github.com/facebook/jest/pull/14044))
@@ -19,15 +20,17 @@
1920
- `[@jest/core]` Add `perfStats` to surface test setup overhead ([#14622](https://github.com/jestjs/jest/pull/14622))
2021
- `[@jest/core]` [**BREAKING**] Changed `--filter` to accept an object with shape `{ filtered: Array<string> }` to match [documentation](https://jestjs.io/docs/cli#--filterfile) ([#13319](https://github.com/jestjs/jest/pull/13319))
2122
- `[@jest/core]` Support `--outputFile` option for [`--listTests`](https://jestjs.io/docs/cli#--listtests) ([#14980](https://github.com/jestjs/jest/pull/14980))
23+
- `[@jest/core]` Stringify Errors properly with `--json` flag ([#15329](https://github.com/jestjs/jest/pull/15329))
2224
- `[@jest/core, @jest/test-sequencer]` [**BREAKING**] Exposes `globalConfig` & `contexts` to `TestSequencer` ([#14535](https://github.com/jestjs/jest/pull/14535), & [#14543](https://github.com/jestjs/jest/pull/14543))
25+
- `[jest-each]` Introduce `%$` option to add number of the test to its title ([#14710](https://github.com/jestjs/jest/pull/14710))
2326
- `[@jest/environment]` [**BREAKING**] Remove deprecated `jest.genMockFromModule()` ([#15042](https://github.com/jestjs/jest/pull/15042))
2427
- `[@jest/environment]` [**BREAKING**] Remove unnecessary defensive code ([#15045](https://github.com/jestjs/jest/pull/15045))
2528
- `[jest-environment-jsdom]` [**BREAKING**] Upgrade JSDOM to v22 ([#13825](https://github.com/jestjs/jest/pull/13825))
2629
- `[@jest/environment-jsdom-abstract]` Introduce new package which abstracts over the `jsdom` environment, allowing usage of custom versions of JSDOM ([#14717](https://github.com/jestjs/jest/pull/14717))
2730
- `[jest-environment-node]` Update jest environment with dispose symbols `Symbol` ([#14888](https://github.com/jestjs/jest/pull/14888) & [#14909](https://github.com/jestjs/jest/pull/14909))
2831
- `[expect, @jest/expect]` [**BREAKING**] Add type inference for function parameters in `CalledWith` assertions ([#15129](https://github.com/facebook/jest/pull/15129))
2932
- `[@jest/expect-utils]` Properly compare all types of `TypedArray`s ([#15178](https://github.com/facebook/jest/pull/15178))
30-
- `[@jest/fake-timers]` [**BREAKING**] Upgrade `@sinonjs/fake-timers` to v11 ([#14544](https://github.com/jestjs/jest/pull/14544))
33+
- `[@jest/fake-timers]` [**BREAKING**] Upgrade `@sinonjs/fake-timers` to v13 ([#14544](https://github.com/jestjs/jest/pull/14544) & [#15470](https://github.com/jestjs/jest/pull/15470))
3134
- `[@jest/fake-timers]` Exposing new modern timers function `advanceTimersToFrame()` which advances all timers by the needed milliseconds to execute callbacks currently scheduled with `requestAnimationFrame` ([#14598](https://github.com/jestjs/jest/pull/14598))
3235
- `[jest-matcher-utils]` Add `SERIALIZABLE_PROPERTIES` to allow custom serialization of objects ([#14893](https://github.com/jestjs/jest/pull/14893))
3336
- `[jest-mock]` Add support for the Explicit Resource Management proposal to use the `using` keyword with `jest.spyOn(object, methodName)` ([#14895](https://github.com/jestjs/jest/pull/14895))
@@ -38,18 +41,20 @@
3841
- `[jest-runtime]` Support `import.meta.resolve` ([#14930](https://github.com/jestjs/jest/pull/14930))
3942
- `[jest-runtime]` [**BREAKING**] Make it mandatory to pass `globalConfig` to the `Runtime` constructor ([#15044](https://github.com/jestjs/jest/pull/15044))
4043
- `[jest-runtime]` Add `unstable_unmockModule` ([#15080](https://github.com/jestjs/jest/pull/15080))
41-
- `[@jest/schemas]` Upgrade `@sinclair/typebox` to v0.31 ([#14072](https://github.com/jestjs/jest/pull/14072))
44+
- `[jest-runtime]` Add `onGenerateMock` transformer callback for auto generated callbacks ([#15433](https://github.com/jestjs/jest/pull/15433))
45+
- `[@jest/schemas]` Upgrade `@sinclair/typebox` to v0.34 ([#15450](https://github.com/jestjs/jest/pull/15450))
4246
- `[@jest/types]` `test.each()`: Accept a readonly (`as const`) table properly ([#14565](https://github.com/jestjs/jest/pull/14565))
4347
- `[@jest/types]` Improve argument type inference passed to `test` and `describe` callback functions from `each` tables ([#14920](https://github.com/jestjs/jest/pull/14920))
4448
- `[jest-snapshot]` [**BREAKING**] Add support for [Error causes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) in snapshots ([#13965](https://github.com/facebook/jest/pull/13965))
4549
- `[jest-snapshot]` Support Prettier 3 ([#14566](https://github.com/facebook/jest/pull/14566))
4650
- `[@jest/util-snapshot]` Extract utils used by tooling from `jest-snapshot` into its own package ([#15095](https://github.com/facebook/jest/pull/15095))
4751
- `[pretty-format]` [**BREAKING**] Do not render empty string children (`''`) in React plugin ([#14470](https://github.com/facebook/jest/pull/14470))
48-
- `[jest-each]` Introduce `%$` option to add number of the test to its title ([#14710](https://github.com/jestjs/jest/pull/14710))
4952

5053
### Fixes
5154

55+
- `[*]` Replace `exit` with `exit-x` ([#15399](https://github.com/jestjs/jest/pull/15399))
5256
- `[babel-plugin-jest-hoist]` Use `denylist` instead of the deprecated `blacklist` for Babel 8 support ([#14109](https://github.com/jestjs/jest/pull/14109))
57+
- `[babel-plugin-jest-hoist]` Do not rely on buggy Babel behaviour ([#15415](https://github.com/jestjs/jest/pull/15415))
5358
- `[expect]` Check error instance type for `toThrow/toThrowError` ([#14576](https://github.com/jestjs/jest/pull/14576))
5459
- `[expect]` Improve diff for failing `expect.objectContaining` ([#15038](https://github.com/jestjs/jest/pull/15038))
5560
- `[expect]` Use `Array.isArray` to check if an array is an `Array` ([#15101](https://github.com/jestjs/jest/pull/15101))
@@ -59,6 +64,7 @@
5964
- `[jest-circus]` Replace recursive `makeTestResults` implementation with iterative one ([#14760](https://github.com/jestjs/jest/pull/14760))
6065
- `[jest-circus]` Omit `expect.hasAssertions()` errors if a test already has errors ([#14866](https://github.com/jestjs/jest/pull/14866))
6166
- `[jest-circus, jest-expect, jest-snapshot]` Pass `test.failing` tests when containing failing snapshot matchers ([#14313](https://github.com/jestjs/jest/pull/14313))
67+
- `[jest-circus]` Concurrent tests now emit jest circus events at the correct point and in the expected order. ([#15381](https://github.com/jestjs/jest/pull/15381))
6268
- `[jest-cli]` [**BREAKING**] Validate CLI flags that require arguments receives them ([#14783](https://github.com/jestjs/jest/pull/14783))
6369
- `[jest-config]` Make sure to respect `runInBand` option ([#14578](https://github.com/jestjs/jest/pull/14578))
6470
- `[jest-config]` Support `testTimeout` in project config ([#14697](https://github.com/jestjs/jest/pull/14697))
@@ -84,6 +90,7 @@
8490
- [**BREAKING**] `--testPathPattern` is now `--testPathPatterns`
8591
- [**BREAKING**] Specifying `testPathPatterns` when programmatically calling `watch` must be specified as `new TestPathPatterns(patterns)`, where `TestPathPatterns` can be imported from `@jest/pattern`
8692
- `[jest-reporters, jest-runner]` Unhandled errors without stack get correctly logged to console ([#14619](https://github.com/jestjs/jest/pull/14619))
93+
- `[jest-util]` Always load `mjs` files with `import` ([#15447](https://github.com/jestjs/jest/pull/15447))
8794
- `[jest-worker]` Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular ([#15191](https://github.com/jestjs/jest/pull/15191))
8895
- `[jest-worker]` Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt ([#15191](https://github.com/jestjs/jest/pull/15191))
8996

0 commit comments

Comments
 (0)