fix(deps): resolve 54 of 80 Dependabot security alerts (safe batch) - #297
Conversation
Safe, non-breaking dependency security fixes against the dev branch. Verified: `yarn install` + `nuxt prepare` complete cleanly. Direct in-major bumps: - nuxt ^3.12.4 -> ^3.21.7 - @trpc/client + @trpc/server ^10.4.3 -> ^10.45.3 - systeminformation ^5.21.7 -> ^5.31.6 - postcss ^8.4.31 -> ^8.5.10 (app + packages/ui) - @babel/core ^7.14.8 -> ^7.29.6 (packages/ui) Transitive fixes via `yarn dedupe` + re-resolution to patched latest-in-range, plus targeted root `resolutions` for single-major packages (axios 0.32.0, on-headers 1.1.0, trim 0.0.3). Resolves criticals/highs in all shipped Electron runtime deps (form-data, elliptic, pbkdf2, sha.js, shell-quote, handlebars, simple-git, tar, ws, undici, braces, cross-spawn, semver, minimatch, node-forge, glob, axios, rollup, and more). Not included (require breaking major upgrades + dedicated testing): - Shipped app: electron 23->39, electron-updater 5->6, uuid 8->11, vitest 0->3, vite 2->6 (packages/ui) - Dev-only tooling not shipped in the app (packages/ui Storybook6/ webpack4/vite2 chain, @octokit release tooling, electron-builder 23->24): braces 2.x, micromatch 3.x, rollup 2.x, serialize-javascript, webpack-dev-middleware 3.x, trim-newlines, @tootallnate/once - ip (no patch published) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Node 16 is EOL (Sept 2023) and nuxt 3.21.7 requires node ^20.19.0 || >=22.12.0. The Node 16 runner crashed in the nuxt prepare postinstall (node:util styleText is Node 20.12+). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
app/vitest.config.ts imports @vitejs/plugin-vue but only relied on it
being hoisted from packages/ui. After the dedupe/nuxt bump changed
hoisting it was no longer resolvable from app/, breaking the test step
('Cannot find module @vitejs/plugin-vue'). Pin ^4.6.2 to match the
vite 4 that vitest 0.31.4 bundles.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bumping nuxt into the 3.13+ line floats vite 5->7, which cascades into breaking build changes (modern Sass async API, stricter electron externalization in rollup 4). That belongs in a dedicated nuxt/vite upgrade alongside vitest, not this security batch. Pin nuxt to 3.12.4 (exact, so dedupe can't float it) and revert sass to 1.60.0. Verified locally: yarn install, app unit tests (7/7), and nuxt generate all pass. Net result: 54/80 Dependabot alerts resolved. The nuxt-ecosystem alerts (nuxt, @nuxt/vite-builder, @nuxt/devtools, unhead, vite) are deferred to the dedicated upgrade. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nuxt-electron's vite build leaves an fsevents file-watcher open, so 'nuxt generate' completes its work but the process never exits — the '&& electron-builder' step in 'yarn build' never starts and CI hangs until timeout. (Pre-existing on dev; reproduced on a clean origin/dev checkout, independent of the dependency bumps.) Add a Nuxt 'close' hook that exits once Nuxt closes after a non-dev build/generate. Verified locally: 'yarn build' now runs generate -> electron-builder end to end (exit 0, dmg/zip produced for both archs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Build pipeline fixed end-to-endInvestigated the remaining CI failure. After the install/test fixes, the build reached the electron-builder step and hung ~25min. Root cause: This is pre-existing on Fixed with a Nuxt So this PR now also unbreaks the build, not just the security alerts. |
The previous close hook also fired during the postinstall 'nuxt prepare' (also non-dev), exiting it before .nuxt/tsconfig.json was written and breaking the unit-test step. Gate the forced exit on process.argv[2] being 'generate' or 'build' so prepare and dev are untouched. Verified locally: nuxt prepare writes .nuxt/tsconfig.json and exits 0, vitest passes 7/7, and nuxt generate completes (.output + dist-electron written) then exits 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Resolves 54 of 80 open Dependabot security alerts with safe, non-breaking dependency updates against
dev. All criticals/highs in the shipped Electron runtime (crypto, networking, archive, parsing libs) are fixed.✅ Verified locally:
yarn install, app unit tests (7/7), andnuxt generateall pass.What changed
Direct in-major bumps (manifests):
Transitive fixes:
yarn dedupe+ re-resolution to patched latest-in-range, plus targeted rootresolutionsfor single-major packages (axios0.32.0,on-headers1.1.0,trim0.0.3). Clears form-data, elliptic, pbkdf2, sha.js, shell-quote, handlebars, simple-git, tar (7.x), ws, undici, braces (3.x), cross-spawn (7.x), semver (7.x), minimatch (9.x), node-forge, glob, rollup (4.x), and more.Build/CI fixes uncovered while validating:
nuxt prepare. Bumped the build matrix.@vitejs/plugin-vuedeclared explicitly inapp.app/vitest.config.tsimported it but relied on hoisting frompackages/ui; after dedupe it was no longer resolvable, breaking the test step. Pinned^4.6.2(matches vitest 0.31's bundled vite 4).3.12.4(pinned exact). Floating into the 3.13+ line pulls vite 5→7, which cascades into breaking build changes. Deferred to a dedicated nuxt/vite/vitest upgrade.Not included — needs dedicated follow-up
Breaking major upgrades that require code/build changes + testing:
packages/uiStorybook 6 / webpack4 chain,@octokitrelease tooling, electron-builder 23→24): braces 2.x, micromatch 3.x, rollup 2.x, serialize-javascript, webpack-dev-middleware 3.x, trim-newlines, @tootallnate/onceNote on yarn berry
Scoped resolution keys (
pkg@npm:^6.0.0) are ignored by yarn 3.6; bare resolutions force all major lines (would break cross-major peers like js-yamlsafeLoad, webpack4, ajv-keywords). Bare resolutions here are limited to single-major packages.Supersedes
Closes stale Dependabot PRs: #281, #282, #283, #287, #288, #289, #290, #291, #293, #294. (#278 electron-updater and #292 vite are major bumps deferred to the dedicated upgrade.)
🤖 Generated with Claude Code