Skip to content

[PD1-915] Upgrade eslint 10, jest 30 to fix all Dependabot security alerts#10

Open
joshuanapoli wants to merge 2 commits intomainfrom
upgrade-eslint10-jest30-fix-vulns
Open

[PD1-915] Upgrade eslint 10, jest 30 to fix all Dependabot security alerts#10
joshuanapoli wants to merge 2 commits intomainfrom
upgrade-eslint10-jest30-fix-vulns

Conversation

@joshuanapoli
Copy link
Member

Summary

  • Upgrade eslint 9→10 and jest 29→30 to resolve all 3 open Dependabot security alerts
  • Replace ts-jest with @swc/jest (ts-jest has no jest 30 support; tests run ~3x faster)
  • Add yarn resolutions for js-yaml and test-exclude to eliminate remaining vulnerable transitive deps

Security Fixes

Alert Package Severity Fix
#23 minimatch 3.x (ReDoS) High eslint 10 uses minimatch 10.x
#7 glob 7.x (command injection) High jest 30 uses glob 10.5+
#6 js-yaml 3.x (prototype pollution) Medium resolution override → 4.1.1

Test plan

  • All 25 tests pass
  • ESLint passes cleanly
  • TypeScript build succeeds
  • No vulnerable package versions remain in dependency tree

🤖 Generated with Claude Code

- Upgrade eslint 9→10 (fixes minimatch ReDoS vulnerability, alert #23)
- Upgrade jest 29→30 (fixes glob command injection vulnerability, alert #7)
- Replace ts-jest with @swc/jest (ts-jest has no jest 30 support)
- Add resolutions for js-yaml ^4.1.0 (fixes prototype pollution, alert #6)
  and test-exclude ^8.0.0 (eliminates remaining minimatch 3.x and glob 7.x)
- Upgrade typescript-eslint to 8.57 for eslint 10 compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 primarily focuses on enhancing the project's security posture and development efficiency by resolving all open Dependabot security alerts. It achieves this through significant dependency upgrades for ESLint and Jest, alongside a strategic switch from ts-jest to @swc/jest for improved test performance. Additionally, specific transitive dependency vulnerabilities are mitigated using Yarn resolutions.

Highlights

  • Dependency Upgrades: Upgraded ESLint from version 9 to 10 and Jest from version 29 to 30 to incorporate the latest features and security patches.
  • Testing Toolchain Improvement: Replaced ts-jest with @swc/jest for TypeScript compilation in tests, leading to significantly faster test execution (approximately 3x faster) and ensuring compatibility with Jest 30.
  • Security Vulnerability Resolution: Addressed all open Dependabot security alerts by upgrading vulnerable packages like minimatch and glob through main dependency updates, and mitigating js-yaml and test-exclude vulnerabilities via Yarn resolutions.
Changelog
  • jest.config.js
    • Removed the ts-jest preset.
    • Configured @swc/jest as the transformer for JavaScript and TypeScript files, specifying es2020 target and commonjs module type.
  • package.json
    • Updated @eslint/js to ^10.0.0.
    • Added @swc/core and @swc/jest as new development dependencies.
    • Updated @types/jest to ^30.0.0.
    • Updated eslint to ^10.0.0.
    • Updated jest to ^30.0.0.
    • Removed jest-util and ts-jest from development dependencies.
    • Updated typescript-eslint to ^8.57.0.
    • Added resolutions for js-yaml (^4.1.0) and test-exclude (^8.0.0) to address transitive dependency vulnerabilities.
Activity
  • All 25 tests passed successfully.
  • ESLint checks passed cleanly.
  • TypeScript build completed without errors.
  • Confirmed that no vulnerable package versions remain in the dependency tree.
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.

Main merged the minimatch 3.1.2→3.1.5 bump (PR #9), which conflicts
with our branch that removes minimatch 3.x entirely. Resolved by
regenerating yarn.lock and .pnp.cjs with our upgrades applied.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 effectively addresses several security vulnerabilities by upgrading eslint and jest. The migration from ts-jest to @swc/jest is a necessary change for Jest 30 compatibility. My review focuses on ensuring the new configuration is maintainable and all dependency versions are compatible. I've identified a critical version incompatibility with typescript-eslint that needs to be addressed, and a minor maintainability improvement for the new Jest configuration.

@joshuanapoli joshuanapoli requested a review from alok27a March 13, 2026 20:56
@joshuanapoli joshuanapoli changed the title Upgrade eslint 10, jest 30 to fix all Dependabot security alerts [PD1-915] Upgrade eslint 10, jest 30 to fix all Dependabot security alerts Mar 13, 2026
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.

1 participant