Skip to content

chore(deps): @tsparticles 4 (major) - #82

Open
lacymorrow wants to merge 1 commit into
mainfrom
chore/deps-m-tsparticles
Open

lacymorrow wants to merge 1 commit into
mainfrom
chore/deps-m-tsparticles

Conversation

@lacymorrow

Copy link
Copy Markdown
Contributor

One sentence

Major bump of the three @tsparticles/* packages from 3 to 4 with sparkles.tsx migrated to the v4 API (left open for review because it is a major with source changes).

Bumps

Package From To
@tsparticles/engine 3.9.1 4.4.0
@tsparticles/slim 3.9.1 4.4.0
@tsparticles/react 3.0.0 4.4.0

Breaking changes and what changed

Sources: engine CHANGELOG (https://github.com/tsparticles/tsparticles/blob/main/engine/CHANGELOG.md), paint docs (https://github.com/tsparticles/tsparticles/blob/main/markdown/Options/Particles/Paint.md), and the shipped @tsparticles/react@4.4.0 type declarations.

  • @tsparticles/react 4 removed initParticlesEngine. The wrapper now exports ParticlesProvider (takes a stable init(engine) callback and renders children once loaded) and useParticlesProvider. sparkles.tsx moves the loadSlim init to a module-scope initEngine and wraps <Particles> in <ParticlesProvider init={initEngine}>, replacing the old useState/useEffect gate.
  • Particle color, fill and stroke moved under particles.paint = { color, fill, stroke }; particles.color, particles.stroke and shape.fill are no longer read (particles would silently render default white). The component now sets paint.color.value from particleColor, paint.fill.enable: true, paint.stroke.width: 0.
  • effect.fill, move.attract and move.trail no longer exist in the v4 option types; all three were disabled or empty here and are removed.
  • @tsparticles/react@4.4.0 pins @tsparticles/engine 4.4.0 exactly, so the three packages move in lockstep.

sparkles.tsx is tsc-excluded (src/components/ui/**), so it was type-checked in isolation against the 4.4.0 types and is clean. It is only imported by cover.tsx, which no route renders, so a visual check of the particle effect is still needed before merging.

Verification

  • pnpm typecheck clean
  • pnpm test: 4 files, 16 tests green
  • pnpm exec vitest run --config vitest.config.node.ts: 3 files, 21 tests green
  • pnpm build passes
  • next start smoke: / 200, /changelog 200, /changelog/nope-xyz 404, /faq 200, /nope-404 404

Installed with --ignore-scripts (isolated-vm postinstall fails under Node 26 locally; matches how Vercel builds).

https://claude.ai/code/session_01KLWmWU1KLE2diUH14ryqv1

- @tsparticles/engine 3.9.1 -> 4.4.0
- @tsparticles/slim 3.9.1 -> 4.4.0
- @tsparticles/react 3.0.0 -> 4.4.0 (requires engine 4.4.0 exactly)

Breaking changes handled in src/components/ui/sparkles.tsx (the only consumer):
- @tsparticles/react 4 removed initParticlesEngine in favour of
  <ParticlesProvider init>; the init callback must be a stable reference, so it
  now lives at module scope and the provider replaces the useState/useEffect gate
- particles.color / particles.stroke / shape.fill moved under particles.paint
  ({ color, fill, stroke }); the old keys were silently ignored in v4
- effect.fill, move.attract and move.trail were removed from the option types
  (all were disabled or empty here) and are dropped

sparkles.tsx is tsc-excluded (src/components/ui/**) so it was type-checked in
isolation against the v4 types and is clean. It is only imported by cover.tsx,
which no route renders, so this needs a visual check before merge.

Claude-Session: https://claude.ai/code/session_01KLWmWU1KLE2diUH14ryqv1
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bones Ready Ready Preview Sep 14, 2026 3:35pm UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant