fix(security): resolve miniflare and undici vulnerabilities#1500
fix(security): resolve miniflare and undici vulnerabilities#1500Rayhan1967 wants to merge 1 commit intoworkos:mainfrom
Conversation
Greptile SummaryThis PR removes the deprecated
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[package.json devDependencies] --> B{jest-environment-miniflare v2}
A --> C{miniflare ^4.20251004.0}
B -->|transitive dep| D[undici 5.28.4 - VULNERABLE]
C -->|transitive dep| D
A2[package.json devDependencies - AFTER] --> C2{miniflare ^4.20260302.0}
C2 -->|transitive dep| E[undici 7.18.2 - FIXED]
style B fill:#ff6b6b,stroke:#c92a2a,color:#fff
style D fill:#ff6b6b,stroke:#c92a2a,color:#fff
style C2 fill:#51cf66,stroke:#2b8a3e,color:#fff
style E fill:#51cf66,stroke:#2b8a3e,color:#fff
Last reviewed commit: c46189e |
| "jest" | ||
| ], | ||
| "noImplicitAny": true, | ||
| "skipLibCheck": true |
There was a problem hiding this comment.
skipLibCheck may mask type errors
Adding skipLibCheck: true disables type-checking of all .d.ts files, including those from dependencies. While this may have been needed to resolve type conflicts after removing jest-environment-miniflare/globals, it's a broad escape hatch that can hide legitimate type incompatibilities between your code and its dependencies in the future.
Was skipLibCheck added to work around a specific type error? If so, it may be worth documenting what that error was (e.g., in a code comment), so future maintainers understand why it's there. If tsc --noEmit passes without skipLibCheck, consider removing it.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| "include": [ | ||
| "src" | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing trailing newline
The file is missing a trailing newline. Most editors and linters expect files to end with a newline character (POSIX convention), and this will show up as a diff noise in future PRs.
| } | |
| } |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Description
This Pull Request addresses and resolves security vulnerabilities flagged by
npm audit. The identified vulnerabilities were traced back to theundicidependency, which was being pulled in viajest-environment-miniflare.After evaluating the test suite, it was determined that
jest-environment-miniflareis no longer required as the primary test environment. By removing this package, we can rely entirely on the standardjestNode testing configuration. This change effectively eliminates the nested vulnerabilities without impacting the integrity of the test suite.Testing
The following checks have been performed locally to ensure stability:
npm install).npm run build).npm run typecheck).npm run test).npm audit) now reports 0 vulnerabilities.