dependabot[bot] opened a new pull request, #43879: URL: https://github.com/apache/superset/pull/43879
Bumps [babel-jest](https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest) from 30.4.1 to 30.5.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jestjs/jest/releases">babel-jest's releases</a>.</em></p> <blockquote> <h2>v30.5.0</h2> <p>On a personal note: King Harald V of Norway passed away this morning. He ascended the throne 35 years ago, two months before I was born. This release is dedicated to his memory. Hvil i fred 🇳🇴</p> <hr /> <p>This is a big release. It touches <code>jest-runtime</code>, <code>jest-resolve</code> and <code>jest-haste-map</code> in many places, and with this many changes there might be regressions 😬. If your suite behaves differently after upgrading, please <a href="https://github.com/jestjs/jest/issues">open an issue</a>.</p> <h1>Highlights</h1> <h2><code>whenCalledWith</code></h2> <p>Mock functions can now configure return values per argument list, contributed by <a href="https://github.com/timkindberg"><code>@timkindberg</code></a> (<a href="https://redirect.github.com/jestjs/jest/pull/16053">#16053</a>):</p> <pre lang="js"><code>const fn = jest.fn(); fn.whenCalledWith('apple').mockReturnValue('red'); fn.whenCalledWith('banana').mockReturnValue('yellow'); fn.whenCalledWith(expect.any(Number)).mockReturnValue('numeric'); <p>fn('apple'); // 'red' fn('banana'); // 'yellow' fn(42); // 'numeric' fn('grape'); // undefined </code></pre></p> <p>The returned object is a real <code>Mock</code>, so <code>mockReturnValueOnce</code>, <code>mockResolvedValue</code>, <code>mockImplementation</code> etc. all chain here too. Argument slots accept literals or any asymmetric matcher, with the same equality semantics as <code>toHaveBeenCalledWith()</code>. Calls that match nothing fall through to the base mock. See the <a href="https://jestjs.io/docs/mock-function-api#mockfnwhencalledwithargs">Mock Functions docs</a> for matching and precedence details.</p> <h2>Describe-level retries</h2> <p><code>jest.retryTimes()</code> can now retry a whole <code>describe</code> block instead of a single test, contributed by <a href="https://github.com/soltonigiri"><code>@soltonigiri</code></a> (<a href="https://redirect.github.com/jestjs/jest/pull/16322">#16322</a>). Each attempt reruns the block's <code>beforeAll</code>/<code>afterAll</code> hooks, child tests and nested describes, which helps when tests in a block depend on shared state:</p> <pre lang="js"><code>describe('workflow', () => { jest.retryTimes(3, {entireDescribe: true}); <p>test('first step', () => {}); test('second step', () => {}); // a failure retries the entire block }); </code></pre></p> <h2>New file watcher</h2> <p>The non-watchman path of <code>jest-haste-map</code> is rewritten. <code>@parcel/watcher</code> replaces the homegrown <code>NodeWatcher</code> and <code>FSEventsWatcher</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16188">#16188</a>), and <code>fdir</code> replaces the hand-rolled directory recursion in the crawler (<a href="https://redirect.github.com/jestjs/jest/pull/16187">#16187</a>). A batch of fixes also makes watching and indexing survive locked files on Windows, watchman failures, and duplicate manual mocks (<a href="https://redirect.github.com/jestjs/jest/pull/16295">#16295</a>, <a href="https://redirect.github.com/jestjs/jest/pull/16358">#16358</a>, <a href="https://redirect.github.com/jestjs/jest/pull/16355">#16355</a>, <a href="https://redirect.github.com/jestjs/jest/pull/16360">#16360</a>).</p> <p>If you can, please run your suite with <code>--no-watchman</code> (in and out of watch mode) to exercise the new crawler and watchers, and report anything odd 👍</p> <h2>Long-requested dependency updates</h2> <ul> <li><code>babel-plugin-istanbul</code> is updated to v8 (<a href="https://redirect.github.com/jestjs/jest/pull/16049">#16049</a>)</li> <li><code>glob</code> is updated to v13 (<a href="https://redirect.github.com/jestjs/jest/pull/16397">#16397</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jestjs/jest/blob/main/CHANGELOG.md">babel-jest's changelog</a>.</em></p> <blockquote> <h2>30.5.0</h2> <h3>Features</h3> <ul> <li><code>[@jest/expect-utils, jest-mock]</code> Add <code>mockFn.whenCalledWith(...args)</code> for configuring return values per argument list, with first-class asymmetric-matcher support (<a href="https://redirect.github.com/jestjs/jest/pull/16053">#16053</a>)</li> <li><code>[@jest/expect-utils]</code> Export <code>AsymmetricMatcher</code> and <code>FunctionParameters</code> types (previously private to <code>expect</code>) (<a href="https://redirect.github.com/jestjs/jest/pull/16053">#16053</a>)</li> <li><code>[jest-circus, jest-core, jest-jasmine2, jest-test-result, jest-types]</code> <code>--collectTests</code> now expands <code>test.each</code>/<code>describe.each</code> cases and reports per-status counts (skipped/todo via the new <code>wouldRun</code> flag for selected tests) plus a summary line that match a real run, including under <code>--testNamePattern</code> and <code>.only</code>/<code>fdescribe</code> focus on both the circus and jasmine2 runners (<a href="https://redirect.github.com/jestjs/jest/pull/16259">#16259</a>)</li> <li><code>[jest-circus, jest-environment, jest-runtime, jest-types]</code> Add describe-level retries via <code>jest.retryTimes(..., {entireDescribe: true})</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16322">#16322</a>)</li> <li><code>[jest-circus, jest-message-util, jest-reporters, jest-types]</code> Add <code>retryMessages</code> to <code>AssertionResult</code> and export <code>formatErrorStack</code>, so the retry log renders nested <code>cause</code> and <code>AggregateError</code> sections with code frames instead of serialized <code>[cause]:</code>/<code>[errors]:</code> markers (<a href="https://redirect.github.com/jestjs/jest/pull/16316">#16316</a>)</li> <li><code>[jest-circus, jest-types]</code> Add <code>unhandledErrorsDetailed</code> to <code>Circus.RunResult</code>, so an unhandled rejection reports its <code>cause</code> chain and <code>AggregateError</code> entries with code frames instead of a pre-serialized stack (<a href="https://redirect.github.com/jestjs/jest/pull/16316">#16316</a>)</li> <li><code>[jest-haste-map]</code> Replace <code>NodeWatcher</code> and <code>FSEventsWatcher</code> with <code>@parcel/watcher</code> for the non-watchman watch path (<a href="https://redirect.github.com/jestjs/jest/pull/16188">#16188</a>)</li> <li><code>[jest-resolve]</code> Bump <code>unrs-resolver</code> to 1.12.1, remove <code>jest-pnp-resolver</code> and unnecessary checks (<a href="https://redirect.github.com/jestjs/jest/pull/15721">#15721</a>)</li> <li><code>[jest-resolve]</code> Honor Node's <code>--preserve-symlinks</code> / <code>NODE_PRESERVE_SYMLINKS</code> in the default resolver by passing <code>symlinks: false</code> to <code>unrs-resolver</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16260">#16260</a>)</li> <li><code>[jest-runtime]</code> Apply automocking and manual <code>__mocks__</code> files to synchronously evaluable ESM graphs on Node 24.9+ - static imports, dynamic <code>import()</code> and <code>require()</code> of an ESM file now generate an automock from the real module's namespace instead of failing with "Attempting to import a mock without a factory". Graphs that need async evaluation (top-level await) or an async-only resolver or transformer still throw (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Route <code>process.getBuiltinModule</code> through the sandbox, so it returns the sandbox <code>process</code> and the hooked <code>node:module</code> instead of the host's (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Throw an actionable error from <code>module.register()</code> and <code>module.registerHooks()</code> inside a test - the hooks attached to the loader running Jest itself, never saw the sandboxed requires they were meant for, and stayed registered for every later test file in the worker (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Surface resolution and import-attribute errors in an ESM graph before executing any of its CJS dependencies on Node 24.9+, matching Node's run-nothing-on-a-broken-graph behavior; the legacy loader on older versions keeps its linking-time execution order (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Throw <code>ERR_SOURCE_PHASE_NOT_DEFINED</code> with an actionable message for <code>import source</code> and <code>import.source()</code>, instead of failing at instantiation with V8's bare "Source phase import object is not defined" (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Emit the JSON-without-import-attribute deprecation warning once per test file instead of once per worker, so it is no longer silently swallowed for every file after the first (<a href="https://redirect.github.com/jestjs/jest/pull/16391">#16391</a>)</li> <li><code>[jest-runtime]</code> Set <code>import.meta.main</code> to <code>true</code> in the test file and <code>false</code> in every module it loads, matching Node 24+ (<a href="https://redirect.github.com/jestjs/jest/pull/16367">#16367</a>)</li> <li><code>[jest-runtime]</code> Resolve the <code>module-sync</code> export condition, so a package that exposes its ESM entry point for <code>require()</code> loads the same file Node would (<a href="https://redirect.github.com/jestjs/jest/pull/16336">#16336</a>)</li> <li><code>[jest-snapshot]</code> Add external snapshot paths to custom reporter failure details (<a href="https://redirect.github.com/jestjs/jest/pull/16374">#16374</a>)</li> </ul> <h3>Fixes</h3> <ul> <li><code>[jest-console, jest-reporters]</code> <code>CustomConsole</code> now buffers console output so <code>TestResult.console</code> is populated for reporters when <code>verbose</code> is enabled, while <code>GitHubActionsReporter</code> avoids replaying buffered output in verbose mode (<a href="https://redirect.github.com/jestjs/jest/pull/16155">#16155</a>)</li> <li><code>[expect, jest-message-util, jest-pattern, jest-regex-util, jest-util]</code> Revert <code>node:</code> protocol imports to restore webpack/browser-bundle compatibility (<a href="https://redirect.github.com/jestjs/jest/pull/16167">#16167</a>)</li> <li><code>[expect]</code> Widen <code>toMatchObject</code> and <code>objectContaining</code> parameter type from <code>Record<string, unknown></code> to <code>object</code> so class instances are accepted (<a href="https://redirect.github.com/jestjs/jest/pull/16196">#16196</a>)</li> <li><code>[jest-circus]</code> Call a generator test body with the shared test context, so <code>this</code> matches what a regular test function receives (<a href="https://redirect.github.com/jestjs/jest/pull/16347">#16347</a>)</li> <li><code>[jest-circus]</code> Capture the error listeners of the parent process instead of the in-sandbox <code>process</code>, so listeners registered before the test file survive teardown and sandbox listeners no longer leak onto the parent (<a href="https://redirect.github.com/jestjs/jest/pull/16347">#16347</a>)</li> <li><code>[jest-circus]</code> Clear <code>currentlyRunningTest</code> after skipped and todo tests (<a href="https://redirect.github.com/jestjs/jest/pull/16342">#16342</a>)</li> <li><code>[jest-circus]</code> Prevent late <code>done()</code> callbacks from affecting later test or hook invocations (<a href="https://redirect.github.com/jestjs/jest/pull/16343">#16343</a>)</li> <li><code>[jest-circus, jest-jasmine2]</code> Honor <code>--expand</code> when formatting <code>node:assert</code> failures, instead of always collapsing the diff (<a href="https://redirect.github.com/jestjs/jest/pull/16347">#16347</a>)</li> <li><code>[jest-circus, jest-jasmine2, jest-message-util]</code> Serialize the inner errors of an <code>AggregateError</code> into <code>failureMessages</code>, <code>retryReasons</code> and <code>unhandledErrors</code>, so <code>--json</code> output and reporter annotations include them (<a href="https://redirect.github.com/jestjs/jest/pull/16316">#16316</a>)</li> <li><code>[jest-circus, jest-snapshot]</code> Keep snapshot state and counts correct when a test retries (<a href="https://redirect.github.com/jestjs/jest/pull/16344">#16344</a>)</li> <li><code>[@jest/create-cache-key-function]</code> Include the caller support flags in the generated key, so a transformer that emits ESM or CJS based on them no longer shares one cache entry between the two (<a href="https://redirect.github.com/jestjs/jest/pull/16331">#16331</a>)</li> <li><code>[@jest/create-cache-key-function]</code> Include the stringified project config in the generated key, so editing a transformer's own settings invalidates what it cached (<a href="https://redirect.github.com/jestjs/jest/pull/16331">#16331</a>)</li> <li><code>[@jest/transform]</code> Include the caller support flags in a transform's cache key, so a file transformed both as ESM and as CJS no longer serves one shape's output for the other (<a href="https://redirect.github.com/jestjs/jest/pull/16331">#16331</a>)</li> <li><code>[jest-config]</code> Add missing <code>findRelatedTests</code>, <code>outputFile</code>, and <code>replname</code> entries to <code>ValidConfig</code> so they no longer trigger spurious "Unknown option" warnings (<a href="https://redirect.github.com/jestjs/jest/pull/16224">#16224</a>)</li> <li><code>[jest-config]</code> Use <code>--config</code> for the global config when multiple <code>--projects</code> are specified (<a href="https://redirect.github.com/jestjs/jest/pull/16273">#16273</a>)</li> <li><code>[jest-core]</code> Serialize <code>bigint</code> values in <code>--json</code> and <code>--outputFile</code> output as their literal form (<code>4n</code>), instead of failing the run with <code>TypeError: Do not know how to serialize a BigInt</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16338">#16338</a>)</li> <li><code>[jest-core]</code> Do not report a <code>CustomGC</code> async resource (used by N-API addons such as napi-rs for per-isolate GC bookkeeping) as an open handle, since it is <code>napi_unref</code>'d by the addon and can never keep the event loop alive (<a href="https://redirect.github.com/jestjs/jest/pull/16379">#16379</a>)</li> <li><code>[jest-each]</code> Keep a <code>$&</code>, <code>$`</code>, <code>$'</code> or <code>$$</code> inside a <code>%p</code> param value out of the replacement, so the title shows the value instead of the text around it (<a href="https://redirect.github.com/jestjs/jest/pull/16338">#16338</a>)</li> <li><code>[jest-each]</code> Interpolate a <code>bigint</code> into a <code>%j</code> title as its literal form (<code>"4n"</code>) at any depth, instead of throwing <code>TypeError: Do not know how to serialize a BigInt</code> while collecting the tests (<a href="https://redirect.github.com/jestjs/jest/pull/16338">#16338</a>)</li> <li><code>[jest-environment, jest-runtime]</code> Bind <code>sandboxInjectedGlobals</code> to the right values when <code>injectGlobals</code> is <code>false</code>, instead of shifting every one of them by a position (<a href="https://redirect.github.com/jestjs/jest/pull/16377">#16377</a>)</li> <li><code>[jest-environment-node, jest-util]</code> Only warn about a conflicting <code>globalsCleanup</code> mode when one was explicitly configured, and follow the mode that is actually in effect (<a href="https://redirect.github.com/jestjs/jest/pull/16323">#16323</a>)</li> <li><code>[jest-environment-node, jest-util]</code> Stop resolving lazy globals when setting up an environment, so Node 26's builtin module globals are no longer loaded (and no longer emit their deprecation warnings) for every test file (<a href="https://redirect.github.com/jestjs/jest/pull/16324">#16324</a>)</li> <li><code>[jest-haste-map]</code> Keep watch mode alive when an outside process briefly makes a file unreadable on Windows, instead of tearing the watcher down on <code>EPERM</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16295">#16295</a>)</li> <li><code>[jest-haste-map]</code> Keep indexing when an outside process holds a file open on Windows, instead of failing the whole crawl on <code>EPERM</code> (<a href="https://redirect.github.com/jestjs/jest/pull/16358">#16358</a>)</li> <li><code>[jest-haste-map]</code> Keep a duplicated manual mock resolving when the file it pointed at is deleted in watch mode (<a href="https://redirect.github.com/jestjs/jest/pull/16360">#16360</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jestjs/jest/commit/912baa37afaa979e8179240c238cb493f960527a"><code>912baa3</code></a> v30.5.0</li> <li><a href="https://github.com/jestjs/jest/commit/8e6d128e4a278059ecddecaa97400b04c8ae5fd9"><code>8e6d128</code></a> Update istanbul dependencies (<a href="https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest/issues/16049">#16049</a>)</li> <li><a href="https://github.com/jestjs/jest/commit/1865dd8659f5131715c780fa92f40623fce2f9c9"><code>1865dd8</code></a> chore: update yarn & refresh lockfiles (<a href="https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest/issues/16251">#16251</a>)</li> <li><a href="https://github.com/jestjs/jest/commit/ff542da6348f1c328f0d322f1b9f8fcb912771c8"><code>ff542da</code></a> chore(deps): update babel monorepo to v8.0.0-rc.5 (<a href="https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest/issues/16172">#16172</a>)</li> <li><a href="https://github.com/jestjs/jest/commit/b91717a68e091cf492a361d61906d17849fb3282"><code>b91717a</code></a> chore: refresh coding agent instructions (<a href="https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest/issues/16182">#16182</a>)</li> <li>See full diff in <a href="https://github.com/jestjs/jest/commits/v30.5.0/packages/babel-jest">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
