Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kit): respect priority when registering components dirs #22882

Merged
merged 1 commit into from Aug 29, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Aug 29, 2023

πŸ”— Linked issue

resolves #22876

❓ 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)
  • 🧹 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 fixes a unintended regression from #22709. The problem wasn't in that PR, however, it was in the fact that we were relying purely on implicit directory order to register plugins.

This PR allows modules to specify a priority for an entire directory of components - but more importantly, it defaults the behaviour of addComponentsDir to be the same as addComponent - namely, to allow overriding.

The effect of this PR does not change behaviour; it only suppresses logs when overriding a lower priority component directory, to keep this within a patch release. We can consider bigger possible changes in the next minor.

πŸ“ Checklist

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

@stackblitz
Copy link

stackblitz bot commented Aug 29, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe changed the title fix(kit): respect priority when registering extra dirs fix(kit): respect priority when registering components dirs Aug 29, 2023
@danielroe danielroe merged commit 6036e9d into main Aug 29, 2023
27 checks passed
@danielroe danielroe deleted the fix/component-dir-priority branch August 29, 2023 22:06
@github-actions github-actions bot mentioned this pull request Aug 29, 2023
imphil added a commit to fossi-foundation/fossi-foundation-web that referenced this pull request Aug 30, 2023
Nuxt Content 2.8 fixes Vue warnings when rendering code (see also
nuxt/content#2111). Update to this
version.

Currently, we're getting warnings in the form of " WARN  [nuxt] Two
component files resolving to the same name ProseP:" for all components
we override. This should be fixed in an upcoming version of nuxt
(nuxt/nuxt#22882).
imphil added a commit to fossi-foundation/fossi-foundation-web that referenced this pull request Sep 5, 2023
Nuxt Content 2.8 fixes Vue warnings when rendering code (see also
nuxt/content#2111). Update to this
version.

Currently, we're getting warnings in the form of " WARN  [nuxt] Two
component files resolving to the same name ProseP:" for all components
we override. This should be fixed in an upcoming version of nuxt
(nuxt/nuxt#22882).
imphil added a commit to fossi-foundation/fossi-foundation-web that referenced this pull request Sep 9, 2023
Nuxt Content 2.8 fixes Vue warnings when rendering code (see also
nuxt/content#2111). Update to this
version.

Currently, we're getting warnings in the form of " WARN  [nuxt] Two
component files resolving to the same name ProseP:" for all components
we override. This should be fixed in an upcoming version of nuxt
(nuxt/nuxt#22882).
imphil added a commit to fossi-foundation/fossi-foundation-web that referenced this pull request Sep 11, 2023
Nuxt Content 2.8 fixes Vue warnings when rendering code (see also
nuxt/content#2111). Update to this
version.

Currently, we're getting warnings in the form of " WARN  [nuxt] Two
component files resolving to the same name ProseP:" for all components
we override. This should be fixed in an upcoming version of nuxt
(nuxt/nuxt#22882).
imphil added a commit to fossi-foundation/fossi-foundation-web that referenced this pull request Sep 13, 2023
Nuxt Content 2.8 fixes Vue warnings when rendering code (see also
nuxt/content#2111). Update to this
version.

Currently, we're getting warnings in the form of " WARN  [nuxt] Two
component files resolving to the same name ProseP:" for all components
we override. This should be fixed in an upcoming version of nuxt
(nuxt/nuxt#22882).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.7: Warning when overriding component, e.g. via/from Layer or Module
2 participants