nuxt-auth icon indicating copy to clipboard operation
nuxt-auth copied to clipboard

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

Open danielroe opened this issue 1 year ago โ€ข 1 comments

๐Ÿ”— Linked issue

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • [ ] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ 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

  • [ ] I have linked an issue or discussion.
  • [ ] I have added tests (if possible).
  • [ ] I have updated the documentation accordingly.

danielroe avatar Mar 25 '24 14:03 danielroe

@zoey-kaiser Let's re-schedule this to 0.8 to hint on possible breaking changes.

Would also be great to update our Getting started -> Installation docs to suggest a more concrete version than https://github.com/sidebase/nuxt-auth/blob/5d713aa419bcefc342f6a6e14899db6cc3d05d7f/docs/content/1.getting-started/2.installation.md?plain=1#L52 and also to make this more visible

phoenix-ru avatar Apr 04 '24 09:04 phoenix-ru