Bump node-notifier and jest - #15
Conversation
Removes [node-notifier](https://github.com/mikaelbr/node-notifier). It's no longer used after updating ancestor dependency [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest). These dependencies need to be updated together. Removes `node-notifier` Updates `jest` from 24.8.0 to 30.4.2 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.2/packages/jest) --- updated-dependencies: - dependency-name: node-notifier dependency-version: dependency-type: indirect - dependency-name: jest dependency-version: 30.4.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
📝 WalkthroughWalkthroughJest’s development dependency version is updated from ChangesJest dependency upgrade
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Comment |
CI failed: The CI build is failing because it uses a deprecated Ruby setup action that no longer supports Ruby version 2.6.x.OverviewThe build failed due to an infrastructure configuration issue where an outdated GitHub Action is attempting to install a deprecated and unavailable version of Ruby (2.6.x). FailuresDeprecated Setup Action Failure (confidence: high)
Summary
Code Review
|
| Auto-apply | Compact |
|
|
Important
Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.
Was this helpful? React with 👍 / 👎 | Gitar
| "eslint-plugin-react": "^7.14.2", | ||
| "husky": "^2.5.0", | ||
| "jest": "^24.8.0" | ||
| "jest": "^30.4.2" |
There was a problem hiding this comment.
⚠️ Bug: jest.config.js uses removed testURL option
testURL was removed in Jest 28 and is not a valid config option in Jest 30; Jest now reports it as an unknown/validation-warning option and ignores it, so the intended location.href default is silently lost. Since this upgrade jumps from Jest 24 to 30, replace testURL: 'http://localhost/' with testEnvironment: 'jsdom' plus testEnvironmentOptions: { url: 'http://localhost/' } (and add the jest-environment-jsdom package, which is no longer bundled), or remove it entirely if no test relies on jsdom.
Was this helpful? React with 👍 / 👎
| "eslint-plugin-react": "^7.14.2", | ||
| "husky": "^2.5.0", | ||
| "jest": "^24.8.0" | ||
| "jest": "^30.4.2" |
There was a problem hiding this comment.
💡 Quality: @types/jest still pinned to v24 alongside jest 30
@types/jest remains at ^24.0.15 while jest is bumped to ^30.4.2, a six-major-version mismatch that can surface incorrect or missing type definitions for anyone consuming Jest globals via TypeScript. Bump @types/jest to ^30 (or remove it, since Jest 30 ships its own types) to keep the type declarations in sync with the runtime.
Was this helpful? React with 👍 / 👎
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 46: Remove the obsolete testURL setting from the Jest configuration and
do not add a jsdom override. If a custom test origin is required elsewhere,
configure it through testEnvironmentOptions.url instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: df79e2de-8d37-4300-b6c3-316d3f0736c7
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
| "eslint-plugin-react": "^7.14.2", | ||
| "husky": "^2.5.0", | ||
| "jest": "^24.8.0" | ||
| "jest": "^30.4.2" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the Jest environment contract without executing project code.
rg -n '"jest-environment-jsdom"|testEnvironment|testEnvironmentOptions|testURL' package.json jest.config.jsRepository: big-main/javascript-algorithms
Length of output: 218
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== package.json ==\n'
cat -n package.json | sed -n '1,120p'
printf '\n== jest.config.js ==\n'
cat -n jest.config.js | sed -n '1,120p'
printf '\n== Jest-related references ==\n'
rg -n '"jest"|jest-environment-jsdom|testEnvironment|testEnvironmentOptions|testURL' package.json jest.config.js .github -g '!**/node_modules/**'Repository: big-main/javascript-algorithms
Length of output: 3287
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== test files ==\n'
git ls-files '*test*.js' '*spec*.js' '*test*.jsx' '*spec*.jsx' | sed -n '1,200p'
printf '\n== browser/global usage in tests ==\n'
rg -n '\b(window|document|location|navigator|localStorage|sessionStorage|history|HTMLElement|MouseEvent|KeyboardEvent|CustomEvent)\b' \
--glob '*test*.js' --glob '*spec*.js' --glob '*test*.jsx' --glob '*spec*.jsx' .
printf '\n== jsdom-related package references ==\n'
rg -n 'jsdom|jest-environment-jsdom|testEnvironment' package.json jest.config.js .github README.mdRepository: big-main/javascript-algorithms
Length of output: 10330
🌐 Web query:
Jest 30 testURL removed testEnvironmentOptions url default test environment jsdom node
💡 Result:
In Jest 30, the testURL configuration option has been removed [1][2]. To set the URL for the jsdom test environment, you must now use the testEnvironmentOptions property in your Jest configuration [3][4]. Configuration Methods: 1. Jest Configuration File (e.g., jest.config.js): You can set the URL globally by adding it to testEnvironmentOptions [3][4]: js module.exports = { testEnvironment: 'jsdom', testEnvironmentOptions: { url: 'https://example.com/', }, }; 2. Docblock Pragmas (Per File): You can also set the URL for individual test files using a docblock comment at the top of the file. The testEnvironmentOptions string must be valid JSON [3][4]: js / * `@jest-environment` jsdom * `@jest-environment-options` {"url": "https://example.com/"} */ test('uses the specified URL', () => { expect(window.location.href).toBe('https://example.com/'); }); The default URL for the jsdom environment remains http://localhost if not otherwise specified [3][4]. Note: Jest 30 upgraded jest-environment-jsdom to JSDOM 26 [5][6]. This version includes stricter spec compliance that may affect how window.location behaves or is mocked [6][7]. If you encounter issues with mocking window.location, the Jest team suggests using @jest/environment-jsdom-abstract to compose a custom environment or applying specific patches to JSDOM [6][7].
Citations:
- 1: https://github.com/facebook/jest/blob/main/CHANGELOG_PRE_v30.md
- 2: feat: remove
testURLoption, can be set intestEnvironmentOptionsjestjs/jest#10797 - 3: https://jestjs.io/docs/configuration
- 4: https://jestjs.io/docs/30.0/configuration
- 5: https://jestjs.io/blog/2025/06/04/jest-30
- 6: https://github.com/jestjs/jest/blob/main/website/blog/2025-06-04-jest-30.md
- 7: [Bug]: mock window.location error in jest@30, is ok in jiest@29 jestjs/jest#15674
🌐 Web query:
Jest 30 unknown config option testURL validation warning error removed option
💡 Result:
The testURL configuration option was removed from Jest in version 28.0.0 [1][2][3]. If you are encountering an "unknown option" validation warning in Jest 30, it is because testURL is no longer a valid top-level configuration key [4][5]. To resolve this warning and properly set the URL, you must migrate the setting to testEnvironmentOptions in your Jest configuration file [4][5][6]: // Before (invalid in Jest 30) { "testURL": "http://localhost:3000" } // After (correct) { "testEnvironmentOptions": { "url": "http://localhost:3000" } } The testURL option was deprecated and replaced as part of a broader effort to decouple Jest's core configuration from specific test environment implementations like jsdom [5][6]. Jest maintains a list of deprecated configuration options that, when detected, will trigger a validation warning instructing you to update your configuration [4].
Citations:
- 1: https://github.com/jestjs/jest/releases/tag/v28.0.0
- 2: https://raw.githubusercontent.com/facebook/jest/8f9b812faf8e4d241d560a8574f0c6ed20a89365/CHANGELOG.md
- 3: https://github.com/jestjs/jest/blob/48f3d81385e1324976b7c5b3dda5d4bd9cf0bb17/CHANGELOG.md
- 4: https://github.com/jestjs/jest/blob/main/packages/jest-config/src/Deprecated.ts
- 5: feat: remove
testURLoption, can be set intestEnvironmentOptionsjestjs/jest#10797 - 6: feat: remove
testURLoption, can be set intestEnvironmentOptionsjestjs/jest#10797
🌐 Web query:
Jest config unknown option validation error unknown option testURL
💡 Result:
The unknown option validation error for testURL occurs because the testURL configuration option was removed in Jest 28.0.0 [1][2]. To resolve this error, you must migrate your configuration to use testEnvironmentOptions instead [3][4]. You should pass the URL as a property within the testEnvironmentOptions object [5][4]. Update your jest.config.js or package.json configuration as follows [3][4]: // Before (causes error): { "testURL": "http://localhost/" } // After (correct): { "testEnvironmentOptions": { "url": "http://localhost/" } } This change ensures compatibility with current versions of Jest, as testEnvironmentOptions is the standard way to pass environment-specific configurations like the URL to JSDOM [6][4].
Citations:
- 1: https://github.com/jestjs/jest/releases/tag/v28.0.0
- 2: https://github.com/jestjs/jest/blob/880e04ce927c33713a32362b116e771654c865de/CHANGELOG.md
- 3: https://stackoverflow.com/questions/51554366/jest-securityerror-localstorage-is-not-available-for-opaque-origins
- 4: https://jest-archive-august-2023.netlify.app/docs/28.x/upgrading-to-jest28/
- 5: https://github.com/jestjs/jest/blob/main/packages/jest-config/src/Deprecated.ts
- 6: feat: remove
testURLoption, can be set intestEnvironmentOptionsjestjs/jest#10797
Remove the obsolete testURL setting. Jest 30 no longer accepts testURL in jest.config.js; if a test ever needs a custom origin, move it to testEnvironmentOptions.url instead. No jsdom override is needed for this suite.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 46, Remove the obsolete testURL setting from the Jest
configuration and do not add a jsdom override. If a custom test origin is
required elsewhere, configure it through testEnvironmentOptions.url instead.
Removes node-notifier. It's no longer used after updating ancestor dependency jest. These dependencies need to be updated together.
Removes
node-notifierUpdates
jestfrom 24.8.0 to 30.4.2Release notes
Sourced from jest's releases.
... (truncated)
Changelog
Sourced from jest's changelog.
... (truncated)
Commits
746f2a0v30.4.2b3b4a09v30.4.15cbb21ev30.4.0db7141afix: allowcollectCoverageandcoverageProviderin project config (#16132)efb59c2v30.3.096c53d3feat(jest-config): adddefineConfigandmergeConfigfunctions (#15844)855864ev30.2.0da9b532v30.1.3ebfa31cv30.1.2d347c0fv30.1.1Maintainer changes
This version was pushed to npm by simenb, a new releaser for jest since your current version.
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 commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)You can disable automated security fix PRs for this repo from the Security Alerts page.
Summary by CodeRabbit