fix: reuse nuxt instance at plugin setup#3690
Conversation
WalkthroughThe changes refactor several i18n-related utilities and plugins to require an explicit Changes
Sequence Diagram(s)sequenceDiagram
participant Plugin as Nuxt Plugin
participant NuxtApp as NuxtApp Instance
participant Util as i18n Utility Function
Plugin->>NuxtApp: useNuxtApp(_nuxt._id)
Plugin->>Util: call Utility Function (nuxtApp, ...)
Util->>NuxtApp: Access i18n config/state via nuxtApp
Util-->>Plugin: Return result
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (2)src/runtime/plugins/i18n.ts (2)src/runtime/utils.ts (2)🔇 Additional comments (19)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
<!-- ☝️ PR title should follow conventional commits (https://conventionalcommits.org). In particular, the title should start with one of the following types: - docs: 📖 Documentation (updates to the documentation or readme) - fix: 🐞 Bug fix (a non-breaking change that fixes an issue) - feat: ✨ New feature/enhancement (a non-breaking change that adds functionality or improves existing one) - feat!/fix!:⚠️ Breaking change (fix or feature that would cause existing functionality to change) - chore: 🧹 Chore (updates to the build process or auxiliary tools and libraries) --> ### 🔗 Linked issue * #899 <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> ### 📚 Description Resolves #899 Updates nuxt-i18n to a compatible version and updates the i18n components in playground and showcase to use types and functions as recommended by the docs. #899 is actually resolved by nuxt-modules/i18n#3690, though instances will still get mixed up across stories (unrelated to nuxt-i18n). <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? -->
🔗 Linked issue
📚 Description
Supersedes #3689
Resolves nuxt-modules/storybook#899
Summary by CodeRabbit
No visible changes to end-user functionality.