mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
- Bump mobile typescript to ^7.0.2 and vitest to 5.0.5; keep TypeScript 6 as typescript-api for the test-support code that walks the AST, mirroring the root. - Patch Expo CLI's tsconfig reader to fall back to typescript-api: TypeScript 7 has no compiler API, and Metro otherwise crashes reading tsconfig paths. - Register mobile/tsconfig.json and mobile/tsconfig.test.json with the root typecheck runner; locally they use incremental tsrs (Bun elsewhere), CI uses Bun like root CI. - Route the tests-typecheck ratchet through the same compiler selection. - Enforce root/mobile parity for typescript, typescript-api and vitest.
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
diff --git a/build/src/utils/tsconfig/evaluateTsConfig.js b/build/src/utils/tsconfig/evaluateTsConfig.js
|
|
index ecf0298a6858541f2e33d0af5293ad61aa80a159..491d9800703dab8e3c197c09bd45af4fd3e13b58 100644
|
|
--- a/build/src/utils/tsconfig/evaluateTsConfig.js
|
|
+++ b/build/src/utils/tsconfig/evaluateTsConfig.js
|
|
@@ -77,11 +77,15 @@ function evaluateTsConfig(ts, tsConfigPath) {
|
|
}
|
|
}
|
|
function importTypeScriptFromProjectOptionally(projectRoot) {
|
|
- const resolvedPath = _resolvefrom().default.silent(projectRoot, 'typescript');
|
|
- if (!resolvedPath) {
|
|
- return null;
|
|
+ // TypeScript 7 ships no compiler API; read tsconfig with the project's TypeScript 6 alias.
|
|
+ for (const name of ['typescript', 'typescript-api']) {
|
|
+ const resolvedPath = _resolvefrom().default.silent(projectRoot, name);
|
|
+ const ts = resolvedPath ? require(resolvedPath) : null;
|
|
+ if (typeof (ts == null ? void 0 : ts.readConfigFile) === 'function') {
|
|
+ return ts;
|
|
+ }
|
|
}
|
|
- return require(resolvedPath);
|
|
+ return null;
|
|
}
|
|
|
|
//# sourceMappingURL=evaluateTsConfig.js.map
|