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 #475

Merged
merged 2 commits into from
Apr 3, 2024
Merged

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

merged 2 commits into from
Apr 3, 2024

Conversation

danielroe
Copy link
Collaborator

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

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 42.22%. Comparing base (b41470d) to head (6cf099c).
Report is 2 commits behind head on main.

❗ Current head 6cf099c differs from pull request most recent head 02b3fbd. Consider uploading reports for the commit 02b3fbd to get more accurate results

Files Patch % Lines
src/runtime/plugin.ts 0.00% 5 Missing ⚠️
src/runtime/composables/index.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #475   +/-   ##
=======================================
  Coverage   42.22%   42.22%           
=======================================
  Files          26       26           
  Lines        1383     1383           
  Branches      139      139           
=======================================
  Hits          584      584           
  Misses        778      778           
  Partials       21       21           

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

@Diizzayy Diizzayy merged commit 6dd83ff into main Apr 3, 2024
4 checks passed
@danielroe danielroe deleted the process-client branch April 3, 2024 15:15
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.

None yet

2 participants