Skip to content

refactor!: rename autoImports to imports#528

Merged
danielroe merged 1 commit intomainfrom
refactor/auto-imports-rename
Sep 14, 2022
Merged

refactor!: rename autoImports to imports#528
danielroe merged 1 commit intomainfrom
refactor/auto-imports-rename

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

vueuse/vueuse#2176

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR is the equivalent of nuxt/framework#6864 for Nuxt Bridge to keep the project in alignment with Nuxt 3.


As this feature now goes beyond just auto-imports, the naming autoImports as become a bit confusing and ambiguous. See nuxt/framework#6768 for more. This PR renames Nuxt option autoImports to imports and hooks autoImports:* to imports:*. This also aligns with components option.

👉 Migration

⚠️ Breaking change: Nuxt option autoImports named to imports. Hooks autoImports:* renamed to imports:*.

for nuxt.config.ts:

  export default defineNuxtConfig({
    bridge: {
-     autoImports: true,
+     imports: true,
    },
-   autoImports: {
+   imports: {
      // 
    },
  })

for module authors:

-nuxt.hook('autoImports:extend', () => { })
+nuxt.hook('imports:extend', () => { })

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe requested review from antfu and pi0 September 13, 2022 15:15
@danielroe danielroe self-assigned this Sep 13, 2022
Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@danielroe danielroe merged commit 74c3f4f into main Sep 14, 2022
@danielroe danielroe deleted the refactor/auto-imports-rename branch September 14, 2022 09:24
@danielroe danielroe mentioned this pull request Jun 20, 2023
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