Every major the project had been sitting on, brought current. No user-facing
feature changes; the app should behave identically.
React 18 → 19 (+ types, @vitejs/plugin-react 6)
Tailwind 3 → 4
ESLint 9 → 10 (+ eslint-plugin-react-hooks 5 → 7)
Zustand 4 → 5
i18next 23 → 26, react-i18next 15 → 17
@testing-library/*, typescript-eslint 8.67, Vite/Vitest/tsx/knip patches
**React 19** needed exactly one source change: `useRef<T>(null)` is now typed
`RefObject<T | null>` rather than `RefObject<T>`. The old type quietly claimed a
ref was non-null before its element mounted; ScrollToTopButton now matches,
which makes its existing null check honest rather than defensive.
**Tailwind 4** moves configuration from `tailwind.config.ts` (deleted) into
CSS. The tokens live in an `@theme` block that maps Tailwind's names onto the
existing `:root` / `.light` variables, so the runtime theme toggle still owns
the values and keeps working untouched. `darkMode: "class"` becomes
`@custom-variant dark` — the app toggles a class on <html> rather than
following the OS, so the default prefers-color-scheme variant would be wrong.
Verified in the browser in both themes; a CSS migration fails visually, not at
build time.
**The lint upgrade earned its keep.** `react-hooks/set-state-in-effect` (new in
v7, React Compiler-aware) flagged seven sites. Four were real extra render
passes:
- use-online-status rewritten to `useSyncExternalStore`. It had been
re-reading `navigator.onLine` inside an effect to close the gap between
first render and the listeners attaching — subscribing properly removes the
gap instead of patching it.
- ShortcutHelpModal derives its filter from `open` instead of resetting state
in an effect, so a modal that is closed most of the time stops scheduling
work on unrelated parent updates.
- DraftIndicator and use-languages-ready now guard their setters.
Three remain as warnings, deliberately. They genuinely sync state FROM an
external source (i18next bundle readiness, a text mirror of a numeric store
field, a useMemo the compiler cannot preserve) and need a restructure rather
than a guard. Recorded in eslint.config.js with the reason — downgraded, not
silenced, and not a reason to hold back ESLint 10.
**lucide-react deliberately stays at 0.577.0.** 1.x removes every brand icon;
upstream dropped them for trademark reasons. Taking it would mean either a
generic globe beside a Facebook link or re-adding the marks ourselves and
inheriting the exposure lucide just shed. 0.577 already delivered the win —
main bundle 175 kB → 137 kB.
knip now ignores `tailwindcss`: after the migration its only reference is
`@import "tailwindcss"` in CSS, which knip does not follow.
Full gate green — typecheck, typecheck:all, lint, format:check,
validate:locales, knip, check:version, 692 tests, build — plus a browser check
of both themes with the editor and batch pages functional.
0.36.0 is reserved for the two new locales.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
69 lines
2.1 KiB
JSON
69 lines
2.1 KiB
JSON
{
|
|
"name": "yt-desc-gen",
|
|
"version": "0.37.0",
|
|
"private": true,
|
|
"license": "Apache-2.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"lint": "eslint src/ tests/ scripts/",
|
|
"lint:fix": "eslint src/ tests/ scripts/ --fix",
|
|
"knip": "knip",
|
|
"typecheck": "tsc --noEmit",
|
|
"typecheck:all": "tsc --noEmit -p tsconfig.check.json",
|
|
"format": "prettier --write \"{src,tests,scripts}/**/*.{ts,tsx,css}\"",
|
|
"format:check": "prettier --check \"{src,tests,scripts}/**/*.{ts,tsx,css}\"",
|
|
"check:version": "tsx scripts/check-version-sync.ts",
|
|
"validate:locales": "tsx scripts/validate-locales.ts",
|
|
"generate:locale": "tsx scripts/generate-locale-template.ts",
|
|
"tauri": "tauri",
|
|
"tauri:dev": "tauri dev",
|
|
"tauri:build": "tauri build"
|
|
},
|
|
"dependencies": {
|
|
"@tauri-apps/api": "^2.11.1",
|
|
"@tauri-apps/plugin-dialog": "^2.7.2",
|
|
"@tauri-apps/plugin-fs": "^2.5.1",
|
|
"@tauri-apps/plugin-opener": "^2.5.4",
|
|
"@tauri-apps/plugin-shell": "^2.3.5",
|
|
"clsx": "^2.1.1",
|
|
"i18next": "^26.3.6",
|
|
"i18next-resources-to-backend": "^1.2.3",
|
|
"lucide-react": "^0.577.0",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"react-hot-toast": "^2.6.0",
|
|
"react-i18next": "^17.0.11",
|
|
"react-router-dom": "^7.18.2",
|
|
"zustand": "^5.0.15"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@tailwindcss/postcss": "^4.3.3",
|
|
"@testing-library/jest-dom": "^7.0.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/node": "^26.2.0",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"@vitejs/plugin-react": "^6.0.5",
|
|
"autoprefixer": "^10.5.4",
|
|
"eslint": "^10.8.1",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"knip": "^6.32.2",
|
|
"postcss": "^8.5.26",
|
|
"prettier": "^3.9.6",
|
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsx": "^4.23.12",
|
|
"typescript": "^5.5.0",
|
|
"typescript-eslint": "^8.67.0",
|
|
"vite": "^8.2.1",
|
|
"vitest": "^4.1.10"
|
|
}
|
|
}
|