Skip to content

LF-5206: Upgrade to Vite v5#4171

Open
SayakaOno wants to merge 2 commits into
integrationfrom
LF-5206/Upgrade_to_Vite_v5
Open

LF-5206: Upgrade to Vite v5#4171
SayakaOno wants to merge 2 commits into
integrationfrom
LF-5206/Upgrade_to_Vite_v5

Conversation

@SayakaOno
Copy link
Copy Markdown
Collaborator

@SayakaOno SayakaOno commented May 15, 2026

Description

Upgrade Vite to v5. (Most changes relate to SVG imports)
Migration guide: https://v5.vite.dev/guide/migration

  • Upgrade vite, vitest, vite-plugin-svgr, vite-plugin-pwa, and vite-plugin-istanbul, which are incompatible with Vite v5
  • Set moduleResolution to Bundler in tsconfig files (required for Rollup 4)
    • Fix @storybook/react/* wildcard imports to correct package paths
    • TypeScript’s Node module resolution previously allowed these, but Bundler mode (stricter subpath export rules) correctly rejects them. These were pre-existing issues exposed by this change.
  • Fix missing key props in HarvestUseType and TransplantSpotlight (caught by pre-commit)
  • Replace silenceDeprecations: ['legacy-js-api'] with api: 'modern-compiler'

Jira link: https://lite-farm.atlassian.net/browse/LF-5206

Type of change https://lite-farm.atlassian.net/browse/LF-5206

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested pnpm run dev and pnpm build & pnpm preview.

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

SayakaOno and others added 2 commits May 15, 2026 13:19
- Bump vite, vitest, vite-plugin-svgr, vite-plugin-pwa, vite-plugin-istanbul
- Migrate SVG imports from { ReactComponent as X } to default ?react query (vite-plugin-svgr v4 breaking change)
- Set moduleResolution to Bundler in tsconfig files (Rollup 4 requirement)
- Fix @storybook/react/* wildcard imports exposed by stricter moduleResolution
- Fix missing key props in HarvestUseType and TransplantSpotlight (pre-existing, exposed by lint-staged)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces silenceDeprecations: ['legacy-js-api'] with api: 'modern-compiler',
now that Vite 5.4+ is in use.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SayakaOno SayakaOno self-assigned this May 15, 2026
@SayakaOno SayakaOno added the enhancement New feature or request label May 15, 2026
@socket-security
Copy link
Copy Markdown

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.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
Critical CVE: Happy DOM: VM Context Escape can lead to Remote Code Execution in npm happy-dom

CVE: GHSA-37j7-fg3j-429f Happy DOM: VM Context Escape can lead to Remote Code Execution (CRITICAL)

Affected versions: < 20.0.0

Patched version: 20.0.0

From: packages/webapp/package.jsonnpm/happy-dom@15.11.7

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/happy-dom@15.11.7. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: packages/webapp/pnpm-lock.yamlnpm/happy-dom@15.11.7npm/i18next-parser@5.4.0npm/entities@4.5.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@4.5.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: packages/webapp/pnpm-lock.yamlnpm/i18next-parser@5.4.0npm/entities@6.0.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@6.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Protestware or unwanted behavior: npm es5-ext

Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.

From: packages/webapp/pnpm-lock.yamlnpm/es5-ext@0.10.64

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es5-ext@0.10.64. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@SayakaOno SayakaOno marked this pull request as ready for review May 19, 2026 22:54
@SayakaOno SayakaOno requested review from a team as code owners May 19, 2026 22:54
@SayakaOno SayakaOno requested review from kathyavini and removed request for a team May 19, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant