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
chore: Cleaned up Vue code #2184
Conversation
🦋 Changeset detectedLatest commit: e7941ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const wrapper = mount(Authenticator); | ||
const wrapper = render(Authenticator, { | ||
global: { | ||
components, |
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.
To get vue to see all the components we have to add them in here. Since we are using unplugin-vue-components
. And it only works with Vite.
packages/vue/tsconfig.json
Outdated
@@ -5,7 +5,7 @@ | |||
"strict": true, | |||
"jsx": "preserve", | |||
"importHelpers": true, | |||
"declaration": true, | |||
"declaration": 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.
Will this prevent type generation?
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.
Our typescript d.ts generation still occurs with our vite typeScript2
plugin settings.
// vite.config.js
tsconfigOverride: {
compilerOptions: {
sourceMap: true,
declaration: true,
declarationMap: true,
},
That way we still have typescript definition files being created.
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.
Nice! Can we leave a comment here for future readers who may not have context in to vite
type generation?
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.
Sure! I'll add a note
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.
Added
@@ -53,15 +53,13 @@ | |||
"eventsource": "~2.0.2", | |||
"fs-extra": "^10.0.0", | |||
"glob-parent": "^6.0.2", | |||
"jest": "^26.6.3", |
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.
We used to need to pin jest, because of an issue with different jest versions breaking different tests being run on our frameworks. However, our tests no longer need this.
And I won't be able to use the latest version of the vue3-jest library unless we update to jest 27.
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.
LGTM
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.
LGTM!
Description of changes
Issue #, if available
#2027
Description of how you validated changes
Checklist
yarn test
passessideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.