chore(deps): modernize to vite 7 + jspdf 4; clear audit advisories - #7
Merged
Merged
Conversation
Bumps @opencanva/core deps: vite ^5.4.10 -> ^7.0.0, jspdf ^2.5.2 -> ^4.2.1, @vitejs/plugin-react ^4.3.3 -> ^4.7.0. Clears the npm audit chain (was 2 moderate / 2 high / 1 critical, via old dompurify+esbuild) down to a single low, Windows-only, dev-server-only esbuild advisory that does not apply to Vite's usage (documented in SECURITY.md). No source changes were needed: the jspdf call site already uses the v4 named import + stable addImage/save API (and the Export handler already catches and toasts failures), and the Vite plugin hooks (server.ws, handleHotUpdate, transformIndexHtml, configureServer) are unchanged in v7. create-opencanva: bump its core dep to ^0.2.0 (a ^0.1.0 pin would strand every fresh 'npm create' project on the pre-upgrade core) and version to 0.2.0. NOTE: @opencanva/core@0.2.0 must be published BEFORE create-opencanva@0.2.0, else 'npm create opencanva' cannot resolve ^0.2.0. Add engines.node (^20.19.0 || >=22.12.0, Vite 7's floor) to core, create-opencanva, and the scaffold template so old-Node users get a clear EBADENGINE instead of a cryptic crash; note the floor in README, CONTRIBUTING, and the CI node pin. Versions: @opencanva/core 0.1.1 -> 0.2.0, create-opencanva 0.1.1 -> 0.2.0. Verified by running (Node 26): dev render + HMR/live-sync, PNG/SVG/PDF export, production build, standalone cold-install render, all typechecks + CI gates. Adversarial multi-agent review (vite7/jspdf4 compat, resolution, consumers) folded in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Modernizes
@opencanva/core's heavy deps to clear the npm audit advisories users were seeing:^5.4.10→^7.0.0^2.5.2→^4.2.1^4.3.3→^4.7.0(already peer-supports vite 7)^0.1.0→^0.2.0@opencanva/core0.1.1 → 0.2.0,create-opencanva0.1.1 → 0.2.0Why
npm auditreported 2 moderate / 2 high / 1 critical — all from the transitivejspdf@2 → dompurifychain plusvite@5 → esbuild. jspdf 4 drops the bundled DOMPurify (it's now optional + patched 3.4.11) and vite 7 ships a modern esbuild.Result: 5 advisories → 1 low, and that one is the Windows-only, dev-server-only esbuild advisory (GHSA-g7r4-m6w7-qqqr) which doesn't apply to how Vite uses esbuild — documented as accepted in
SECURITY.md.No source changes needed
addImage/save, and the Export handler already try/catches → toast.server.ws,handleHotUpdate,transformIndexHtml,configureServer) and config keys are unchanged in v7.Hardening (from the adversarial review)
engines.node(^20.19.0 || >=22.12.0) added to core, create-opencanva, and the scaffold template — old-Node users now get a clearEBADENGINEinstead of a cryptic vite crash.@opencanva/core@0.2.0must be published beforecreate-opencanva@0.2.0, otherwisenpm create opencanvacan't resolve the new^0.2.0range.Verified by running (Node 26)
check:sync+ isolated template scaffold-install-typecheck🤖 Generated with Claude Code