Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Mar 25, 2024
Merged

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

merged 2 commits into from
Mar 25, 2024

Conversation

danielroe
Copy link
Contributor

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for prismic-module canceled.

Name Link
🔨 Latest commit 503ca8d
🔍 Latest deploy log https://app.netlify.com/sites/prismic-module/deploys/6601985363de4800086e6168

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

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

@lihbr
Copy link
Collaborator

lihbr commented Mar 25, 2024

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

@lihbr lihbr merged commit fee3cbe into master Mar 25, 2024
14 checks passed
@lihbr lihbr deleted the process-client branch March 25, 2024 16:16
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