-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: fix tsconfig monorepo setup (#10028)
Should fix messed up import suggestions and simplifies all tsconfigs through inheritance. One main issue was that packages were inheriting `baseURL: "."` from the root tsconfig. This caused incorrect import suggestions that start with "packages/...". This PR ensures that packages do not inherit this baseURL: "." property, while ensuring the root, non-inherited tsconfig still keeps it to get tests to work (the importMap needs it)
- Loading branch information
Showing
39 changed files
with
183 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */, | ||
"strict": true | ||
}, | ||
"exclude": ["dist", "build", "tests", "test", "node_modules", "eslint.config.js"], | ||
"include": ["src/**/*.ts", "src/**/*.spec.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */ | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }, { "path": "../translations" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
// Make sure typescript knows that this module depends on their references | ||
"composite": true, | ||
/* Do not emit outputs. */ | ||
"noEmit": false, | ||
"emitDeclarationOnly": true, | ||
/* Specify an output folder for all emitted files. */ | ||
"outDir": "./dist", | ||
/* Specify the root folder within your source files. */ | ||
"rootDir": "./src" | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }, { "path": "../translations" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */, | ||
"strict": true | ||
}, | ||
"exclude": ["dist", "node_modules"], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"references": [{ "path": "../payload" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */, | ||
"strict": true | ||
}, | ||
"exclude": ["dist", "node_modules", "src/**/*.spec.ts"], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"references": [{ "path": "../payload" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */ | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */, | ||
"jsx": "react-jsx" | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */, | ||
"jsx": "react-jsx" | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }] // db-mongodb depends on payload | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */ | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"build", | ||
"tests", | ||
"test", | ||
"node_modules", | ||
"eslint.config.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, // Make sure typescript knows that this module depends on their references | ||
"noEmit": false /* Do not emit outputs. */, | ||
"emitDeclarationOnly": true, | ||
"outDir": "./dist" /* Specify an output folder for all emitted files. */, | ||
"rootDir": "./src" /* Specify the root folder within your source files. */ | ||
}, | ||
"exclude": ["dist", "build", "tests", "test", "node_modules", "eslint.config.js"], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"], | ||
"extends": "../../tsconfig.base.json", | ||
"references": [{ "path": "../payload" }] | ||
} |
Oops, something went wrong.