Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(schema): add hookable dependency - #9648

Merged
pi0 merged 1 commit into
nuxt:mainfrom
sxzz:fix/dep-hookable
Dec 12, 2022
Merged

fix(schema): add hookable dependency#9648
pi0 merged 1 commit into
nuxt:mainfrom
sxzz:fix/dep-hookable

Conversation

@sxzz

@sxzzsxzz commented Dec 10, 2022

Copy link
Copy Markdown
Contributor

fix the phantom dependency issue

🔗 Linked issue

relate nuxt/nuxt#14146

❓ 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

Add hookable. It's only added in nuxt package. I only need defineNuxtModule from @nuxt/kit. Then hookable pkg is missing.

📝 Checklist

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

fix phantom dependency issue
@codesandbox

Copy link
Copy Markdown

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

@vercel

vercelBot commented Dec 10, 2022

Copy link
Copy Markdown

@sxzz is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@danielroe

danielroe commented Dec 10, 2022

Copy link
Copy Markdown
Member

What is the issue? I'm assuming it's about the types provided by hookable, as I think there is no runtime dependency on it.

@sxzz

sxzz commented Dec 10, 2022

Copy link
Copy Markdown
ContributorAuthor

See here https://github.com/sxzz/unplugin-vue-macros/blob/rollup-3/packages/nuxt/src/index.ts#L20

I only used defineNuxtModule to define a Nuxt module, and nuxt.hook referenced Hookable finally.

	hooks: Hookable<NuxtHooks>;
hook: Nuxt['hooks']['hook']; // definition of `nuxt.hook`

pi0
pi0 approved these changes Dec 12, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for PR!

Ideally we should be able to inline external types for schema but since we already added other deps, this looks good to me as fix.

@pi0pi0 changed the title fix(schema): add hookable depfix(schema): add hookable dependencyDec 12, 2022
@pi0
pi0 merged commit 2804c4c into nuxt:mainDec 12, 2022
@sxzz
sxzz deleted the fix/dep-hookable branch December 12, 2022 11:44
@pi0pi0 mentioned this pull request Dec 15, 2022
6 tasks
@danielroedanielroe mentioned this pull request Jan 20, 2023
danielroe pushed a commit that referenced this pull request Jan 21, 2023
sxzz added a commit to vue-macros/vue-macros that referenced this pull request Feb 25, 2023
Sign up for freeto 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.

3 participants

@sxzz@danielroe@pi0