chore(deps): upgrade vite 7->8 to patch esbuild advisories (v0.27.1)
Resolves the 4 high-severity esbuild advisories (GHSA-gv7w-rqvm-qjhr, GHSA-g7r4-m6w7-qqqr) deferred from v0.27.0. esbuild 0.17.0-0.28.0 is vulnerable; the fix (0.28.1) is only reachable via vite 8 -- vite 7.3.3 pins esbuild ^0.27.0 and cannot reach it. Dev-server-only; the shipped static bundle was never affected. npm audit: 4 high -> 0. - vite ^7.3.3 -> ^8.0.16, @vitejs/plugin-react ^4.3.0 -> ^5.2.0, tsx ^4.16.0 -> ^4.22.4 (vitest 4.1.8 already supports vite 8) - vite 8 bundles with Rolldown: manualChunks object form -> function form (vite.config.ts) is the only source change required - Full gate chain green (typecheck, lint, knip, validate:locales, 500/500 tests, build); dev/preview + Tauri-context build verified - Bump 5 manifests 0.27.0 -> 0.27.1; CHANGELOG + stack-version docs Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3c667fa8d3
commit
9554dcc7af
11 files changed
+697
-440
No files matched your search
@@ -2,6 +2,54 @@
|
||||
|
||||
All notable changes to YTDescGen ship as tagged releases on `main`.
|
||||
|
||||
## v0.27.1 — 2026-06-13
|
||||
|
||||
Security/dependency release. Resolves the 4 high-severity `esbuild` advisories
|
||||
deferred from v0.27.0 by upgrading `vite` 7 → 8. The advisories
|
||||
([GHSA-gv7w-rqvm-qjhr](https://github.com/advisories/GHSA-gv7w-rqvm-qjhr),
|
||||
[GHSA-g7r4-m6w7-qqqr](https://github.com/advisories/GHSA-g7r4-m6w7-qqqr)) affect
|
||||
`esbuild` `0.17.0 – 0.28.0`; the fix lives in `esbuild` 0.28.1, which only
|
||||
`vite` 8 pulls (`vite` 7.3.3 pins `esbuild ^0.27.0` and cannot reach it). They
|
||||
only ever affected the local dev server, never the shipped static bundle. No
|
||||
feature or behaviour changes — `npm audit` now reports **0 vulnerabilities**.
|
||||
|
||||
### Security / dependencies
|
||||
|
||||
- **`vite` `^7.3.3` → `^8.0.16`** — the only release line whose `esbuild`
|
||||
constraint reaches the patched 0.28.1.
|
||||
- **`@vitejs/plugin-react` `^4.3.0` → `^5.2.0`** — the vite-8-compatible major.
|
||||
Stays on the 5.x line (peer `vite: ^4 || ^5 || ^6 || ^7 || ^8`); 6.x is the
|
||||
Rolldown/react-compiler variant and would pull extra peers, so it was avoided.
|
||||
- **`tsx` `^4.16.0` → `^4.22.4`** — 4.22+ is the first `tsx` on patched
|
||||
`esbuild ~0.28.0` (resolves to 0.28.1). Used only by `validate:locales` /
|
||||
`generate:locale`.
|
||||
- `vitest` 4.1.8 already supports `vite` 8 (peer `^6 || ^7 || ^8`) — unchanged.
|
||||
- The tree now hoists a single `esbuild@0.28.1`; `npm audit` → 0 high.
|
||||
|
||||
### Changed
|
||||
|
||||
- **`manualChunks` object form → function form** ([vite.config.ts](vite.config.ts))
|
||||
— **vite 8 bundles with Rolldown** (replacing Rollup), which only accepts the
|
||||
function form of `manualChunks` (the object form was a Rollup-only API). The
|
||||
same three vendor chunks (`react`, `router`, `i18n`) are reproduced via
|
||||
anchored `[\\/]node_modules[\\/]…` regexes so `react-router*` and
|
||||
`react-i18next` don't get swept into the `react` chunk. This is the only
|
||||
source change the upgrade required.
|
||||
|
||||
### Under the hood
|
||||
|
||||
- Full gate chain green on vite 8: `typecheck`, `lint`, `knip`,
|
||||
`validate:locales` (927/542), `test:run` (**500/500**), `build`. `npm run dev`
|
||||
(port 5173, matching the Tauri `devUrl`) and `npm run preview` (4173) both
|
||||
serve. The Tauri-context frontend build (`TAURI_ENV_PLATFORM` set) still
|
||||
switches `base` to `/` correctly; `tauri.conf.json` `devUrl`/`frontendDist`
|
||||
are unchanged and compatible.
|
||||
- Web bundle (Rolldown): entry chunk 165.3 kB / 46.3 kB gzip, `react` 133.4 kB,
|
||||
`i18n` 57.9 kB, `router` 23.4 kB — all well under the 500 kB budget. Chunk
|
||||
sizes are not directly comparable to the v0.27.0 Rollup numbers (different
|
||||
bundler, different chunking heuristics).
|
||||
- Five manifests bumped 0.27.0 → 0.27.1.
|
||||
|
||||
## v0.27.0 — 2026-06-13
|
||||
|
||||
Adds a designed, internationalized **error-page system**. A mistyped hash
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- **Repository**: `github.com/poli0981/youtube-generator`
|
||||
- **License**: Apache-2.0 (see `LICENSE` + `NOTICE`)
|
||||
- **Primary Language**: TypeScript
|
||||
- **Stack**: React 18 + Vite 7 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
|
||||
- **Stack**: React 18 + Vite 8 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
|
||||
- **Target Platforms**: Web (GitHub Pages), Desktop (Windows/macOS/Linux via Tauri)
|
||||
|
||||
## Tech Stack
|
||||
@@ -15,7 +15,7 @@
|
||||
| Layer | Technology | Why |
|
||||
|-------|-----------|-----|
|
||||
| Framework | React 18 | Familiar from F2P tracker dashboard |
|
||||
| Build | Vite 5 | Fast HMR, clean config |
|
||||
| Build | Vite 8 | Fast HMR, Rolldown bundler |
|
||||
| Language | TypeScript (strict) | Type safety for template engine |
|
||||
| Styling | Tailwind CSS 3 | Utility-first, fast iteration |
|
||||
| State | Zustand + persist middleware | Simple, localStorage/file persistence |
|
||||
|
||||
@@ -68,7 +68,7 @@ Nothing leaves your device. No analytics, no telemetry, no tracking. The web ver
|
||||
|
||||
## Tech Stack
|
||||
|
||||
React 18 · TypeScript (strict) · Vite 7 · Tailwind CSS 3 · Zustand · i18next · Tauri 2 (Rust stable).
|
||||
React 18 · TypeScript (strict) · Vite 8 · Tailwind CSS 3 · Zustand · i18next · Tauri 2 (Rust stable).
|
||||
|
||||
Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Install in this order:
|
||||
|
||||
| Tool | Version | Why |
|
||||
| --- | --- | --- |
|
||||
| **Node.js** | `>= 22.0.0` | Vite 7 dropped support for older Node. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). |
|
||||
| **Node.js** | `>= 22.12.0` | Vite 8 requires Node `^20.19` or `>= 22.12`. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). |
|
||||
| **npm** | bundled with Node 22 | The project uses npm; `pnpm` and `yarn` are not tested. |
|
||||
| **Rust** | stable, `>= 1.78` | Required for the Tauri desktop build. Install via [rustup](https://rustup.rs/). |
|
||||
| **Python** | `3.12` | Optional — only needed for some Tauri platform tooling on Windows. |
|
||||
|
||||
@@ -25,7 +25,7 @@ Cài theo thứ tự:
|
||||
|
||||
| Công cụ | Phiên bản | Lý do |
|
||||
| --- | --- | --- |
|
||||
| **Node.js** | `>= 22.0.0` | Vite 7 đã bỏ hỗ trợ Node cũ. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm). |
|
||||
| **Node.js** | `>= 22.12.0` | Vite 8 yêu cầu Node `^20.19` hoặc `>= 22.12`. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm). |
|
||||
| **npm** | đi kèm Node 22 | Dự án dùng npm; `pnpm` và `yarn` chưa test. |
|
||||
| **Rust** | stable, `>= 1.78` | Bắt buộc cho build Tauri. Cài qua [rustup](https://rustup.rs/). |
|
||||
| **Python** | `3.12` | Tùy chọn — chỉ cần cho một số tooling Tauri trên Windows. |
|
||||
|
||||
Generated
+622
-424
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.27.0",
|
||||
"version": "0.27.1",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
@@ -45,7 +45,7 @@
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/react": "^18.3.0",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.0",
|
||||
"@vitejs/plugin-react": "^5.2.0",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
@@ -54,10 +54,10 @@
|
||||
"prettier": "^3.3.0",
|
||||
"prettier-plugin-tailwindcss": "^0.6.0",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"tsx": "^4.16.0",
|
||||
"tsx": "^4.22.4",
|
||||
"typescript": "^5.5.0",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^7.3.3",
|
||||
"vite": "^8.0.16",
|
||||
"vitest": "^4.1.8"
|
||||
}
|
||||
}
|
||||
Generated
+1
-1
@@ -5535,7 +5535,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.27.0"
|
||||
version = "0.27.1"
|
||||
dependencies = [
|
||||
"tauri",
|
||||
"tauri-build",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.27.0"
|
||||
version = "0.27.1"
|
||||
description = "YouTube Gameplay Description Generator"
|
||||
authors = ["poli0981"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
|
||||
"productName": "YTDescGen",
|
||||
"version": "0.27.0",
|
||||
"version": "0.27.1",
|
||||
"identifier": "com.skullmute.ytdescgen",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
|
||||
+15
-4
@@ -23,10 +23,21 @@ export default defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
react: ["react", "react-dom"],
|
||||
router: ["react-router-dom"],
|
||||
i18n: ["i18next", "react-i18next", "i18next-resources-to-backend"],
|
||||
// Vite 8 bundles with Rolldown, which only accepts the function form of
|
||||
// manualChunks (the object form is a Rollup-only API). Anchored [\\/]
|
||||
// regexes keep each vendor in its own chunk without cross-matching —
|
||||
// react-router* and react-i18next must not fall into the "react" chunk.
|
||||
manualChunks(id) {
|
||||
if (/[\\/]node_modules[\\/]react(-dom)?[\\/]/.test(id)) return "react";
|
||||
if (/[\\/]node_modules[\\/]react-router(-dom)?[\\/]/.test(id))
|
||||
return "router";
|
||||
if (
|
||||
/[\\/]node_modules[\\/](i18next|react-i18next|i18next-resources-to-backend)[\\/]/.test(
|
||||
id,
|
||||
)
|
||||
)
|
||||
return "i18n";
|
||||
return undefined;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user