Skip to content

[Snyk] Security upgrade jest from 26.6.3 to 27.0.0#459

Open
rennokki wants to merge 1 commit intomasterfrom
snyk-fix-c4db781736ac366e9d3cdb01b304c1f1
Open

[Snyk] Security upgrade jest from 26.6.3 to 27.0.0#459
rennokki wants to merge 1 commit intomasterfrom
snyk-fix-c4db781736ac366e9d3cdb01b304c1f1

Conversation

@rennokki
Copy link
Member

snyk-top-banner

Snyk has created this PR to fix 4 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Excessive Platform Resource Consumption within a Loop
SNYK-JS-BRACES-6838727
  600  
medium severity Missing Release of Resource after Effective Lifetime
SNYK-JS-INFLIGHT-6095116
  535  
high severity Prototype Pollution
SNYK-JS-UNSETVALUE-2400660
  525  
medium severity Inefficient Regular Expression Complexity
SNYK-JS-MICROMATCH-6838728
  415  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Inefficient Regular Expression Complexity
🦉 Prototype Pollution

Copilot AI review requested due to automatic review settings January 11, 2026 11:28
@gemini-code-assist
Copy link

Summary of Changes

Hello @rennokki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request, automatically generated by Snyk, focuses on enhancing the project's security by upgrading the jest dependency. The upgrade to version 27.0.0 resolves several identified vulnerabilities, thereby improving the overall robustness and safety of the application's testing environment.

Highlights

  • Dependency Upgrade: Upgraded the jest testing framework from version 26.6.3 to 27.0.0.
  • Vulnerability Fixes: Addressed four security vulnerabilities, including high-severity issues like 'Excessive Platform Resource Consumption within a Loop' and 'Prototype Pollution', and medium-severity issues such as 'Missing Release of Resource after Effective Lifetime' and 'Inefficient Regular Expression Complexity'.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request, automatically generated by Snyk, upgrades jest to version 27.0.0 to fix security vulnerabilities. While this is a necessary security update, upgrading from Jest 26 to 27 is a major version change with significant breaking changes. The current configuration will likely cause your test suite to fail because of an incompatible ts-jest version and a change in Jest's default test environment. I've added a critical comment detailing the required additional changes to make this upgrade work.

"@typescript-eslint/parser": "^4.31.1",
"eslint": "^7.5.0",
"jest": "^26.6.3",
"jest": "^27.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading Jest to v27 is a major version bump with breaking changes that will likely break your test suite with the current configuration.

  • ts-jest Incompatibility: Your current ts-jest version (^26.4.4 on line 45) is not compatible with Jest 27. You must also upgrade ts-jest to a compatible version (e.g., ^27.0.0) in this package.json file.

  • testEnvironment Change: Jest 27 changed the default testEnvironment from 'jsdom' to 'node'. Given that your Jest configuration (jest.config.js) includes tsx and jsx file extensions, your tests probably rely on a browser environment. You should explicitly set testEnvironment: 'jsdom' in your jest.config.js to avoid test failures.

Example for jest.config.js:

module.exports = {
    testEnvironment: 'jsdom',
    // ... other config
};

Without these changes, this upgrade is incomplete and will likely fail your CI build.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades jest from version 26.6.3 to 27.0.0 to address security vulnerabilities in transitive dependencies (braces, inflight, micromatch, and unset-value). The upgrade aims to fix 4 vulnerabilities including high-severity issues like Excessive Platform Resource Consumption and Prototype Pollution.

Changes:

  • Upgraded jest from ^26.6.3 to ^27.0.0 in devDependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"jest": "^26.6.3",
"jest": "^27.0.0",
"standard-version": "^9.1.0",
"ts-jest": "^26.4.4",
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading jest to version 27.0.0 requires a corresponding upgrade of ts-jest. The current version ts-jest ^26.4.4 is incompatible with jest 27.x. According to the ts-jest compatibility matrix, jest 27.x requires ts-jest version 27.x or higher. This will cause the test suite to fail when dependencies are installed.

Suggested change
"ts-jest": "^26.4.4",
"ts-jest": "^27.0.0",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants