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

418 update to typescript 5 & update @vue/tsconfig #435

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 17 additions & 26 deletions caster-editor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions caster-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.2.6",
"@vue/tsconfig": "^0.1.3",
"@vue/tsconfig": "^0.4.0",
"cypress": "^12.5.1",
"eslint": "^8.41.0",
"eslint-plugin-vue": "^9.13.0",
Expand All @@ -60,7 +60,7 @@
"prettier": "^2.8.7",
"sass": "^1.62.1",
"sass-loader": "^13.2.0",
"typescript": "~4.7.4",
"typescript": "^5.0.4",
"vite": "^4.0.0",
"vitest": "^0.30.1",
"vue-tsc": "^1.6.5"
Expand Down
3 changes: 2 additions & 1 deletion caster-editor/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "assets/**/**/*"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"moduleResolution": "node",
"composite": true,
"baseUrl": ".",
"paths": {
Expand Down
3 changes: 2 additions & 1 deletion caster-editor/tsconfig.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"compilerOptions": {
"moduleResolution": "node",
"composite": true,
"types": ["node", "vite/client"]
}
Expand Down
1 change: 1 addition & 0 deletions caster-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"compilerOptions.moduleResolution": "node",
"files": [],
"references": [
{
Expand Down
1 change: 1 addition & 0 deletions caster-editor/tsconfig.vitest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "./tsconfig.app.json",
"exclude": [],
"compilerOptions": {
"moduleResolution": "node",
"composite": true,
"lib": [],
"types": ["node", "jsdom", "vite/client"]
Expand Down
28 changes: 10 additions & 18 deletions caster-front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions caster-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.1.3",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.41.0",
"eslint-plugin-vue": "^9.13.0",
"jsdom": "^20.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"start-server-and-test": "^2.0.0",
"typescript": "~4.7.4",
"typescript": "^5.0.4",
"vite": "^4.0.0",
"vitest": "^0.31.1",
"vue-tsc": "^1.2.0"
Expand Down
3 changes: 2 additions & 1 deletion caster-front/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"moduleResolution": "node",
"composite": true,
"baseUrl": ".",
"paths": {
Expand Down
3 changes: 2 additions & 1 deletion caster-front/tsconfig.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "playwright.config.*"],
"compilerOptions": {
"moduleResolution": "node",
"composite": true,
"types": ["node"]
}
Expand Down
1 change: 1 addition & 0 deletions caster-front/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"compilerOptions.moduleResolution": "node",
"files": [],
"references": [
{
Expand Down
1 change: 1 addition & 0 deletions caster-front/tsconfig.vitest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "./tsconfig.app.json",
"exclude": [],
"compilerOptions": {
"moduleResolution": "node",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citing https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler

If you are using a modern bundler like Vite, esbuild, swc, Webpack, Parcel, and others that implement a hybrid lookup strategy, the new bundler option should be a good fit for you.

As we are using Vite we should maybe use bundler? :) But I don't understand too much of it I must admit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just readt the referenced issue - this seems a bug in ElementPlus, so maybe block the upgrade to TS5 until they have EP fixed their bug for TS5? Or is it necessary to upgrade to TS5? Switching to node resolution seems like a hack to me if TS advises to use bundler, especially since node seems somehow deprecated in favour of nodenext?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put it on hold then

"composite": true,
"lib": [],
"types": ["node", "jsdom"]
Expand Down