-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: supported type of vue@2.7+ #28818
Conversation
|
@baboon-king Looks like there's an error being thrown in our build job. |
All right. Let's me look look! |
After my examination. TBH. So. I need more time to try and fix it. |
@jennifer-shehane Hi! In a nutshell, this is because rollup-plugin-dts has
|
@baboon-king I don't recall the context on that one. |
it's Ok!. |
The branch has been rebase , it's clean. |
5be098a
to
a959256
Compare
npm/vue2/rollup.config.mjs
Outdated
@@ -3,6 +3,9 @@ import json from '@rollup/plugin-json' | |||
import replace from '@rollup/plugin-replace' | |||
|
|||
const config = { | |||
dtsOptions: { | |||
respectExternal: false |
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.
was the issue that were were rolling up the vue .d.ts
files from 2.6.12
and that was causing issues?
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.
No, the issue is not related to rolling up the Vue .d.ts files from 2.6.12. This problem occurs in versions "2.7+" instead.
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.
it sounds like we were bundling the declaration types previously which sounded like it caused a collision. Would this change use the declaration files for whatever version of vue2 is installed?
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.
This won't affect Vue 2. In most cases, this option (respectExternal) doesn't need to be enabled, at least not for Vue as Vue itself already includes its own types. The documentation of rollup-plugin-dts also specifies that this option is disabled by default.
The main issue is that after upgrading to Vue 2.7+, the respectExternal option of rollup-plugin-dts was causing the npm/vue2 build task to fail. That's why I disabled this option for npm/vue2.
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.
@baboon-king can you help me reproduce the type error you were seeing in vue 2.7.16
? I created a reproduction repository here but I can't seem to produce a type error under test. Is there something I am missing or forgetting to do here?
@AtofStryker see here. I created a reproduction case here.
For vscode
|
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.
fce145c
to
fb32750
Compare
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.
right!MVP
@AtofStryker
I think it's great, but do I need to review your changes?
@baboon-king currently these are just suggestions in the review, which you should be able to apply and test out! |
Ok, I see. |
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.
This seems correct based on /~https://github.com/vuejs/vue/blob/main/CHANGELOG.md#typescript-changes. Though it does feel weird that v3
types would live inside an installed version of vue@2
. Tested and things seem appropriate on my end
b7d8992
to
8675d4c
Compare
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
Add support for vue@2.7+ types.
Steps to test
none
How has the user experience changed?
Better type support in Vue@2.7
PR Tasks
cypress-documentation
?type definitions
?