From ea65383e1666e80ce9f7521b7532362a61b057cf Mon Sep 17 00:00:00 2001 From: Bee <68532117+abeatrix@users.noreply.github.com> Date: Mon, 23 Feb 2026 18:00:09 -0800 Subject: [PATCH] chore: replace baseUrl with explicit relative paths in tsconfig files (#9508) * chore: replace baseUrl with explicit relative paths in tsconfig files Remove `baseUrl: "."` from tsconfig configurations and update all path aliases to use explicit relative paths (e.g., `./src/*` instead of `src/*`). This makes path resolution more explicit and avoids potential ambiguity in module resolution across the main project and webview-ui configurations. * update package-lock.json --- package-lock.json | 19 ++++++++++++++++++- tsconfig.json | 21 ++++++++++----------- webview-ui/tsconfig.app.json | 9 ++++----- webview-ui/tsconfig.json | 1 - 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e6cb91b5a..11f8499283 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1575,6 +1575,7 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -2875,6 +2876,7 @@ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz", "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@grpc/proto-loader": "^0.8.0", "@js-sdsl/ordered-map": "^4.4.2" @@ -3700,6 +3702,7 @@ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=8.0.0" } @@ -7374,6 +7377,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.32.tgz", "integrity": "sha512-Ez8QE4DMfhjjTsES9K2dwfV258qBui7qxUsoaixZDiTzbde4U12e1pXGNu/ECsUIOi5/zoCxAQxIhQnaUQ2VvA==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -7436,6 +7440,7 @@ "integrity": "sha512-KkiJeU6VbYbUOp5ITMIc7kBfqlYkKA5KhEHVrGMmUUMt7NeaZg65ojdPk+FtNrBAOXNVM5QM72jnADjM+XVRAQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -8370,6 +8375,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -9311,6 +9317,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -10687,7 +10694,8 @@ "version": "0.0.1367902", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==", - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "peer": true }, "node_modules/diff": { "version": "5.2.2", @@ -11644,6 +11652,7 @@ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", + "peer": true, "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", @@ -12929,6 +12938,7 @@ "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.7.tgz", "integrity": "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw==", "license": "MIT", + "peer": true, "engines": { "node": ">=16.9.0" } @@ -13197,6 +13207,7 @@ "resolved": "https://registry.npmjs.org/@jrichman/ink/-/ink-6.4.7.tgz", "integrity": "sha512-QHyxhNF5VonF5cRmdAJD/UPucB9nRx3FozWMjQrDGfBxfAL9lpyu72/MlFPgloS1TMTGsOt7YN6dTPPA6mh0Aw==", "license": "MIT", + "peer": true, "dependencies": { "@alcalzone/ansi-tokenize": "^0.2.1", "ansi-escapes": "^7.0.0", @@ -14437,6 +14448,7 @@ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "license": "MIT", + "peer": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -14776,6 +14788,7 @@ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", "license": "MPL-2.0", + "peer": true, "dependencies": { "detect-libc": "^2.0.3" }, @@ -18422,6 +18435,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -21069,6 +21083,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -21380,6 +21395,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -22850,6 +22866,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/tsconfig.json b/tsconfig.json index 9c3eb9f174..070ce01d6a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,37 +23,36 @@ "target": "es2022", "useDefineForClassFields": true, "useUnknownInCatchVariables": false, - "baseUrl": ".", "paths": { "@/*": [ - "src/*" + "./src/*" ], "@api/*": [ - "src/core/api/*" + "./src/core/api/*" ], "@core/*": [ - "src/core/*" + "./src/core/*" ], "@generated/*": [ - "src/generated/*" + "./src/generated/*" ], "@hosts/*": [ - "src/hosts/*" + "./src/hosts/*" ], "@integrations/*": [ - "src/integrations/*" + "./src/integrations/*" ], "@packages/*": [ - "src/packages/*" + "./src/packages/*" ], "@services/*": [ - "src/services/*" + "./src/services/*" ], "@shared/*": [ - "src/shared/*" + "./src/shared/*" ], "@utils/*": [ - "src/utils/*" + "./src/utils/*" ] } }, diff --git a/webview-ui/tsconfig.app.json b/webview-ui/tsconfig.app.json index 58d3cc7f97..be2f61eeb1 100644 --- a/webview-ui/tsconfig.app.json +++ b/webview-ui/tsconfig.app.json @@ -29,22 +29,21 @@ "noUncheckedSideEffectImports": true, /* Aliasing */ - "baseUrl": ".", "paths": { "@/*": [ - "src/*" + "./src/*" ], "@components/*": [ - "src/components/*" + "./src/components/*" ], "@context/*": [ - "src/context/*" + "./src/context/*" ], "@shared/*": [ "../src/shared/*" ], "@utils/*": [ - "src/utils/*" + "./src/utils/*" ] } }, diff --git a/webview-ui/tsconfig.json b/webview-ui/tsconfig.json index eeabc0d3dc..dbd74d2ff4 100644 --- a/webview-ui/tsconfig.json +++ b/webview-ui/tsconfig.json @@ -9,7 +9,6 @@ } ], "compilerOptions": { - "baseUrl": ".", "paths": { "@/*": [ "./src/*"