-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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(nuxt): augment @vue/runtime-core
and @vue/runtime-dom
#28446
Conversation
|
In the long run, it will be easier for library maintainers if they can just I don't know if this also affects end users: does their code break if they use the currently documented solution of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it local in VSCode and in Stackblitz and it seams to work for now.
Found this because of #28373. I see this is merged into main, great to see a solution has been found, thanks! When something is merged into main, does that mean this is being released with the next release, so 3.12.5 / 3.13.0? I don't know about the branching/versioning strategy, so probably asking a stupid question here 😇 |
Daniel confirmed on Discord it would be coming in 3.x |
Yes, it'll be part of the next release. You can also use the Nightly Release Channel to have the fix included right now. |
I've just tested this with the Nightly Release Channel ( |
@tjbp would you provide a reproduction? This can also be caused by other libraries. |
@danielroe I've been trying to but have failed - so it's probably as you say. Sorry don't want to derail a closed PR but would I probably be looking for other libraries that also augment Vue's types in a similar way? (Ed: And thanks!) |
Exactly! I've raised a handful of PRs (all linked to #28542) that swap out You can try running this as a debug step:
|
…#28446 and nuxt/nuxt#28542 @ fe $ composer update @ be
…t/nuxt#28446 * fix class `ms-1` only occurs on not-2th username @ `<PostBadgeThreadAuthorAndLatestReplier>` - prop `expandRowByClick` of `<ATable>` @ <PostRendererTable>` * widden the type of param `name` of `routeNameWithCursor()` and guard it against `assertRouteNameIsStr()` to be like `routeNameWithoutCursor()` * only return the modified route name and param `cursor` without any parts like `query` or other params from param `route` @ `getNextCursorRoute()` @ router.ts * fix regression of 0917db2 as `defineOgImageComponent()` now seem being able to `unref()` internally: nuxt-modules/og-image#190 @ post/seo/index.ts @ utils @ fe
Since nuxt/nuxt#26541 multiple modules need to be augmented for type checking to continue working as expected.
🔗 Linked issue
resolves #28373, resolves #28440
📚 Description
Currently we need to augment
vue
,@vue/runtime-dom
and@vue/runtime-core
- or it will be possible that a library which augments only one of these will 'break' type augmentation.However, it might be we have an opportunity across the ecosystem to migrate to augmenting only one of these (ideally just
vue
: https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties). Removing these duplicate augmentations would also fix the issue in a minimal install of Nuxt but likely needs to be updated in other libraries/projects.cc: @johnsoncodehk, @posva