Skip to content

fix(pinia-orm): declare vue as peer dependency#2052

Merged
CodeDredd merged 1 commit into
mainfrom
fix/vue-peer-dependency
Jul 20, 2026
Merged

fix(pinia-orm): declare vue as peer dependency#2052
CodeDredd merged 1 commit into
mainfrom
fix/vue-peer-dependency

Conversation

@CodeDredd

@CodeDredd CodeDredd commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Why the reported bundle size was inflated

The setup store support (#1905, 953826a9) added import { ref } from 'vue' to useDataStorebut vue was never declared as a peer dependency. Consequences:

  1. size-limit only auto-ignores peer dependencies, so it bundled vue's reactivity system into the measurement: reported 16.18 kB brotli instead of the real 11.75 kB. Real apps were never affected (vue is in every pinia app anyway and gets deduplicated).
  2. Package managers couldn't validate/warn about the vue version pinia-orm actually requires.

Fix

  • vue >= 3.4 declared as peer dependency (pinia already requires vue as peer, so nothing changes at install time)
  • index size limit lowered from the recently-raised 16.5 kB back to 12 kB — the measurement now reflects what users actually pay

Suite green (430 tests), size check green at 11.75/12 kB.

Related: #2051 tracks the structural size reductions (tree-shakeable relations).

The setup store support (#1905) imports ref from vue, but vue was
never declared as a peer dependency. Package managers could not warn
on incompatible vue versions and size-limit bundled vue's reactivity
system into the measurement, inflating it from 11.75 kB to 16.18 kB
brotli. The index size limit is lowered back to 12 kB.
@codecov-commenter

codecov-commenter commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.34%. Comparing base (4ff579b) to head (3bceaa4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2052      +/-   ##
==========================================
+ Coverage   99.24%   99.34%   +0.09%     
==========================================
  Files          83       83              
  Lines        3185     3185              
  Branches      562      562              
==========================================
+ Hits         3161     3164       +3     
+ Misses         17       15       -2     
+ Partials        7        6       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CodeDredd
CodeDredd merged commit 714cbb0 into main Jul 20, 2026
13 checks passed
@CodeDredd
CodeDredd deleted the fix/vue-peer-dependency branch July 20, 2026 17:05
@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
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.

2 participants