nuxt-modules / prismic

Easily connect your Nuxt.js application to your content hosted on Prismic
https://prismic.nuxtjs.org
MIT License
245 stars 48 forks source link

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

Closed danielroe closed 7 months ago

danielroe commented 7 months ago

Types of changes

Description

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.)

Checklist:

netlify[bot] commented 7 months ago

Deploy Preview for prismic-module canceled.

Name Link
Latest commit 503ca8dac9bcd4088c6b789aab1544061e0ada45
Latest deploy log https://app.netlify.com/sites/prismic-module/deploys/6601985363de4800086e6168
codecov[bot] commented 7 months ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (4ce471f) to head (503ca8d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #208 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 5 5 Lines 208 208 Branches 19 19 ========================================= Hits 208 208 ```

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

lihbr commented 7 months ago

Thanks! Will ship this week along other fixes and maintenance stuff 🚀