diff --git a/src/common/REARCHITECTURE.md b/src/common/REARCHITECTURE.md index 1c008add4..c53cefe44 100644 --- a/src/common/REARCHITECTURE.md +++ b/src/common/REARCHITECTURE.md @@ -55,7 +55,6 @@ flowchart BT ## TypeScript projects - **`common/tsconfig.json`** — solution root; references each layer project (no sources). -- **`common/tsconfig.compiler.json`** — shared `lib`, `paths`, and `types` for layer projects. -- **`common//tsconfig.json`** — composite project with `references` matching the dependency graph above. Test files (`**/*.test.ts`) are excluded from composite builds; unit tests compile via esbuild. +- **`common//tsconfig.json`** — self-contained composite project (`lib`, `paths`, `types`, `references`, `outDir`). Test files (`**/*.test.ts`) are excluded from composite builds; unit tests compile via esbuild. Buffer-layer code depends on `buffer/BufferService`, `buffer/BufferOptions`, and `buffer/BufferLog` instead of `services` so the `buffer` project does not reference `services`. diff --git a/src/common/base/tsconfig.json b/src/common/base/tsconfig.json index c1b9a7e80..ba2c5c6df 100644 --- a/src/common/base/tsconfig.json +++ b/src/common/base/tsconfig.json @@ -1,9 +1,30 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["./*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/base", "rootDir": "." }, diff --git a/src/common/buffer/tsconfig.json b/src/common/buffer/tsconfig.json index b70446d14..447680400 100644 --- a/src/common/buffer/tsconfig.json +++ b/src/common/buffer/tsconfig.json @@ -1,9 +1,30 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["./*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/buffer", "rootDir": "." }, @@ -11,18 +32,12 @@ "./**/*", "../../../typings/xterm.d.ts" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../encoding" - }, - { - "path": "../data" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" } ] } diff --git a/src/common/data/tsconfig.json b/src/common/data/tsconfig.json index 7fc7b11a3..c2e859649 100644 --- a/src/common/data/tsconfig.json +++ b/src/common/data/tsconfig.json @@ -1,21 +1,40 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["./*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/data", "rootDir": "." }, "include": [ "./**/*" ], - "references": [ - { - "path": "../base" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" } ] } diff --git a/src/common/encoding/tsconfig.json b/src/common/encoding/tsconfig.json index 5e92f01fd..09a0e059f 100644 --- a/src/common/encoding/tsconfig.json +++ b/src/common/encoding/tsconfig.json @@ -1,21 +1,40 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["./*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/encoding", "rootDir": "." }, "include": [ "./**/*" ], - "references": [ - { - "path": "../base" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" } ] } diff --git a/src/common/input/tsconfig.json b/src/common/input/tsconfig.json index fe9f7d0f6..d20c7e1a7 100644 --- a/src/common/input/tsconfig.json +++ b/src/common/input/tsconfig.json @@ -1,30 +1,44 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["./*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/input", "rootDir": "." }, "include": [ "./**/*" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../data" - }, - { - "path": "../encoding" - }, - { - "path": "../parser" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" }, + { "path": "../buffer" }, + { "path": "../parser" } ] } diff --git a/src/common/parser/tsconfig.json b/src/common/parser/tsconfig.json index ce883e6ab..cd16ee7fe 100644 --- a/src/common/parser/tsconfig.json +++ b/src/common/parser/tsconfig.json @@ -1,24 +1,43 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["./*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/parser", "rootDir": "." }, "include": [ "./**/*" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../buffer" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" }, + { "path": "../buffer" } ] } diff --git a/src/common/public/tsconfig.json b/src/common/public/tsconfig.json index 6ed803f4c..2614ecafd 100644 --- a/src/common/public/tsconfig.json +++ b/src/common/public/tsconfig.json @@ -1,9 +1,30 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["./*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/public", "rootDir": "." }, @@ -11,24 +32,17 @@ "./**/*", "../../../typings/xterm.d.ts" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../buffer" - }, - { - "path": "../parser" - }, - { - "path": "../services" - }, - { - "path": "../terminal" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" }, + { "path": "../buffer" }, + { "path": "../parser" }, + { "path": "../input" }, + { "path": "../services" }, + { "path": "../terminal" } ] } diff --git a/src/common/services/tsconfig.json b/src/common/services/tsconfig.json index 5cefbaea7..6ef9f1e7f 100644 --- a/src/common/services/tsconfig.json +++ b/src/common/services/tsconfig.json @@ -1,9 +1,30 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["./*"], + "common/terminal/*": ["../terminal/*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/services", "rootDir": "." }, @@ -11,27 +32,15 @@ "./**/*", "../../../typings/xterm.d.ts" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../encoding" - }, - { - "path": "../data" - }, - { - "path": "../buffer" - }, - { - "path": "../parser" - }, - { - "path": "../input" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" }, + { "path": "../buffer" }, + { "path": "../parser" }, + { "path": "../input" } ] } diff --git a/src/common/terminal/tsconfig.json b/src/common/terminal/tsconfig.json index 0892376b4..598b4c8ad 100644 --- a/src/common/terminal/tsconfig.json +++ b/src/common/terminal/tsconfig.json @@ -1,9 +1,30 @@ { - "extends": [ - "../../tsconfig-library-base", - "../tsconfig.compiler.json" - ], + "extends": "../../tsconfig-library-base", "compilerOptions": { + "lib": [ + "es2015", + "es2016.Array.Include", + "es2019.string", + "es2021.weakref", + "dom" + ], + "types": [ + "../../../node_modules/@types/mocha" + ], + "paths": { + "@xterm/xterm": ["../../../typings/xterm.d.ts"], + "common/base/*": ["../base/*"], + "common/encoding/*": ["../encoding/*"], + "common/data/*": ["../data/*"], + "common/buffer/*": ["../buffer/*"], + "common/parser/*": ["../parser/*"], + "common/input/*": ["../input/*"], + "common/services/*": ["../services/*"], + "common/terminal/*": ["./*"], + "common/public/*": ["../public/*"], + "common/*": ["../*"], + "*": ["../../*"] + }, "outDir": "../../../out/common/terminal", "rootDir": "." }, @@ -11,30 +32,16 @@ "./**/*", "../../../typings/xterm.d.ts" ], - "references": [ - { - "path": "../base" - }, - { - "path": "../encoding" - }, - { - "path": "../data" - }, - { - "path": "../buffer" - }, - { - "path": "../parser" - }, - { - "path": "../input" - }, - { - "path": "../services" - } - ], "exclude": [ "**/*.test.ts" + ], + "references": [ + { "path": "../base" }, + { "path": "../encoding" }, + { "path": "../data" }, + { "path": "../buffer" }, + { "path": "../parser" }, + { "path": "../input" }, + { "path": "../services" } ] } diff --git a/src/common/tsconfig.compiler.json b/src/common/tsconfig.compiler.json deleted file mode 100644 index b5b07d372..000000000 --- a/src/common/tsconfig.compiler.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "lib": [ - "es2015", - "es2016.Array.Include", - "es2019.string", - "es2021.weakref", - "dom" - ], - "types": [ - "../../node_modules/@types/mocha" - ], - "paths": { - "@xterm/xterm": ["../../typings/xterm.d.ts"], - "common/base/*": ["./base/*"], - "common/encoding/*": ["./encoding/*"], - "common/data/*": ["./data/*"], - "common/buffer/*": ["./buffer/*"], - "common/parser/*": ["./parser/*"], - "common/input/*": ["./input/*"], - "common/services/*": ["./services/*"], - "common/terminal/*": ["./terminal/*"], - "common/public/*": ["./public/*"], - "common/*": ["./*"], - "*": ["../*"] - } - } -}