vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
12.72k stars 996 forks source link

fix: opt in to `import.meta.*` properties #2622

Closed danielroe closed 3 months ago

danielroe commented 3 months ago

This is a very early PR to make this module compatible with changes we expect to release in Nuxt v5.

In Nuxt v3.7.0 we added support for import.meta.* (see original PR) and we've been gradually updating docs and moving across from the old process.* patterned variables.

As I'm sure you're aware, these variables are replaced at build-time and enable tree-shaking in bundled code. This change affects runtime code (that is, that is processed by the Nuxt bundler, like vite or webpack) rather than code running in Node. So it really doesn't matter what the string is, but it makes more sense in an ESM-world to use import.meta rather than process.

(It might be worth updating the module compatibility as well to indicate it needs to have Nuxt v3.7.0+, but I'll leave that with you if you think this is a good approach.)

netlify[bot] commented 3 months ago

Deploy Preview for pinia-playground canceled.

Name Link
Latest commit 26ef2135ddd7de00474284be78affc672c75eb29
Latest deploy log https://app.netlify.com/sites/pinia-playground/deploys/660181ba3eb3050008664fa2
netlify[bot] commented 3 months ago

Deploy Preview for pinia-official ready!

Name Link
Latest commit 26ef2135ddd7de00474284be78affc672c75eb29
Latest deploy log https://app.netlify.com/sites/pinia-official/deploys/660181ba3b30e500081d5128
Deploy Preview https://deploy-preview-2622--pinia-official.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.42%. Comparing base (f695b62) to head (26ef213). Report is 12 commits behind head on v2.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v2 #2622 +/- ## ======================================= Coverage 95.42% 95.42% ======================================= Files 11 11 Lines 2886 2886 Branches 190 190 ======================================= Hits 2754 2754 Misses 131 131 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.