diff --git a/package-lock.json b/package-lock.json index 61cd55dfb9..cd6157016f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -113,7 +113,7 @@ "storybook": "7.6.20", "ts-mocha": "10.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "typescript-eslint": "8.7.0", "vite-tsconfig-paths": "5.0.1", "vitest": "2.0.5", @@ -45136,9 +45136,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -49550,7 +49550,7 @@ "@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/tsconfig": "3.5.2", "@docusaurus/types": "3.5.2", - "typescript": "5.5.4" + "typescript": "5.6.2" }, "engines": { "node": "22.9.0" diff --git a/package.json b/package.json index ca8794d195..657e52a641 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "storybook": "7.6.20", "ts-mocha": "10.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "typescript-eslint": "8.7.0", "vite-tsconfig-paths": "5.0.1", "vitest": "2.0.5", diff --git a/packages/web-docs/package.json b/packages/web-docs/package.json index 8e947a0122..8686de0ecb 100644 --- a/packages/web-docs/package.json +++ b/packages/web-docs/package.json @@ -24,7 +24,7 @@ "@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/tsconfig": "3.5.2", "@docusaurus/types": "3.5.2", - "typescript": "5.5.4" + "typescript": "5.6.2" }, "browserslist": { "production": [ diff --git a/packages/web-main/package.json b/packages/web-main/package.json index 105ec1069f..2fd95e0475 100644 --- a/packages/web-main/package.json +++ b/packages/web-main/package.json @@ -22,7 +22,7 @@ }, "scripts": { "start:dev": "vite dev --port 13001 --host 0.0.0.0", - "build": "NODE_OPTIONS=--max-old-space-size=8195 vite build && tsc --noemit", + "build": "NODE_OPTIONS=--max-old-space-size=12195 vite build && tsc --noemit", "test": "npm run test:unit", "test:unit": "CI=true vitest", "test:watch": "vitest --watch" diff --git a/packages/web-main/src/router.tsx b/packages/web-main/src/router.tsx index 913229bf4d..b4304fb18c 100644 --- a/packages/web-main/src/router.tsx +++ b/packages/web-main/src/router.tsx @@ -1,6 +1,6 @@ import { queryClient } from './queryClient'; import { routeTree } from './routeTree.gen'; -import { createRouter } from '@tanstack/react-router'; +import { createRouter, Router } from '@tanstack/react-router'; import { QueryClient } from '@tanstack/react-query'; import { DefaultErrorComponent } from 'components/ErrorComponent'; import { IAuthContext } from 'hooks/useAuth'; @@ -11,7 +11,7 @@ export interface RouterContext { auth: IAuthContext; } -export const router = createRouter({ +export const router: Router = createRouter({ routeTree, context: { auth: { diff --git a/scripts/dev-init.sh b/scripts/dev-init.sh index e10ad935a4..9ba49174f0 100755 --- a/scripts/dev-init.sh +++ b/scripts/dev-init.sh @@ -42,7 +42,7 @@ npm run-script -w packages/lib-function-helpers build npm run-script -w packages/test build -npx ts-node scripts/getMonacoCustomTypes.ts +node scripts/getMonacoCustomTypes.mjs # npm run-script -w packages/app-api build # npm run-script -w packages/app-agent build diff --git a/scripts/getMonacoCustomTypes.ts b/scripts/getMonacoCustomTypes.mjs similarity index 91% rename from scripts/getMonacoCustomTypes.ts rename to scripts/getMonacoCustomTypes.mjs index f0e417e329..54418aac3d 100644 --- a/scripts/getMonacoCustomTypes.ts +++ b/scripts/getMonacoCustomTypes.mjs @@ -4,11 +4,14 @@ import fs from 'fs-extra'; import path from 'path'; -async function getDts({ nodeModulesPath, packages }: { nodeModulesPath: string; packages: string[] }) { - const typings: Record = {}; - const parsedPackages: Record = {}; +import * as url from 'url'; +const __dirname = url.fileURLToPath(new url.URL('.', import.meta.url)); - async function getTypingsForPackages(packages: string[] = []) { +async function getDts({ nodeModulesPath, packages }) { + const typings = {}; + const parsedPackages = {}; + + async function getTypingsForPackages(packages = []) { for (const packageName of packages) { console.log(`Getting typings for package: ${packageName}`); if (!parsedPackages[packageName]) { @@ -35,7 +38,7 @@ async function getDts({ nodeModulesPath, packages }: { nodeModulesPath: string; } } - async function getTypingsInDir(path: string) { + async function getTypingsInDir(path) { const dts = await fs.readdir(`${nodeModulesPath}/${path}`); for (const fileName of dts) { if (fileName.endsWith('.d.ts')) {