Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

danielroe
Copy link
Collaborator

Types of changes

  • 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 a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

Copy link

vercel bot commented Mar 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxt-security ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2024 1:58pm

@Baroshem Baroshem changed the base branch from main to chore/1.3.0 April 2, 2024 04:00
@Baroshem
Copy link
Owner

Baroshem commented Apr 2, 2024

Hey @danielroe

Thank you si much for this PR! I will merge it alongside other features and fixes for 1.3.0 version ;)

@Baroshem Baroshem merged commit 31b1ce2 into Baroshem:chore/1.3.0 Apr 2, 2024
3 checks passed
@danielroe danielroe deleted the process-client branch April 3, 2024 16:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants