Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

refactor!: remove deprecated api #9029

Merged
merged 14 commits into from
Nov 16, 2022
Merged

refactor!: remove deprecated api #9029

merged 14 commits into from
Nov 16, 2022

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Nov 16, 2022

πŸ”— Linked issue

❓ 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

Over the time developing Nuxt 3, we have introduced options and apis that got deprecated. Moving their support before v3 so that we don't need to maintain them in long term.

Overview:

  • Remove PrivateRuntimeConfig interface support
  • Remove autoImports option
  • Remove autoImports:extend hook support
  • Remove deprecated addAutoImport and addAutoImport utilities (use addImports and addImportsDir)
  • Remove defer option for useAsyncData
  • Remove support for installModule(nuxt, nuxtModule)
  • Remove support for module defenition as function
  • Remove support for name in module definition (use meta.name)
  • Remove deprecated throwError (use showError)
  • Remove deprecated useActiveRoute (use useRoute)
  • Remove deprecated NuxtConfig and defineNuxtConfig imports from nuxt (import from nuxt/config)
  • Remove deprecated <Script> component (use useHead)
  • Remove deprecated RouterConfigOptions interface (use RouterConfigSerializable)
  • Remove deprecated fileName for template options (use filename)
  • Remove deprecated <NuxtNestedPage> and <NuxtChild> components
  • Remove deprecated buildModules config
  • Remove deprecated privateRuntimeConfig and publicRuntimeConfig options
  • Remove deprecated imports.presets[].name (use presets.imports instead)
  • mark kit cjs utils as deprecated (we still internally need them)

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Nov 16, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@pi0 pi0 changed the title refactor!: remove deprecated and legscy functions and types refactor!: remove deprecated api Nov 16, 2022
@pi0 pi0 merged commit 5ac9d85 into main Nov 16, 2022
@pi0 pi0 deleted the refactor/deprecated branch November 16, 2022 02:26
@pi0 pi0 mentioned this pull request Nov 16, 2022
@ymansurozer
Copy link

ymansurozer commented Nov 24, 2022

Remove autoImports option

So we can no longer add autoImports option to modules, like nuxt/pinia? Is there any other way to add auto imports for specific functions in modules/packages?

@pi0
Copy link
Member Author

pi0 commented Nov 24, 2022

@ymansurozer You can use addImports for modules. The older name addAutoImports is only removed.

@ymansurozer
Copy link

Thanks Pooya! But I meant autoImports, not addAutoImports, like:

// nuxt.config.ts
[
      "@pinia/nuxt",
      {
        autoImports: ["defineStore", "acceptHMRUpdate"],
      },
],

@manniL
Copy link
Member

manniL commented Nov 24, 2022

@ymansurozer This is up to the module author. Check the pinia source code for an example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants