Upgrade pinia 3.0.4 → 4.0.2
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 146
Description
# Upgrade pinia 3.0.4 → 4.0.2 (major)
Dependabot PR #7854. Runtime dependency (`dependencies` in package.json); it is the frontend state layer, used broadly across ~25 store modules in `frontend/src/stores/`. Pulled out of the weekly Dependabot slot per the major-version process — needs an owner and verification, not a batch merge.
## Compatibility pre-check
- ✅ Vue peer `^3.5.11` — installed `vue` 3.5.38 satisfies it.
- ✅ TypeScript peer `>=5.6.0` — installed `typescript` 5.9.3 satisfies it.
- ⚠️ `@vue/devtools-api` is now a peer dependency (`^8.1.5`) requiring manual install; installed is 6.6.1 (does not satisfy).
- ⚠️ Pinia 4 is ESM-only — verify the build/bundler and any CJS require paths tolerate this.
## Breaking changes to review
- ESM only; extended CJS support is paid-only (vuejs/pinia#3099).
- `@vue/devtools-api` must now be installed manually (kept out of pinia to reduce install size / supply-chain surface).
- Devtools removed from the IIFE build; must be included manually if that build is used.
- Minimum TypeScript version raised (tied to dropping CommonJS).
## To do before merge
- [ ] Install/verify `@vue/devtools-api ^8.1.5` and smoke-test all `frontend/src/stores/*` (`defineStore`, `createPinia` in `frontend/src/main.js`) after bump.
- [ ] Read the 4.x changelog / migration notes and reconcile with our stores.
## Refs
- Branch: `dependabot/npm_and_yarn/pinia-4.0.2`
- PR: #7854
- Upstream: https://github.com/vuejs/pinia/blob/v4/packages/pinia/CHANGELOG.md
Contributor guide
Research direction
Start with package.json and the 4.x changelog or migration notes, then inspect frontend/src/main.js and the stores under frontend/src/stores/. Verify the manually installed @vue/devtools-api version, the ESM build and any CJS paths, and smoke-test defineStore and createPinia across the stores; done means the dependency is upgraded and the frontend works without compatibility issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100