-
Notifications
You must be signed in to change notification settings - Fork 191
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: fix the ts version selected by the user #305
Conversation
@huangmingfu is attempting to deploy a commit to the vuejs Team on Vercel. A member of the Team first needs to authorize it. |
06a2e36
to
41d770d
Compare
commit: |
src/store.ts
Outdated
} else if (filename === '_tsVersion') { | ||
typescriptVersion.value = saved[filename] | ||
} | ||
else { |
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.
Hope to fix the code format npm run format
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.
ok, I've already changed it
src/Repl.vue
Outdated
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, | ||
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
font-family: | ||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, |
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 may be due to version differences.
Please confirm whether to use pnpm@9 install.
Or undo this irrelevant modification. Thanks
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.
ok, I've already changed it
src/store.ts
Outdated
@@ -270,6 +270,7 @@ export function useStore( | |||
} | |||
} | |||
if (vueVersion.value) files._version = vueVersion.value | |||
if (typescriptVersion.value) files._tsVersion = typescriptVersion.value |
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 wonder if typescriptVersion === latest
can be ignored ?
By default, all data may have a _tsVersion
file.
But the default vueVersion
is null.
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.
src/store.ts
Outdated
@@ -431,7 +434,7 @@ export type StoreState = ToRefs<{ | |||
|
|||
// volar-related | |||
locale: string | undefined | |||
typescriptVersion: string | |||
typescriptVersion: string | null |
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.
Type 'string | null' is not assignable to type 'string'.
https://github.com/vuejs/repl/blob/main/src/monaco/env.ts#L140
https://github.com/vuejs/repl/blob/main/src/monaco/env.ts#L77
Perhaps the impact of this change would be minimal.
// L273
if (typescriptVersion.value !== 'latest' || files._tsVersion) {
files._tsVersion = typescriptVersion.value
}
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.
Forgot to run the typecheck command to check. Thank you for your suggestion. I have already modified it.❤️
我在
Vue SFC Playground
发现了一个问题,当我选择了 ts 版本号和 vue 版本号,分享链接出去的时候:接着通过分享链接打开后,vue 版本号可以正常的选择用户保存的设置,但是 ts 的始终都是
latest
:test/main.ts
测试过,测试代码如下,辛苦审核~