From 7fe89ecf1c354912f701dadbb7dd8abfcbc45035 Mon Sep 17 00:00:00 2001 From: Oleg Shibaev Date: Mon, 5 Aug 2024 01:59:43 +0400 Subject: [PATCH 1/3] feat(typescript): use project references in vitest and cypress tsconfigs --- .gitignore | 4 ++++ template/tsconfig/base/tsconfig.app.json | 3 +++ template/tsconfig/base/tsconfig.node.json | 4 +++- template/tsconfig/cypress-ct/tsconfig.cypress-ct.json | 10 ++++++---- template/tsconfig/vitest/tsconfig.vitest.json | 9 ++++++++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f7999996c..da4198f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,7 @@ dist # TernJS port file .tern-port + +# IDEs +.vscode +.idea diff --git a/template/tsconfig/base/tsconfig.app.json b/template/tsconfig/base/tsconfig.app.json index e14c754d3..96a1279cb 100644 --- a/template/tsconfig/base/tsconfig.app.json +++ b/template/tsconfig/base/tsconfig.app.json @@ -4,6 +4,9 @@ "exclude": ["src/**/__tests__/*"], "compilerOptions": { "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "./node_modules/.tmp/app", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "baseUrl": ".", diff --git a/template/tsconfig/base/tsconfig.node.json b/template/tsconfig/base/tsconfig.node.json index f09406303..22377cb77 100644 --- a/template/tsconfig/base/tsconfig.node.json +++ b/template/tsconfig/base/tsconfig.node.json @@ -9,7 +9,9 @@ ], "compilerOptions": { "composite": true, - "noEmit": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "./node_modules/.tmp/node", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "module": "ESNext", diff --git a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json index 12833b275..8137b87e9 100644 --- a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +++ b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json @@ -1,15 +1,17 @@ { "extends": "./tsconfig.app.json", "include": [ - "env.d.ts", - "src/**/*", - "src/**/*.vue", + "src/**/__tests__/*", "cypress/support/component.*", "cypress/support/commands.ts" ], "exclude": [], "compilerOptions": { "composite": true, + "outDir": "./node_modules/.tmp/cypress-ct", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.cypress-ct.tsbuildinfo" - } + }, + "references": [ + { "path": "./tsconfig.app.json" } + ] } diff --git a/template/tsconfig/vitest/tsconfig.vitest.json b/template/tsconfig/vitest/tsconfig.vitest.json index 571995d11..6d59214c9 100644 --- a/template/tsconfig/vitest/tsconfig.vitest.json +++ b/template/tsconfig/vitest/tsconfig.vitest.json @@ -1,11 +1,18 @@ { "extends": "./tsconfig.app.json", + "include": [ + "src/**/__tests__/*" + ], "exclude": [], "compilerOptions": { "composite": true, + "outDir": "./node_modules/.tmp/vitest", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo", "lib": [], "types": ["node", "jsdom"] - } + }, + "references": [ + { "path": "./tsconfig.app.json" } + ] } From 86939b8effbb4117c09458c2c92da443786363da Mon Sep 17 00:00:00 2001 From: Oleg Shibaev Date: Mon, 5 Aug 2024 02:01:13 +0400 Subject: [PATCH 2/3] feat(typescript): delete duplicate tsconfig --- index.ts | 3 --- template/tsconfig/nightwatch-ct/tsconfig.app.json | 14 -------------- 2 files changed, 17 deletions(-) delete mode 100644 template/tsconfig/nightwatch-ct/tsconfig.app.json diff --git a/index.ts b/index.ts index f552cfd82..98f4e00f5 100755 --- a/index.ts +++ b/index.ts @@ -445,9 +445,6 @@ async function init() { path: './nightwatch/tsconfig.json' }) } - if (needsNightwatchCT) { - render('tsconfig/nightwatch-ct') - } fs.writeFileSync( path.resolve(root, 'tsconfig.json'), JSON.stringify(rootTsConfig, null, 2) + '\n', diff --git a/template/tsconfig/nightwatch-ct/tsconfig.app.json b/template/tsconfig/nightwatch-ct/tsconfig.app.json deleted file mode 100644 index e14c754d3..000000000 --- a/template/tsconfig/nightwatch-ct/tsconfig.app.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"] - } - } -} From 965871616e323502305c59c8000b0e624dd54197 Mon Sep 17 00:00:00 2001 From: Oleg Shibaev Date: Tue, 6 Aug 2024 03:45:33 +0400 Subject: [PATCH 3/3] feat(typescript): remove redundant tsBuildInfoFile, don't inherit tsconfig.app.json --- template/tsconfig/base/tsconfig.app.json | 2 -- template/tsconfig/base/tsconfig.node.json | 2 -- .../tsconfig/cypress-ct/tsconfig.cypress-ct.json | 10 +++++++--- template/tsconfig/vitest/tsconfig.vitest.json | 15 ++++++++------- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/template/tsconfig/base/tsconfig.app.json b/template/tsconfig/base/tsconfig.app.json index 96a1279cb..6b3d763f4 100644 --- a/template/tsconfig/base/tsconfig.app.json +++ b/template/tsconfig/base/tsconfig.app.json @@ -7,8 +7,6 @@ "noEmit": false, "emitDeclarationOnly": true, "outDir": "./node_modules/.tmp/app", - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - "baseUrl": ".", "paths": { "@/*": ["./src/*"] diff --git a/template/tsconfig/base/tsconfig.node.json b/template/tsconfig/base/tsconfig.node.json index 22377cb77..0ff9dcfc4 100644 --- a/template/tsconfig/base/tsconfig.node.json +++ b/template/tsconfig/base/tsconfig.node.json @@ -12,8 +12,6 @@ "noEmit": false, "emitDeclarationOnly": true, "outDir": "./node_modules/.tmp/node", - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", - "module": "ESNext", "moduleResolution": "Bundler", "types": ["node"] diff --git a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json index 8137b87e9..4002dc7d4 100644 --- a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +++ b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json @@ -1,15 +1,19 @@ { - "extends": "./tsconfig.app.json", + "extends": "@vue/tsconfig/tsconfig.dom.json", "include": [ "src/**/__tests__/*", "cypress/support/component.*", "cypress/support/commands.ts" ], - "exclude": [], "compilerOptions": { "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, "outDir": "./node_modules/.tmp/cypress-ct", - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.cypress-ct.tsbuildinfo" + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } }, "references": [ { "path": "./tsconfig.app.json" } diff --git a/template/tsconfig/vitest/tsconfig.vitest.json b/template/tsconfig/vitest/tsconfig.vitest.json index 6d59214c9..bbf047c24 100644 --- a/template/tsconfig/vitest/tsconfig.vitest.json +++ b/template/tsconfig/vitest/tsconfig.vitest.json @@ -1,14 +1,15 @@ { - "extends": "./tsconfig.app.json", - "include": [ - "src/**/__tests__/*" - ], - "exclude": [], + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": ["src/**/__tests__/*"], "compilerOptions": { "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, "outDir": "./node_modules/.tmp/vitest", - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo", - + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + }, "lib": [], "types": ["node", "jsdom"] }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy