GitShow/vuejs/pinia
vuejs

pinia

๐Ÿ Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support

by vuejs
composition-apissrstorevuevuex
Star on GitHubForkWebsitenpm

TypeScript

14.6k stars1.2k forks300 contributorsActive ยท 2d agoSince 2019v3.0.4MIT

Meet the team

See all 300 on GitHub โ†’
posva
posva1.5k contributions
dependabot[bot]Bot
dependabot[bot]213 contributions
dependabot-preview[bot]Bot
dependabot-preview[bot]49 contributions
renovate-bot
renovate-bot27 contributions
pi0
pi018 contributions
renovate[bot]Bot
renovate[bot]15 contributions
nicodevs
nicodevs14 contributions
danielroe
danielroe13 contributions

Languages

View on GitHub โ†’
TypeScript77.7%
Vue18.1%
CSS1.8%
JavaScript1.8%
HTML0.5%
Shell0.2%

Commit activity

Last 12 weeks ยท 21 commits

Full graph โ†’

Community health

6 of 6 standards met

Community profile โ†’
100
โœ“READMEโœ“Licenseโœ“Contributingโœ“Code of Conductโœ“Issue Templateโœ“PR Template

Recent PRs & issues

Active ยท Last activity 2d ago
See all on GitHub โ†’
JSap0914
fix: trigger reactivity when $patch merges into a shallowRef state propertyOpenPR

Problem When a setup store has a state property and is called with a plain object, deep-merges into the shallowRef's inner value in-place. Because only tracks reference identity (not deep property mutations), dependent reactive effects (watchers, , computed, etc.) never re-run โ€” even though the data was correctly updated in the store. Reported in #2861. The maintainer confirmed the fix direction: call when a shallow-ref-backed property is patched. Reproduction Fix After mutates the shallowRef's inner value in-place, retrieve the raw backing ref via and check + . If both are true, call to force dependent effects to re-run. Changed files: โ€” add / imports + the call in โ€” new regression tests (RED โ†’ GREEN) Verification No existing test edited. AI-assisted contribution. Closes #2861 Summary by CodeRabbit Bug Fixes** Fixed updates for state stored in shallow reactive references, so nested changes now reliably update the store. Improved reactivity after patching nested objects, ensuring dependent views and effects refresh as expected. Added regression coverage to protect this behavior in future releases.

JSap0914 ยท 5d ago

Recent fixes

View closed PRs โ†’
JSap0914
fix: reset removes added state keysMergedPR

Summary remove top-level state keys that are not present in the initial options-store state when runs add a focused regression test covering an added key left behind by Closes #3145 Tests Summary by CodeRabbit Bug Fixes Resetting a setup store now fully restores its original state shape, removing any extra state keys that were added dynamically. State reset updates are grouped more cleanly, so the reset behaves consistently as a single change. Tests Added coverage to verify that dynamically added state is cleared when a store is reset.

JSap0914 ยท 2d ago
JSap0914
$reset leaves added top-level state keys behindClosedIssue

Reproduction For an options store with initial state , add a top-level state key at runtime and then call : Expected behavior restores the store state to the initial state shape, so is removed. Actual behavior remains in after because the reset implementation only assigns initial keys over the current state and never deletes keys missing from the initial state. Verification Added a focused regression test in that fails before the fix and passes after deleting non-initial keys during .

JSap0914 ยท 2d ago
fallintoplace
fix: support thenables in action hooksMergedPR

Summary Treat promise-like action returns as async results for subscribers. Use to assimilate thenables before triggering or hooks. Add coverage for native promises, custom thenables, rejected thenables, and cross-realm promises. Root cause The action wrapper only checked , so promise-like objects and promises created in another realm skipped the async hook path. That meant could receive the unresolved object and could miss rejected thenables. Validation Summary by CodeRabbit Release Notes Bug Fixes Improved action subscription handling to properly recognize and normalize promise-like return values, ensuring consistent behavior across different Promise implementations and contexts. Tests Expanded test coverage for action return and rejection handling with custom thenables and cross-realm Promises.

fallintoplace ยท 2d ago
Structured data for AI agents

Repository: vuejs/pinia. Description: ๐Ÿ Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support Stars: 14628, Forks: 1186. Primary language: TypeScript. Languages: TypeScript (77.7%), Vue (18.1%), CSS (1.8%), JavaScript (1.8%), HTML (0.5%). License: MIT. Homepage: https://pinia.vuejs.org Topics: composition-api, ssr, store, vue, vuex. Latest release: v3.0.4 (7mo ago). Open PRs: 12, open issues: 17. Last activity: 2d ago. Community health: 100%. Top contributors: posva, dependabot[bot], dependabot-preview[bot], renovate-bot, pi0, renovate[bot], nicodevs, danielroe, idorenyinudoh, skirtles-code and others.

ยท@ofershap

Replace github.com with gitshow.dev