From 0c026d929d9f68840db20d48f28735538124a71f Mon Sep 17 00:00:00 2001 From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:17:51 +0100 Subject: [PATCH 1/4] chore: generate a tsconfig paths map to the internal declarations Add scripts/internal-types-config.mjs, which resolves every `exports` entry of every package the way TypeScript does and writes packages/tsconfig.paths.json, a `paths` map from each `@tanstack/*` specifier to the matching declaration in that package's `dist-ts`. The targets have no `.d.ts` extension, so runtime resolvers that read tsconfig `paths` (Vite's `resolve.tsconfigPaths`, jiti) find nothing there and fall back to the published `exports`. packages/tsconfig.base.json extends the root tsconfig and the map. The root tsconfig stays as it is, so benchmarks, examples and e2e projects keep resolving to `dist`. The script also writes each package's tsconfig.internal.json and the `references` lists, and checks that no package resolves its own specifiers anywhere but its source. The root `test:unit` target runs its test, which fails when a generated file is stale. Ignore `dist-ts` in git, Prettier and ESLint. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 + .prettierignore | 1 + eslint.config.js | 5 + package.json | 10 +- packages/tsconfig.base.json | 3 + packages/tsconfig.paths.json | 237 +++++++++++++++ scripts/internal-types-config.mjs | 405 +++++++++++++++++++++++++ scripts/internal-types-config.test.mjs | 149 +++++++++ 8 files changed, 809 insertions(+), 2 deletions(-) create mode 100644 packages/tsconfig.base.json create mode 100644 packages/tsconfig.paths.json create mode 100644 scripts/internal-types-config.mjs create mode 100644 scripts/internal-types-config.test.mjs diff --git a/.gitignore b/.gitignore index 70028b28607..9baca38126c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ types build */build dist +dist-ts .output lib es diff --git a/.prettierignore b/.prettierignore index de501452adc..6218cbf4dce 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,6 +4,7 @@ **/build **/coverage **/dist +**/dist-ts pnpm-lock.yaml **/snapshots **/.vercel diff --git a/eslint.config.js b/eslint.config.js index f58cc3fd103..3a00479ad50 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,6 +7,11 @@ import unusedImports from 'eslint-plugin-unused-imports' /** @type {import('eslint').Linter.Config[]} */ export default [ ...tanstackConfig, + { + // The internal declarations written by each package's `compile` target. + name: 'tanstack/internal-declarations', + ignores: ['**/dist-ts/**'], + }, { name: 'tanstack/temp', rules: { diff --git a/package.json b/package.json index 3447487fca9..228cc63cc71 100644 --- a/package.json +++ b/package.json @@ -63,15 +63,21 @@ ], "targets": { "test:unit": { - "command": "node --test scripts/check-published-types.test.mjs", + "command": "node --test scripts/check-published-types.test.mjs scripts/internal-types-config.test.mjs", "dependsOn": [], "inputs": [ "{workspaceRoot}/scripts/check-published-types.mjs", "{workspaceRoot}/scripts/check-published-types.test.mjs", + "{workspaceRoot}/scripts/internal-types-config.mjs", + "{workspaceRoot}/scripts/internal-types-config.test.mjs", + "{workspaceRoot}/tsconfig.json", + "{workspaceRoot}/prettier.config.js", + "{workspaceRoot}/packages/**/*", { "externalDependencies": [ "typescript", - "@types/node" + "@types/node", + "prettier" ] }, { diff --git a/packages/tsconfig.base.json b/packages/tsconfig.base.json new file mode 100644 index 00000000000..11d637ea103 --- /dev/null +++ b/packages/tsconfig.base.json @@ -0,0 +1,3 @@ +{ + "extends": ["../tsconfig.json", "./tsconfig.paths.json"] +} diff --git a/packages/tsconfig.paths.json b/packages/tsconfig.paths.json new file mode 100644 index 00000000000..b0d9f0fcd16 --- /dev/null +++ b/packages/tsconfig.paths.json @@ -0,0 +1,237 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +// The targets have no extension, so that only TypeScript resolves them. +{ + "compilerOptions": { + "paths": { + "@tanstack/arktype-adapter": ["./arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "./eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["./eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["./history/dist-ts/index"], + "@tanstack/react-router": ["./react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "./react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "./react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "./react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "./react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["./react-start/dist-ts/index"], + "@tanstack/react-start/client": ["./react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["./react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["./react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["./react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["./react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["./react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "./react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "./react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "./react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["./react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "./react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "./react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "./react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "./react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "./react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "./react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["./react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "./react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "./react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["./react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "./react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "./react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "./react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "./react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "./react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "./react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["./react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["./router-cli/dist-ts/index"], + "@tanstack/router-core": ["./router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["./router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["./router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "./router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "./router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["./router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "./router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["./router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["./router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["./router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["./router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["./router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["./router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["./router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "./router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["./router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["./router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["./solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "./solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "./solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "./solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "./solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["./solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["./solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["./solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["./solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["./solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["./solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["./solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "./solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "./solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "./solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "./solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "./solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["./solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "./solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "./solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["./solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["./start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "./start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "./start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "./start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "./start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "./start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["./start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["./start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "./start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "./start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "./start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "./start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["./start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "./start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "./start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "./start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "./start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "./start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "./start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "./start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["./valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["./virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["./vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["./vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["./vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["./vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "./vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["./vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["./vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["./vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["./vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["./vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["./vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["./vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "./vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "./vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["./vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["./vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["./vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["./vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["./zod-adapter/dist-ts/index"] + } + } +} diff --git a/scripts/internal-types-config.mjs b/scripts/internal-types-config.mjs new file mode 100644 index 00000000000..00fa7c784bd --- /dev/null +++ b/scripts/internal-types-config.mjs @@ -0,0 +1,405 @@ +// Generates the tsconfig settings that let workspace packages type-check +// against each other's internal declarations, the set that `compile` writes to +// `dist-ts` with `stripInternal: false`: +// +// - `packages/tsconfig.paths.json`: a `paths` entry for every entry point of +// every package, pointing at its declaration file in `dist-ts`. +// +// The targets leave out the `.d.ts` extension. TypeScript adds it when it +// looks a target up. Runtime resolvers that also read tsconfig `paths`, such +// as Vite's `resolve.tsconfigPaths` and jiti, look for JavaScript and +// TypeScript sources only, find nothing in `dist-ts`, and fall back to the +// package's `exports`. With the extension they would load the declaration +// file as a module. The map changes types only. +// - `packages/*/tsconfig.internal.json`: the composite project that `compile` +// builds, with `references` to each workspace dependency. +// - `references` in `packages/*/tsconfig.json`, since `references` is not +// inherited through `extends`. +// - The generated part of `paths` in every package tsconfig that defines its +// own `paths`, since `paths` does not merge across `extends`. Entries for the +// package's own specifiers are written by hand and kept. +// +// Run it after changing a package's `exports` or workspace dependencies: +// node scripts/internal-types-config.mjs +// `--check` fails when a generated file is out of date instead of writing it. + +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import * as prettier from 'prettier' +import ts from 'typescript' + +const defaultRoot = path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + '..', +) + +const header = 'Generated by scripts/internal-types-config.mjs. Do not edit.' +const sourceExtensions = ['.ts', '.tsx', '.mts', '.cts'] + +export async function generate(root = defaultRoot) { + const packages = readPackages(root) + const files = new Map() + + const paths = {} + for (const pkg of packages) { + for (const [specifier, target] of pkg.entries) { + paths[specifier] = [relativePath(pkg.root, target)] + } + } + files.set( + path.join(root, 'packages', 'tsconfig.paths.json'), + `// ${header}\n// The targets have no extension, so that only TypeScript resolves them.\n${toJson({ compilerOptions: { paths } })}`, + ) + + for (const pkg of packages) { + const references = pkg.dependencies.map((dep) => ({ + path: relativePath(pkg.dir, path.join(dep.dir, 'tsconfig.internal.json')), + })) + + files.set( + path.join(pkg.dir, 'tsconfig.internal.json'), + `// ${header}\n${toJson({ + extends: fs.existsSync(path.join(pkg.dir, 'tsconfig.build.json')) + ? './tsconfig.build.json' + : './tsconfig.json', + compilerOptions: { + composite: true, + declaration: true, + emitDeclarationOnly: true, + noEmit: false, + stripInternal: false, + rootDir: './src', + outDir: './dist-ts', + tsBuildInfoFile: './dist-ts/tsconfig.internal.tsbuildinfo', + }, + include: ['src'], + ...(references.length > 0 ? { references } : {}), + })}`, + ) + + for (const configPath of pkg.configs) { + const config = readJson(configPath) + let changed = false + if (path.basename(configPath) === 'tsconfig.json') { + if (references.length > 0) { + config.references = references + } else { + delete config.references + } + changed = true + } + const ownPaths = config.compilerOptions?.paths + if (ownPaths) { + // A package's own specifiers keep their hand-written entries. The + // map's entries for the package itself would point it at its own + // compile output, so they are left out. + const merged = Object.fromEntries( + Object.entries(ownPaths).filter(([key]) => isOwnSpecifier(pkg, key)), + ) + for (const other of packages) { + if (other === pkg) { + continue + } + for (const [specifier, target] of other.entries) { + merged[specifier] = [relativePath(path.dirname(configPath), target)] + } + } + config.compilerOptions.paths = merged + changed = true + } + if (changed) { + files.set(configPath, toJson(config)) + } + } + } + + const prettierConfig = await prettier.resolveConfig( + path.join(root, 'package.json'), + ) + for (const [file, content] of files) { + files.set( + file, + await prettier.format(content, { ...prettierConfig, filepath: file }), + ) + } + return files +} + +// Checks that no tsconfig in a package resolves the package's own specifiers +// anywhere but its source. Through the shared map they would reach the +// package's own `dist-ts`, and through `exports` its own `dist`, which a type +// check must not depend on. Map them to source in the package's tsconfig. +export function findSelfImportProblems(root = defaultRoot) { + const problems = new Set() + for (const pkg of readPackages(root)) { + const configs = [ + ...pkg.configs, + path.join(pkg.dir, 'tsconfig.internal.json'), + ] + for (const configPath of configs) { + if (!fs.existsSync(configPath)) { + continue + } + const parsed = ts.getParsedCommandLineOfConfigFile( + configPath, + {}, + { ...ts.sys, onUnRecoverableConfigFileDiagnostic: () => {} }, + ) + if (!parsed) { + problems.add(`${relativePath(root, configPath)}: cannot be parsed`) + continue + } + const cache = ts.createModuleResolutionCache( + pkg.dir, + (f) => f, + parsed.options, + ) + for (const file of parsed.fileNames) { + const { importedFiles } = ts.preProcessFile( + fs.readFileSync(file, 'utf8'), + true, + true, + ) + for (const { fileName: specifier } of importedFiles) { + if (!isOwnSpecifier(pkg, specifier)) { + continue + } + const resolved = ts.resolveModuleName( + specifier, + file, + parsed.options, + ts.sys, + cache, + ).resolvedModule?.resolvedFileName + if (!resolved || !isInside(path.join(pkg.dir, 'src'), resolved)) { + problems.add( + `${relativePath(root, file)} imports '${specifier}', which ${relativePath(root, configPath)} resolves to ${resolved ? relativePath(root, resolved) : 'nothing'} instead of the package's source`, + ) + } + } + } + } + } + return [...problems] +} + +function readPackages(root) { + const packagesDir = path.join(root, 'packages') + const packages = fs + .readdirSync(packagesDir, { withFileTypes: true }) + .filter( + (entry) => + entry.isDirectory() && + fs.existsSync(path.join(packagesDir, entry.name, 'package.json')), + ) + .map((entry) => { + const dir = path.join(packagesDir, entry.name) + const manifest = readJson(path.join(dir, 'package.json')) + return { dir, root: packagesDir, name: manifest.name, manifest } + }) + .sort((a, b) => a.name.localeCompare(b.name)) + + const byName = new Map(packages.map((pkg) => [pkg.name, pkg])) + const options = resolutionOptions(root) + for (const pkg of packages) { + const { manifest } = pkg + const names = new Set( + [ + manifest.dependencies, + manifest.peerDependencies, + manifest.optionalDependencies, + manifest.devDependencies, + ].flatMap((deps) => Object.keys(deps ?? {})), + ) + pkg.dependencies = [...names] + .filter((name) => byName.has(name) && name !== pkg.name) + .sort() + .map((name) => byName.get(name)) + pkg.entries = resolveEntries(pkg, options) + pkg.configs = fs + .readdirSync(pkg.dir) + .filter( + (file) => + /^tsconfig(\..+)?\.json$/.test(file) && + file !== 'tsconfig.internal.json', + ) + .sort() + .map((file) => path.join(pkg.dir, file)) + } + assertAcyclic(packages) + return packages +} + +// The options every package resolves its dependencies with: the root +// tsconfig, which `packages/tsconfig.base.json` extends, without any `paths`. +function resolutionOptions(root) { + const configPath = path.join(root, 'tsconfig.json') + const { config } = ts.readConfigFile(configPath, ts.sys.readFile) + const { options } = ts.parseJsonConfigFileContent(config, ts.sys, root) + delete options.paths + return options +} + +// Resolves each `exports` subpath the way TypeScript does from a sibling +// package, then swaps the published declaration file for the one `compile` +// writes. The Vite build writes `/esm/.d.ts` for +// `/.ts`, and `dist-ts` mirrors `src`, so +// `dist/esm/.d.ts` becomes `dist-ts/`. +// +// The resolution runs without a build: a published declaration file counts as +// present when its source file exists. +function resolveEntries(pkg, options) { + const entries = [] + const exportsMap = pkg.manifest.exports + if (!exportsMap || typeof exportsMap !== 'object') { + return entries + } + const host = { + ...ts.sys, + fileExists: (file) => { + const relative = path.relative(pkg.dir, file) + if (relative.startsWith(`dist${path.sep}`)) { + return sourceOf(pkg, relative) !== undefined + } + return ts.sys.fileExists(file) + }, + } + for (const subpath of Object.keys(exportsMap)) { + if (subpath.includes('*')) { + throw new Error( + `${pkg.name}: the exports pattern '${subpath}' is not supported`, + ) + } + const specifier = pkg.name + subpath.slice(1) + const resolved = ts.resolveModuleName( + specifier, + path.join(pkg.dir, 'src', '__internal-types-config__.ts'), + options, + host, + ).resolvedModule + if (!resolved) { + throw new Error(`${specifier} does not resolve`) + } + if (!/\.d\.[cm]?ts$/.test(resolved.resolvedFileName)) { + // `./package.json` and other entries that are not declarations. + continue + } + const source = sourceOf( + pkg, + path.relative(pkg.dir, resolved.resolvedFileName), + ) + if (!source) { + throw new Error( + `${specifier} resolves to ${path.relative(pkg.dir, resolved.resolvedFileName)}, which has no source file in src`, + ) + } + entries.push([ + specifier, + path.join(pkg.dir, 'dist-ts', source.replace(/\.[cm]?tsx?$/, '')), + ]) + } + return entries +} + +// `dist/esm/.d.ts` -> `.ts(x)`, relative to `src`. +function sourceOf(pkg, relative) { + const match = /^dist\/(.*?)esm\/(.+)\.d\.ts$/.exec( + relative.split(path.sep).join('/'), + ) + if (!match) { + return undefined + } + const stem = `${match[1]}${match[2]}` + const extension = sourceExtensions.find((ext) => + fs.existsSync(path.join(pkg.dir, 'src', stem + ext)), + ) + return extension ? stem + extension : undefined +} + +function isOwnSpecifier(pkg, specifier) { + return specifier === pkg.name || specifier.startsWith(`${pkg.name}/`) +} + +function assertAcyclic(packages) { + const state = new Map() + const visit = (pkg, trail) => { + if (state.get(pkg) === 'done') { + return + } + if (state.get(pkg) === 'visiting') { + throw new Error( + `Workspace dependency cycle: ${[...trail, pkg].map((p) => p.name).join(' -> ')}`, + ) + } + state.set(pkg, 'visiting') + for (const dep of pkg.dependencies) { + visit(dep, [...trail, pkg]) + } + state.set(pkg, 'done') + } + for (const pkg of packages) { + visit(pkg, []) + } +} + +// Prettier keeps an object on several lines when its first key starts a new +// line, so each reference is joined onto one line first. +function toJson(value) { + return JSON.stringify(value, null, 2).replace( + /\{\n\s*("path": "[^"]*")\n\s*\}/g, + '{ $1 }', + ) +} + +function readJson(file) { + const { config, error } = ts.readConfigFile(file, ts.sys.readFile) + if (error) { + throw new Error( + `${file}: ${ts.flattenDiagnosticMessageText(error.messageText, '\n')}`, + ) + } + return config +} + +function relativePath(from, to) { + const relative = path.relative(from, to).split(path.sep).join('/') + return relative.startsWith('.') ? relative : `./${relative}` +} + +function isInside(dir, file) { + const relative = path.relative(dir, file) + return !relative.startsWith('..') && !path.isAbsolute(relative) +} + +if ( + process.argv[1] && + fs.realpathSync(process.argv[1]) === fileURLToPath(import.meta.url) +) { + const check = process.argv.includes('--check') + const stale = [] + for (const [file, content] of await generate()) { + const current = fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : null + if (current === content) { + continue + } + stale.push(path.relative(defaultRoot, file)) + if (!check) { + fs.writeFileSync(file, content) + } + } + const problems = findSelfImportProblems() + for (const problem of problems) { + console.error(problem) + } + if (check && stale.length > 0) { + console.error( + `Out of date, run node scripts/internal-types-config.mjs:\n ${stale.join('\n ')}`, + ) + } else if (!check) { + console.log(`Wrote ${stale.length} file(s)`) + } + if (problems.length > 0 || (check && stale.length > 0)) { + process.exit(1) + } +} diff --git a/scripts/internal-types-config.test.mjs b/scripts/internal-types-config.test.mjs new file mode 100644 index 00000000000..b5c2dd085e8 --- /dev/null +++ b/scripts/internal-types-config.test.mjs @@ -0,0 +1,149 @@ +import assert from 'node:assert/strict' +import fs from 'node:fs' +import os from 'node:os' +import path from 'node:path' +import test from 'node:test' +import ts from 'typescript' +import { findSelfImportProblems, generate } from './internal-types-config.mjs' + +test('the generated tsconfig files are up to date', async () => { + const stale = [] + for (const [file, content] of await generate()) { + const current = fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : null + if (current !== content) { + stale.push(file) + } + } + assert.deepEqual( + stale, + [], + 'Run `node scripts/internal-types-config.mjs` to regenerate them', + ) +}) + +test('no package resolves its own specifiers outside its source', () => { + assert.deepEqual(findSelfImportProblems(), []) +}) + +const fixture = { + 'tsconfig.json': JSON.stringify({ + compilerOptions: { module: 'ESNext', moduleResolution: 'Bundler' }, + }), + 'packages/tsconfig.base.json': JSON.stringify({ + extends: ['../tsconfig.json', './tsconfig.paths.json'], + }), + 'packages/core/package.json': JSON.stringify({ + name: '@x/core', + exports: { + '.': { + browser: { types: './dist/esm/browser.d.ts' }, + import: { types: './dist/esm/index.d.ts' }, + require: { types: './dist/cjs/index.d.cts' }, + }, + './server-entry': { import: { types: './dist/entry/esm/server.d.ts' } }, + './package.json': './package.json', + }, + }), + 'packages/core/tsconfig.json': JSON.stringify({ + extends: '../tsconfig.base.json', + compilerOptions: { + paths: { + '@x/core/self': ['./src/index.ts'], + '@x/binding': ['./stale.d.ts'], + }, + }, + include: ['src'], + }), + 'packages/core/src/index.ts': "import '@x/core/self'\nexport {}", + 'packages/core/src/browser.ts': "import '@x/core/server-entry'\nexport {}", + 'packages/core/src/entry/server.ts': 'export {}', + 'packages/binding/package.json': JSON.stringify({ + name: '@x/binding', + dependencies: { '@x/core': 'workspace:*', react: '^19' }, + exports: { '.': { import: { types: './dist/esm/index.d.ts' } } }, + }), + 'packages/binding/tsconfig.json': JSON.stringify({ + extends: '../tsconfig.base.json', + include: ['src'], + }), + 'packages/binding/tsconfig.build.json': JSON.stringify({ + extends: './tsconfig.json', + }), + 'packages/binding/src/index.tsx': 'export {}', +} + +function setup() { + const root = fs.mkdtempSync(path.join(os.tmpdir(), 'internal-types-')) + for (const [file, content] of Object.entries(fixture)) { + const full = path.join(root, file) + fs.mkdirSync(path.dirname(full), { recursive: true }) + fs.writeFileSync(full, content) + } + return root +} + +function parse(files, root, file) { + const text = files.get(path.join(root, file)) + assert.ok(text, `${file} is generated`) + return ts.parseConfigFileTextToJson(file, text).config +} + +test('maps each entry point to dist-ts and lists workspace references', async (t) => { + const root = setup() + t.after(() => fs.rmSync(root, { recursive: true, force: true })) + const files = await generate(root) + + // Resolved with the `import` condition, as TypeScript does; the second + // build's `/esm` prefix carries over; `./package.json` is skipped. + assert.deepEqual(parse(files, root, 'packages/tsconfig.paths.json'), { + compilerOptions: { + paths: { + '@x/binding': ['./binding/dist-ts/index'], + '@x/core': ['./core/dist-ts/index'], + '@x/core/server-entry': ['./core/dist-ts/entry/server'], + }, + }, + }) + + const internal = parse(files, root, 'packages/binding/tsconfig.internal.json') + assert.equal(internal.extends, './tsconfig.build.json') + assert.equal(internal.compilerOptions.stripInternal, false) + assert.equal(internal.compilerOptions.outDir, './dist-ts') + assert.deepEqual(internal.references, [ + { path: '../core/tsconfig.internal.json' }, + ]) + const coreInternal = parse( + files, + root, + 'packages/core/tsconfig.internal.json', + ) + assert.equal(coreInternal.extends, './tsconfig.json') + assert.equal(coreInternal.references, undefined) + assert.deepEqual(parse(files, root, 'packages/binding/tsconfig.json'), { + extends: '../tsconfig.base.json', + include: ['src'], + references: [{ path: '../core/tsconfig.internal.json' }], + }) + + // Own entries stay, the map's entries for other packages are rewritten + // relative to the file, and the package's own entries are left out. + assert.deepEqual( + parse(files, root, 'packages/core/tsconfig.json').compilerOptions.paths, + { + '@x/core/self': ['./src/index.ts'], + '@x/binding': ['../binding/dist-ts/index'], + }, + ) +}) + +test('reports a self-import that does not resolve to source', async (t) => { + const root = setup() + t.after(() => fs.rmSync(root, { recursive: true, force: true })) + for (const [file, content] of await generate(root)) { + fs.writeFileSync(file, content) + } + assert.deepEqual(findSelfImportProblems(root), [ + "./packages/core/src/browser.ts imports '@x/core/server-entry', which ./packages/core/tsconfig.json resolves to nothing instead of the package's source", + "./packages/core/src/browser.ts imports '@x/core/server-entry', which ./packages/core/tsconfig.internal.json resolves to nothing instead of the package's source", + ]) +}) From 941c66af91439ff4a7e37540960ae24dfbcf59d9 Mon Sep 17 00:00:00 2001 From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:18:02 +0100 Subject: [PATCH 2/4] chore(packages): add composite projects that write dist-ts Each package gets a generated tsconfig.internal.json: composite, declarations only, `stripInternal: false`, `src` to `dist-ts`, with `references` to the same file in each workspace dependency. A `compile` script runs it with TypeScript 6, the version the Vite build's declaration plugin emits with. `clean` also removes `dist-ts`. Every package tsconfig now extends packages/tsconfig.base.json, so type checks, the Vite build's declaration step, ESLint and the Vitest type check read the dependencies' internal declarations. The published `dist` is byte-identical. tsconfig.json lists the workspace dependencies under `references` for editors. The tsconfigs that define their own `paths` carry the generated map next to their hand-written entries. react-start, solid-start and vue-start map their `/client` and `/server` self-imports in src/default-entry to source, which they read from their own `dist` before. solid-router-devtools loses its `@tanstack/router-devtools-core` entry: it pointed at a folder that does not exist, so TypeScript fell back to the published declarations. Co-Authored-By: Claude Opus 5.5 --- packages/arktype-adapter/package.json | 3 +- .../arktype-adapter/tsconfig.internal.json | 16 ++ packages/arktype-adapter/tsconfig.json | 5 +- packages/eslint-plugin-router/package.json | 3 +- .../tsconfig.internal.json | 15 ++ packages/eslint-plugin-router/tsconfig.json | 2 +- packages/eslint-plugin-start/package.json | 3 +- .../tsconfig.internal.json | 15 ++ packages/eslint-plugin-start/tsconfig.json | 2 +- packages/history/package.json | 3 +- packages/history/tsconfig.internal.json | 15 ++ packages/history/tsconfig.json | 2 +- packages/react-router-devtools/package.json | 3 +- .../tsconfig.internal.json | 20 ++ packages/react-router-devtools/tsconfig.json | 9 +- packages/react-router-ssr-query/package.json | 3 +- .../tsconfig.internal.json | 19 ++ packages/react-router-ssr-query/tsconfig.json | 8 +- packages/react-router/package.json | 3 +- packages/react-router/tsconfig.internal.json | 19 ++ packages/react-router/tsconfig.json | 8 +- packages/react-start-client/package.json | 3 +- .../react-start-client/tsconfig.internal.json | 20 ++ packages/react-start-client/tsconfig.json | 9 +- packages/react-start-rsc/package.json | 3 +- .../react-start-rsc/tsconfig.internal.json | 24 ++ packages/react-start-rsc/tsconfig.json | 13 +- packages/react-start-server/package.json | 3 +- .../react-start-server/tsconfig.internal.json | 20 ++ packages/react-start-server/tsconfig.json | 9 +- packages/react-start/package.json | 3 +- packages/react-start/tsconfig.internal.json | 25 ++ packages/react-start/tsconfig.json | 214 +++++++++++++++- .../react-start/tsconfig.server-entry.json | 197 ++++++++++++++- packages/router-cli/package.json | 3 +- packages/router-cli/tsconfig.internal.json | 16 ++ packages/router-cli/tsconfig.json | 5 +- packages/router-core/package.json | 3 +- packages/router-core/tsconfig.internal.json | 16 ++ packages/router-core/tsconfig.json | 227 ++++++++++++++++- packages/router-devtools-core/package.json | 3 +- .../tsconfig.internal.json | 16 ++ packages/router-devtools-core/tsconfig.json | 5 +- packages/router-devtools/package.json | 3 +- .../router-devtools/tsconfig.internal.json | 19 ++ packages/router-devtools/tsconfig.json | 8 +- packages/router-generator/package.json | 3 +- .../router-generator/tsconfig.internal.json | 21 ++ packages/router-generator/tsconfig.json | 8 +- .../router-generator/tsconfig.legacy.json | 2 +- packages/router-plugin/package.json | 3 +- packages/router-plugin/tsconfig.internal.json | 22 ++ packages/router-plugin/tsconfig.json | 11 +- packages/router-ssr-query-core/package.json | 3 +- .../tsconfig.internal.json | 16 ++ packages/router-ssr-query-core/tsconfig.json | 5 +- packages/router-utils/package.json | 3 +- packages/router-utils/tsconfig.internal.json | 15 ++ packages/router-utils/tsconfig.json | 2 +- packages/router-vite-plugin/package.json | 3 +- .../router-vite-plugin/tsconfig.internal.json | 16 ++ packages/router-vite-plugin/tsconfig.json | 5 +- packages/solid-router-devtools/package.json | 3 +- .../solid-router-devtools/tsconfig.build.json | 227 ++++++++++++++++- .../tsconfig.internal.json | 20 ++ packages/solid-router-devtools/tsconfig.json | 9 +- packages/solid-router-ssr-query/package.json | 3 +- .../tsconfig.internal.json | 19 ++ packages/solid-router-ssr-query/tsconfig.json | 8 +- packages/solid-router/package.json | 3 +- packages/solid-router/tsconfig.internal.json | 19 ++ packages/solid-router/tsconfig.json | 8 +- packages/solid-start-client/package.json | 3 +- .../solid-start-client/tsconfig.internal.json | 20 ++ packages/solid-start-client/tsconfig.json | 9 +- packages/solid-start-server/package.json | 3 +- .../solid-start-server/tsconfig.internal.json | 20 ++ packages/solid-start-server/tsconfig.json | 9 +- packages/solid-start/package.json | 3 +- packages/solid-start/tsconfig.internal.json | 24 ++ packages/solid-start/tsconfig.json | 226 ++++++++++++++++- .../solid-start/tsconfig.server-entry.json | 210 +++++++++++++++- packages/start-client-core/package.json | 3 +- .../start-client-core/tsconfig.internal.json | 20 ++ packages/start-client-core/tsconfig.json | 9 +- packages/start-fn-stubs/package.json | 3 +- .../start-fn-stubs/tsconfig.internal.json | 15 ++ packages/start-fn-stubs/tsconfig.json | 2 +- packages/start-plugin-core/package.json | 3 +- .../start-plugin-core/tsconfig.internal.json | 23 ++ packages/start-plugin-core/tsconfig.json | 12 +- packages/start-server-core/package.json | 3 +- .../start-server-core/tsconfig.internal.json | 21 ++ packages/start-server-core/tsconfig.json | 8 +- .../package.json | 3 +- .../tsconfig.internal.json | 20 ++ .../tsconfig.json | 9 +- packages/start-storage-context/package.json | 3 +- .../tsconfig.internal.json | 16 ++ packages/start-storage-context/tsconfig.json | 5 +- packages/valibot-adapter/package.json | 3 +- .../valibot-adapter/tsconfig.internal.json | 16 ++ packages/valibot-adapter/tsconfig.json | 5 +- packages/virtual-file-routes/package.json | 3 +- .../tsconfig.internal.json | 15 ++ packages/virtual-file-routes/tsconfig.json | 2 +- packages/vue-router-devtools/package.json | 3 +- .../tsconfig.internal.json | 20 ++ packages/vue-router-devtools/tsconfig.json | 9 +- packages/vue-router-ssr-query/package.json | 3 +- .../tsconfig.internal.json | 19 ++ packages/vue-router-ssr-query/tsconfig.json | 8 +- packages/vue-router/package.json | 3 +- packages/vue-router/tsconfig.internal.json | 19 ++ packages/vue-router/tsconfig.json | 8 +- packages/vue-start-client/package.json | 3 +- .../vue-start-client/tsconfig.internal.json | 20 ++ packages/vue-start-client/tsconfig.json | 9 +- packages/vue-start-server/package.json | 3 +- .../vue-start-server/tsconfig.internal.json | 20 ++ packages/vue-start-server/tsconfig.json | 9 +- packages/vue-start/package.json | 3 +- packages/vue-start/tsconfig.internal.json | 24 ++ packages/vue-start/tsconfig.json | 233 +++++++++++++++++- packages/vue-start/tsconfig.server-entry.json | 217 +++++++++++++++- packages/zod-adapter/package.json | 3 +- packages/zod-adapter/tsconfig.internal.json | 16 ++ packages/zod-adapter/tsconfig.json | 5 +- 128 files changed, 2782 insertions(+), 124 deletions(-) create mode 100644 packages/arktype-adapter/tsconfig.internal.json create mode 100644 packages/eslint-plugin-router/tsconfig.internal.json create mode 100644 packages/eslint-plugin-start/tsconfig.internal.json create mode 100644 packages/history/tsconfig.internal.json create mode 100644 packages/react-router-devtools/tsconfig.internal.json create mode 100644 packages/react-router-ssr-query/tsconfig.internal.json create mode 100644 packages/react-router/tsconfig.internal.json create mode 100644 packages/react-start-client/tsconfig.internal.json create mode 100644 packages/react-start-rsc/tsconfig.internal.json create mode 100644 packages/react-start-server/tsconfig.internal.json create mode 100644 packages/react-start/tsconfig.internal.json create mode 100644 packages/router-cli/tsconfig.internal.json create mode 100644 packages/router-core/tsconfig.internal.json create mode 100644 packages/router-devtools-core/tsconfig.internal.json create mode 100644 packages/router-devtools/tsconfig.internal.json create mode 100644 packages/router-generator/tsconfig.internal.json create mode 100644 packages/router-plugin/tsconfig.internal.json create mode 100644 packages/router-ssr-query-core/tsconfig.internal.json create mode 100644 packages/router-utils/tsconfig.internal.json create mode 100644 packages/router-vite-plugin/tsconfig.internal.json create mode 100644 packages/solid-router-devtools/tsconfig.internal.json create mode 100644 packages/solid-router-ssr-query/tsconfig.internal.json create mode 100644 packages/solid-router/tsconfig.internal.json create mode 100644 packages/solid-start-client/tsconfig.internal.json create mode 100644 packages/solid-start-server/tsconfig.internal.json create mode 100644 packages/solid-start/tsconfig.internal.json create mode 100644 packages/start-client-core/tsconfig.internal.json create mode 100644 packages/start-fn-stubs/tsconfig.internal.json create mode 100644 packages/start-plugin-core/tsconfig.internal.json create mode 100644 packages/start-server-core/tsconfig.internal.json create mode 100644 packages/start-static-server-functions/tsconfig.internal.json create mode 100644 packages/start-storage-context/tsconfig.internal.json create mode 100644 packages/valibot-adapter/tsconfig.internal.json create mode 100644 packages/virtual-file-routes/tsconfig.internal.json create mode 100644 packages/vue-router-devtools/tsconfig.internal.json create mode 100644 packages/vue-router-ssr-query/tsconfig.internal.json create mode 100644 packages/vue-router/tsconfig.internal.json create mode 100644 packages/vue-start-client/tsconfig.internal.json create mode 100644 packages/vue-start-server/tsconfig.internal.json create mode 100644 packages/vue-start/tsconfig.internal.json create mode 100644 packages/zod-adapter/tsconfig.internal.json diff --git a/packages/arktype-adapter/package.json b/packages/arktype-adapter/package.json index 61fd9913be5..c70a87a21d4 100644 --- a/packages/arktype-adapter/package.json +++ b/packages/arktype-adapter/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/arktype-adapter/tsconfig.internal.json b/packages/arktype-adapter/tsconfig.internal.json new file mode 100644 index 00000000000..1ea3c25e82c --- /dev/null +++ b/packages/arktype-adapter/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] +} diff --git a/packages/arktype-adapter/tsconfig.json b/packages/arktype-adapter/tsconfig.json index 041d9fe354e..7bbc69865a5 100644 --- a/packages/arktype-adapter/tsconfig.json +++ b/packages/arktype-adapter/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] } diff --git a/packages/eslint-plugin-router/package.json b/packages/eslint-plugin-router/package.json index f4c56989633..8a3b40c7440 100644 --- a/packages/eslint-plugin-router/package.json +++ b/packages/eslint-plugin-router/package.json @@ -15,7 +15,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "scripts": { - "clean": "rimraf ./dist ./coverage", + "clean": "rimraf ./dist ./dist-ts ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -27,6 +27,7 @@ "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && tsc --noEmit" }, "type": "module", diff --git a/packages/eslint-plugin-router/tsconfig.internal.json b/packages/eslint-plugin-router/tsconfig.internal.json new file mode 100644 index 00000000000..b596ec47adf --- /dev/null +++ b/packages/eslint-plugin-router/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/eslint-plugin-router/tsconfig.json b/packages/eslint-plugin-router/tsconfig.json index cbceff3f8b6..473fa41f6a6 100644 --- a/packages/eslint-plugin-router/tsconfig.json +++ b/packages/eslint-plugin-router/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "moduleResolution": "Bundler" }, diff --git a/packages/eslint-plugin-start/package.json b/packages/eslint-plugin-start/package.json index 1ae96a1c36d..f79aecdc611 100644 --- a/packages/eslint-plugin-start/package.json +++ b/packages/eslint-plugin-start/package.json @@ -15,7 +15,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "scripts": { - "clean": "rimraf ./dist ./coverage", + "clean": "rimraf ./dist ./dist-ts ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -27,6 +27,7 @@ "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && tsc --noEmit" }, "type": "module", diff --git a/packages/eslint-plugin-start/tsconfig.internal.json b/packages/eslint-plugin-start/tsconfig.internal.json new file mode 100644 index 00000000000..97b7b52c973 --- /dev/null +++ b/packages/eslint-plugin-start/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/eslint-plugin-start/tsconfig.json b/packages/eslint-plugin-start/tsconfig.json index 1715152a91e..ebc25513aed 100644 --- a/packages/eslint-plugin-start/tsconfig.json +++ b/packages/eslint-plugin-start/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "moduleResolution": "Bundler", "types": ["node"] diff --git a/packages/history/package.json b/packages/history/package.json index 3d0c83264ba..0734f6eeb7c 100644 --- a/packages/history/package.json +++ b/packages/history/package.json @@ -19,7 +19,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -31,6 +31,7 @@ "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/history/tsconfig.internal.json b/packages/history/tsconfig.internal.json new file mode 100644 index 00000000000..b596ec47adf --- /dev/null +++ b/packages/history/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/history/tsconfig.json b/packages/history/tsconfig.json index b36d1bf9242..38fe359125e 100644 --- a/packages/history/tsconfig.json +++ b/packages/history/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts"] } diff --git a/packages/react-router-devtools/package.json b/packages/react-router-devtools/package.json index 99bd67ec300..0fde7e33081 100644 --- a/packages/react-router-devtools/package.json +++ b/packages/react-router-devtools/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -34,6 +34,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-router-devtools/tsconfig.internal.json b/packages/react-router-devtools/tsconfig.internal.json new file mode 100644 index 00000000000..5d2b62feab3 --- /dev/null +++ b/packages/react-router-devtools/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-router-devtools/tsconfig.json b/packages/react-router-devtools/tsconfig.json index fc0a511b1a9..0c8277f9d46 100644 --- a/packages/react-router-devtools/tsconfig.json +++ b/packages/react-router-devtools/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "react", "types": ["node"] }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-router-ssr-query/package.json b/packages/react-router-ssr-query/package.json index a0722de1274..74f867c5843 100644 --- a/packages/react-router-ssr-query/package.json +++ b/packages/react-router-ssr-query/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "exit 0; vitest", "test:unit:dev": "pnpm run test:unit --watch", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-router-ssr-query/tsconfig.internal.json b/packages/react-router-ssr-query/tsconfig.internal.json new file mode 100644 index 00000000000..3be341d45f9 --- /dev/null +++ b/packages/react-router-ssr-query/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-ssr-query-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-router-ssr-query/tsconfig.json b/packages/react-router-ssr-query/tsconfig.json index 1599b212c02..933e781c49f 100644 --- a/packages/react-router-ssr-query/tsconfig.json +++ b/packages/react-router-ssr-query/tsconfig.json @@ -1,8 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "react" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-ssr-query-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 98919a3ba0f..12fc8009d33 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js -p tsconfig.legacy.json", @@ -38,6 +38,7 @@ "test:perf": "vitest bench", "test:perf:dev": "pnpm run test:perf --watch --hideSkippedTests", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-router/tsconfig.internal.json b/packages/react-router/tsconfig.internal.json new file mode 100644 index 00000000000..a9f1c245fb3 --- /dev/null +++ b/packages/react-router/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-router/tsconfig.json b/packages/react-router/tsconfig.json index f406bf1c095..0c0dbae069f 100644 --- a/packages/react-router/tsconfig.json +++ b/packages/react-router/tsconfig.json @@ -1,9 +1,13 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "react", "types": ["node"] }, - "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"] + "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json index d1c911a1226..83c4f6a96da 100644 --- a/packages/react-start-client/package.json +++ b/packages/react-start-client/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-start-client/tsconfig.internal.json b/packages/react-start-client/tsconfig.internal.json new file mode 100644 index 00000000000..14d30b503c5 --- /dev/null +++ b/packages/react-start-client/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-start-client/tsconfig.json b/packages/react-start-client/tsconfig.json index 1ffe6f0c625..05dffd57444 100644 --- a/packages/react-start-client/tsconfig.json +++ b/packages/react-start-client/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "module": "esnext", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json index 13949736944..3d39d5f8b2e 100644 --- a/packages/react-start-rsc/package.json +++ b/packages/react-start-rsc/package.json @@ -23,7 +23,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:unit:dev": "vitest --watch", @@ -36,6 +36,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-start-rsc/tsconfig.internal.json b/packages/react-start-rsc/tsconfig.internal.json new file mode 100644 index 00000000000..34db773d61a --- /dev/null +++ b/packages/react-start-rsc/tsconfig.internal.json @@ -0,0 +1,24 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-fn-stubs/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } + ] +} diff --git a/packages/react-start-rsc/tsconfig.json b/packages/react-start-rsc/tsconfig.json index 8e611ace3b5..96c45464fd6 100644 --- a/packages/react-start-rsc/tsconfig.json +++ b/packages/react-start-rsc/tsconfig.json @@ -1,9 +1,18 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "module": "esnext", "lib": ["DOM", "DOM.Iterable", "ESNext"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-fn-stubs/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } + ] } diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json index a43b9fc4ad3..bb762825b52 100644 --- a/packages/react-start-server/package.json +++ b/packages/react-start-server/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:eslint": "eslint ./src", @@ -36,6 +36,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/react-start-server/tsconfig.internal.json b/packages/react-start-server/tsconfig.internal.json new file mode 100644 index 00000000000..5cafa3e730c --- /dev/null +++ b/packages/react-start-server/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-start-server/tsconfig.json b/packages/react-start-server/tsconfig.json index 108c78712f2..1034c116185 100644 --- a/packages/react-start-server/tsconfig.json +++ b/packages/react-start-server/tsconfig.json @@ -1,8 +1,13 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "module": "esnext" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-start/package.json b/packages/react-start/package.json index 937a5c24553..2059e90f9e5 100644 --- a/packages/react-start/package.json +++ b/packages/react-start/package.json @@ -24,9 +24,10 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:build", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && vite build -c vite.config.server-entry.ts" }, "type": "module", diff --git a/packages/react-start/tsconfig.internal.json b/packages/react-start/tsconfig.internal.json new file mode 100644 index 00000000000..132f4f14698 --- /dev/null +++ b/packages/react-start/tsconfig.internal.json @@ -0,0 +1,25 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../react-start-client/tsconfig.internal.json" }, + { "path": "../react-start-rsc/tsconfig.internal.json" }, + { "path": "../react-start-server/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] +} diff --git a/packages/react-start/tsconfig.json b/packages/react-start/tsconfig.json index c07753e18cc..1e91ca25e01 100644 --- a/packages/react-start/tsconfig.json +++ b/packages/react-start/tsconfig.json @@ -1,9 +1,217 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "module": "esnext", - "types": ["node"] + "types": ["node"], + "paths": { + "@tanstack/react-start/client": ["./src/client.tsx"], + "@tanstack/react-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] + } }, - "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"] + "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../react-start-client/tsconfig.internal.json" }, + { "path": "../react-start-rsc/tsconfig.internal.json" }, + { "path": "../react-start-server/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] } diff --git a/packages/react-start/tsconfig.server-entry.json b/packages/react-start/tsconfig.server-entry.json index fca708fa0ee..fd103c4cb5b 100644 --- a/packages/react-start/tsconfig.server-entry.json +++ b/packages/react-start/tsconfig.server-entry.json @@ -3,7 +3,202 @@ "compilerOptions": { "rootDir": "./src", "paths": { - "@tanstack/react-start/server": ["./src/server.tsx"] + "@tanstack/react-start/client": ["./src/client.tsx"], + "@tanstack/react-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] } }, "include": ["src/default-entry"] diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json index 7c43756c4c6..85db13fc78b 100644 --- a/packages/router-cli/package.json +++ b/packages/router-cli/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -34,6 +34,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-cli/tsconfig.internal.json b/packages/router-cli/tsconfig.internal.json new file mode 100644 index 00000000000..59f918693f6 --- /dev/null +++ b/packages/router-cli/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../router-generator/tsconfig.internal.json" }] +} diff --git a/packages/router-cli/tsconfig.json b/packages/router-cli/tsconfig.json index 09d70373939..95c78ad0441 100644 --- a/packages/router-cli/tsconfig.json +++ b/packages/router-cli/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts"], "compilerOptions": { "types": ["node"] - } + }, + "references": [{ "path": "../router-generator/tsconfig.internal.json" }] } diff --git a/packages/router-core/package.json b/packages/router-core/package.json index 333d020f528..2df3ede3add 100644 --- a/packages/router-core/package.json +++ b/packages/router-core/package.json @@ -19,7 +19,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -31,6 +31,7 @@ "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-core/tsconfig.internal.json b/packages/router-core/tsconfig.internal.json new file mode 100644 index 00000000000..cf7b3b7c8b2 --- /dev/null +++ b/packages/router-core/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../history/tsconfig.internal.json" }] +} diff --git a/packages/router-core/tsconfig.json b/packages/router-core/tsconfig.json index 34cb3c4dc90..10b51560a0a 100644 --- a/packages/router-core/tsconfig.json +++ b/packages/router-core/tsconfig.json @@ -1,9 +1,229 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "types": ["node"], "paths": { - "@tanstack/router-core/isServer": ["./src/isServer/development.ts"] + "@tanstack/router-core/isServer": ["./src/isServer/development.ts"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] } }, "include": [ @@ -12,5 +232,6 @@ "tests", "vite-minify-plugin.ts", "benchmarks/ssr-streaming/worker.ts" - ] + ], + "references": [{ "path": "../history/tsconfig.internal.json" }] } diff --git a/packages/router-devtools-core/package.json b/packages/router-devtools-core/package.json index af7560e1732..a077a3d6c15 100644 --- a/packages/router-devtools-core/package.json +++ b/packages/router-devtools-core/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src ./tests", "test:unit": "vitest", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", @@ -35,6 +35,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-devtools-core/tsconfig.internal.json b/packages/router-devtools-core/tsconfig.internal.json new file mode 100644 index 00000000000..d7329059d6c --- /dev/null +++ b/packages/router-devtools-core/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] +} diff --git a/packages/router-devtools-core/tsconfig.json b/packages/router-devtools-core/tsconfig.json index 74620fe5a24..027dd02a51e 100644 --- a/packages/router-devtools-core/tsconfig.json +++ b/packages/router-devtools-core/tsconfig.json @@ -1,8 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "@solidjs/web" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] } diff --git a/packages/router-devtools/package.json b/packages/router-devtools/package.json index 3d43a66b89a..0c915062881 100644 --- a/packages/router-devtools/package.json +++ b/packages/router-devtools/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -34,6 +34,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-devtools/tsconfig.internal.json b/packages/router-devtools/tsconfig.internal.json new file mode 100644 index 00000000000..d5da49a348c --- /dev/null +++ b/packages/router-devtools/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../react-router-devtools/tsconfig.internal.json" } + ] +} diff --git a/packages/router-devtools/tsconfig.json b/packages/router-devtools/tsconfig.json index 2f40bc97159..9b9ec25be28 100644 --- a/packages/router-devtools/tsconfig.json +++ b/packages/router-devtools/tsconfig.json @@ -1,7 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx" }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../react-router-devtools/tsconfig.internal.json" } + ] } diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json index 6230d66184d..a7cfb59b63e 100644 --- a/packages/router-generator/package.json +++ b/packages/router-generator/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "clean:snapshots": "rimraf **/*snapshot* --glob", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", @@ -37,6 +37,7 @@ "test:unit": "vitest --typecheck false && vitest run --typecheck.only", "test:unit:dev": "pnpm run test:unit --watch --hideSkippedTests", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-generator/tsconfig.internal.json b/packages/router-generator/tsconfig.internal.json new file mode 100644 index 00000000000..924342f955b --- /dev/null +++ b/packages/router-generator/tsconfig.internal.json @@ -0,0 +1,21 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } + ] +} diff --git a/packages/router-generator/tsconfig.json b/packages/router-generator/tsconfig.json index d1334dff901..0cb69005708 100644 --- a/packages/router-generator/tsconfig.json +++ b/packages/router-generator/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "types": ["node"] @@ -16,5 +16,11 @@ "tests/generator/**/routeTree.gen.ts", "tests/generator/**/routeTree.snapshot.js", "tests/generator/**/routeTree.snapshot.ts" + ], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } ] } diff --git a/packages/router-generator/tsconfig.legacy.json b/packages/router-generator/tsconfig.legacy.json index 604fde55563..4c9a63d4ecf 100644 --- a/packages/router-generator/tsconfig.legacy.json +++ b/packages/router-generator/tsconfig.legacy.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts", "tests"], "exclude": ["tests/generator/**/**"] } diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json index 985d790f819..d53f4b58e70 100644 --- a/packages/router-plugin/package.json +++ b/packages/router-plugin/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "clean:snapshots": "rimraf **/*snapshot* --glob", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", @@ -38,6 +38,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-plugin/tsconfig.internal.json b/packages/router-plugin/tsconfig.internal.json new file mode 100644 index 00000000000..3595ba2e4bd --- /dev/null +++ b/packages/router-plugin/tsconfig.internal.json @@ -0,0 +1,22 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-generator/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } + ] +} diff --git a/packages/router-plugin/tsconfig.json b/packages/router-plugin/tsconfig.json index 0e74c8c099c..86adb3da161 100644 --- a/packages/router-plugin/tsconfig.json +++ b/packages/router-plugin/tsconfig.json @@ -1,9 +1,16 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts", "tests"], "exclude": ["tests/**/test-files/**", "tests/**/snapshots/**"], "compilerOptions": { "jsx": "react-jsx", "types": ["node"] - } + }, + "references": [ + { "path": "../react-router/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-generator/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } + ] } diff --git a/packages/router-ssr-query-core/package.json b/packages/router-ssr-query-core/package.json index 2383b8d5c5c..3988c9a57a4 100644 --- a/packages/router-ssr-query-core/package.json +++ b/packages/router-ssr-query-core/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -38,6 +38,7 @@ "test:perf": "vitest bench", "test:perf:dev": "pnpm run test:perf --watch --hideSkippedTests", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-ssr-query-core/tsconfig.internal.json b/packages/router-ssr-query-core/tsconfig.internal.json new file mode 100644 index 00000000000..d7329059d6c --- /dev/null +++ b/packages/router-ssr-query-core/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] +} diff --git a/packages/router-ssr-query-core/tsconfig.json b/packages/router-ssr-query-core/tsconfig.json index e99dc8130aa..3548346f305 100644 --- a/packages/router-ssr-query-core/tsconfig.json +++ b/packages/router-ssr-query-core/tsconfig.json @@ -1,4 +1,5 @@ { - "extends": "../../tsconfig.json", - "include": ["src", "vite.config.ts", "tests", "vite-minify-plugin.ts"] + "extends": "../tsconfig.base.json", + "include": ["src", "vite.config.ts", "tests", "vite-minify-plugin.ts"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] } diff --git a/packages/router-utils/package.json b/packages/router-utils/package.json index 9ba72a5cf2d..1b285319d7a 100644 --- a/packages/router-utils/package.json +++ b/packages/router-utils/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -35,6 +35,7 @@ "test:types:ts70": "tsc", "test:unit": "vitest", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-utils/tsconfig.internal.json b/packages/router-utils/tsconfig.internal.json new file mode 100644 index 00000000000..b596ec47adf --- /dev/null +++ b/packages/router-utils/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/router-utils/tsconfig.json b/packages/router-utils/tsconfig.json index 0506ca3d49e..3dd32cdf094 100644 --- a/packages/router-utils/tsconfig.json +++ b/packages/router-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts", "tests"], "exclude": ["tests/generator/**/**"], "compilerOptions": { diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json index 0b9b557fb55..90763bb7099 100644 --- a/packages/router-vite-plugin/package.json +++ b/packages/router-vite-plugin/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "echo 'No unit tests are needed here since we do them in @tanstack/router-plugin!'", "test:eslint": "eslint ./src", @@ -36,6 +36,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/router-vite-plugin/tsconfig.internal.json b/packages/router-vite-plugin/tsconfig.internal.json new file mode 100644 index 00000000000..63c1f4d9954 --- /dev/null +++ b/packages/router-vite-plugin/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../router-plugin/tsconfig.internal.json" }] +} diff --git a/packages/router-vite-plugin/tsconfig.json b/packages/router-vite-plugin/tsconfig.json index bd398a87282..43d4c3f7df4 100644 --- a/packages/router-vite-plugin/tsconfig.json +++ b/packages/router-vite-plugin/tsconfig.json @@ -1,8 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts", "tests"], "exclude": ["tests/test-files/**", "tests/snapshots/**"], "compilerOptions": { "jsx": "react-jsx" - } + }, + "references": [{ "path": "../router-plugin/tsconfig.internal.json" }] } diff --git a/packages/solid-router-devtools/package.json b/packages/solid-router-devtools/package.json index ff1453c8249..383d14a969f 100644 --- a/packages/solid-router-devtools/package.json +++ b/packages/solid-router-devtools/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -34,6 +34,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && tsc -p tsconfig.build.json" }, "type": "module", diff --git a/packages/solid-router-devtools/tsconfig.build.json b/packages/solid-router-devtools/tsconfig.build.json index e460be5cfb1..f83c102faef 100644 --- a/packages/solid-router-devtools/tsconfig.build.json +++ b/packages/solid-router-devtools/tsconfig.build.json @@ -8,7 +8,232 @@ "declaration": true, "sourceMap": true, "paths": { - "@tanstack/router-devtools-core": ["../../router-devtools-core/src"] + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] } }, "include": ["src"] diff --git a/packages/solid-router-devtools/tsconfig.internal.json b/packages/solid-router-devtools/tsconfig.internal.json new file mode 100644 index 00000000000..93ea7252f08 --- /dev/null +++ b/packages/solid-router-devtools/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-router-devtools/tsconfig.json b/packages/solid-router-devtools/tsconfig.json index 3e806f6d620..2d2743b4cc3 100644 --- a/packages/solid-router-devtools/tsconfig.json +++ b/packages/solid-router-devtools/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" } + ] } diff --git a/packages/solid-router-ssr-query/package.json b/packages/solid-router-ssr-query/package.json index eb846b44b54..42ba0d3b384 100644 --- a/packages/solid-router-ssr-query/package.json +++ b/packages/solid-router-ssr-query/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "exit 0; vitest", "test:unit:dev": "pnpm run test:unit --watch", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/solid-router-ssr-query/tsconfig.internal.json b/packages/solid-router-ssr-query/tsconfig.internal.json new file mode 100644 index 00000000000..b6f7dd47adf --- /dev/null +++ b/packages/solid-router-ssr-query/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-ssr-query-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-router-ssr-query/tsconfig.json b/packages/solid-router-ssr-query/tsconfig.json index e24672b5de0..bf458c85ba9 100644 --- a/packages/solid-router-ssr-query/tsconfig.json +++ b/packages/solid-router-ssr-query/tsconfig.json @@ -1,8 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../router-ssr-query-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" } + ] } diff --git a/packages/solid-router/package.json b/packages/solid-router/package.json index eb03fa09096..eee0c8d6b00 100644 --- a/packages/solid-router/package.json +++ b/packages/solid-router/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js -p tsconfig.legacy.json", @@ -38,6 +38,7 @@ "test:perf": "vitest bench", "test:perf:dev": "pnpm run test:perf --watch --hideSkippedTests", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && tsc -p tsconfig.build.json" }, "type": "module", diff --git a/packages/solid-router/tsconfig.internal.json b/packages/solid-router/tsconfig.internal.json new file mode 100644 index 00000000000..a9f1c245fb3 --- /dev/null +++ b/packages/solid-router/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-router/tsconfig.json b/packages/solid-router/tsconfig.json index a46a6844d4d..54728e7a7ad 100644 --- a/packages/solid-router/tsconfig.json +++ b/packages/solid-router/tsconfig.json @@ -1,9 +1,13 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "types": ["node"] }, - "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"] + "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] } diff --git a/packages/solid-start-client/package.json b/packages/solid-start-client/package.json index f0b1f904bfc..48da7b8f6fa 100644 --- a/packages/solid-start-client/package.json +++ b/packages/solid-start-client/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/solid-start-client/tsconfig.internal.json b/packages/solid-start-client/tsconfig.internal.json new file mode 100644 index 00000000000..7f92407384e --- /dev/null +++ b/packages/solid-start-client/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-start-client/tsconfig.json b/packages/solid-start-client/tsconfig.json index 0a0fe1f18af..fb42aedf64f 100644 --- a/packages/solid-start-client/tsconfig.json +++ b/packages/solid-start-client/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext" }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] } diff --git a/packages/solid-start-server/package.json b/packages/solid-start-server/package.json index 47790930d8d..be49ae24a92 100644 --- a/packages/solid-start-server/package.json +++ b/packages/solid-start-server/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:eslint": "eslint ./src", @@ -36,6 +36,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/solid-start-server/tsconfig.internal.json b/packages/solid-start-server/tsconfig.internal.json new file mode 100644 index 00000000000..ad4069b2f09 --- /dev/null +++ b/packages/solid-start-server/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-start-server/tsconfig.json b/packages/solid-start-server/tsconfig.json index 4d7edc09ba9..24bfcca2464 100644 --- a/packages/solid-start-server/tsconfig.json +++ b/packages/solid-start-server/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] } diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json index 58e45f6bdaa..9e46cbb1ac7 100644 --- a/packages/solid-start/package.json +++ b/packages/solid-start/package.json @@ -24,10 +24,11 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:build", "test:unit": "vitest", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && vite build -c vite.config.server-entry.ts" }, "type": "module", diff --git a/packages/solid-start/tsconfig.internal.json b/packages/solid-start/tsconfig.internal.json new file mode 100644 index 00000000000..f1d209f585c --- /dev/null +++ b/packages/solid-start/tsconfig.internal.json @@ -0,0 +1,24 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../solid-start-client/tsconfig.internal.json" }, + { "path": "../solid-start-server/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] +} diff --git a/packages/solid-start/tsconfig.json b/packages/solid-start/tsconfig.json index 61fa4599cff..688641608d4 100644 --- a/packages/solid-start/tsconfig.json +++ b/packages/solid-start/tsconfig.json @@ -1,10 +1,230 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext", - "types": ["node"] + "types": ["node"], + "paths": { + "@tanstack/solid-start/client": ["./src/client.tsx"], + "@tanstack/solid-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] + } }, - "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"] + "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"], + "references": [ + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../solid-router/tsconfig.internal.json" }, + { "path": "../solid-start-client/tsconfig.internal.json" }, + { "path": "../solid-start-server/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" } + ] } diff --git a/packages/solid-start/tsconfig.server-entry.json b/packages/solid-start/tsconfig.server-entry.json index a73a0fc5ae6..f90d1e9bc11 100644 --- a/packages/solid-start/tsconfig.server-entry.json +++ b/packages/solid-start/tsconfig.server-entry.json @@ -3,7 +3,215 @@ "compilerOptions": { "rootDir": "./src", "paths": { - "@tanstack/solid-start/server": ["./src/server.tsx"] + "@tanstack/solid-start/client": ["./src/client.tsx"], + "@tanstack/solid-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start": ["../vue-start/dist-ts/index"], + "@tanstack/vue-start/client": ["../vue-start/dist-ts/client"], + "@tanstack/vue-start/client-rpc": ["../vue-start/dist-ts/client-rpc"], + "@tanstack/vue-start/server-rpc": ["../vue-start/dist-ts/server-rpc"], + "@tanstack/vue-start/ssr-rpc": ["../vue-start/dist-ts/ssr-rpc"], + "@tanstack/vue-start/server": ["../vue-start/dist-ts/server"], + "@tanstack/vue-start/plugin/vite": ["../vue-start/dist-ts/plugin/vite"], + "@tanstack/vue-start/plugin/rsbuild": [ + "../vue-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/vue-start/server-entry": [ + "../vue-start/dist-ts/default-entry/server" + ], + "@tanstack/vue-start/server-only": ["../vue-start/dist-ts/server-only"], + "@tanstack/vue-start/client-only": ["../vue-start/dist-ts/client-only"], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] } }, "include": ["src/default-entry"] diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json index ed41ea3f40d..d62b267d0d4 100644 --- a/packages/start-client-core/package.json +++ b/packages/start-client-core/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/start-client-core/tsconfig.internal.json b/packages/start-client-core/tsconfig.internal.json new file mode 100644 index 00000000000..650a7ec36ca --- /dev/null +++ b/packages/start-client-core/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-fn-stubs/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } + ] +} diff --git a/packages/start-client-core/tsconfig.json b/packages/start-client-core/tsconfig.json index 8542a253207..f5c240886b7 100644 --- a/packages/start-client-core/tsconfig.json +++ b/packages/start-client-core/tsconfig.json @@ -1,10 +1,15 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-fn-stubs/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } + ] } diff --git a/packages/start-fn-stubs/package.json b/packages/start-fn-stubs/package.json index ade34b5e479..e2492ae685c 100644 --- a/packages/start-fn-stubs/package.json +++ b/packages/start-fn-stubs/package.json @@ -22,7 +22,7 @@ "client" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:unit:dev": "vitest --watch", @@ -35,6 +35,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/start-fn-stubs/tsconfig.internal.json b/packages/start-fn-stubs/tsconfig.internal.json new file mode 100644 index 00000000000..b596ec47adf --- /dev/null +++ b/packages/start-fn-stubs/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/start-fn-stubs/tsconfig.json b/packages/start-fn-stubs/tsconfig.json index 0484835e6b5..aaecc5dbbd3 100644 --- a/packages/start-fn-stubs/tsconfig.json +++ b/packages/start-fn-stubs/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "module": "esnext" }, diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json index c32c9d4edc2..3170844a553 100644 --- a/packages/start-plugin-core/package.json +++ b/packages/start-plugin-core/package.json @@ -25,7 +25,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "clean:snapshots": "rimraf **/*snapshot* --glob", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit && pnpm test:integration", "test:unit": "vitest --project unit", @@ -39,6 +39,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "nx": { diff --git a/packages/start-plugin-core/tsconfig.internal.json b/packages/start-plugin-core/tsconfig.internal.json new file mode 100644 index 00000000000..5c1f227c50a --- /dev/null +++ b/packages/start-plugin-core/tsconfig.internal.json @@ -0,0 +1,23 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-generator/tsconfig.internal.json" }, + { "path": "../router-plugin/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } + ] +} diff --git a/packages/start-plugin-core/tsconfig.json b/packages/start-plugin-core/tsconfig.json index 1656d691d4e..547b8127082 100644 --- a/packages/start-plugin-core/tsconfig.json +++ b/packages/start-plugin-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "include": ["src", "vite.config.ts", "tests"], "exclude": [ "tests/**/error-files/**", @@ -10,5 +10,13 @@ "target": "esnext", "noEmit": true, "types": ["node"] - } + }, + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-generator/tsconfig.internal.json" }, + { "path": "../router-plugin/tsconfig.internal.json" }, + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../virtual-file-routes/tsconfig.internal.json" } + ] } diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json index 6e33e7dcb15..94485caf583 100644 --- a/packages/start-server-core/package.json +++ b/packages/start-server-core/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", "test:perf": "NODE_ENV=production vitest bench --config vitest.bench.config.ts", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "nx": { diff --git a/packages/start-server-core/tsconfig.internal.json b/packages/start-server-core/tsconfig.internal.json new file mode 100644 index 00000000000..d5c7b9a4a7d --- /dev/null +++ b/packages/start-server-core/tsconfig.internal.json @@ -0,0 +1,21 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } + ] +} diff --git a/packages/start-server-core/tsconfig.json b/packages/start-server-core/tsconfig.json index b142331a03b..f6467f029f7 100644 --- a/packages/start-server-core/tsconfig.json +++ b/packages/start-server-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", "module": "esnext", @@ -11,5 +11,11 @@ "vite.config.ts", "vitest.bench.config.ts", "../start-client-core/src/start-entry.d.ts" + ], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-storage-context/tsconfig.internal.json" } ] } diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json index 026a8426bed..21e79b2320b 100644 --- a/packages/start-static-server-functions/package.json +++ b/packages/start-static-server-functions/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/start-static-server-functions/tsconfig.internal.json b/packages/start-static-server-functions/tsconfig.internal.json new file mode 100644 index 00000000000..ebfa696b226 --- /dev/null +++ b/packages/start-static-server-functions/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../react-start/tsconfig.internal.json" }, + { "path": "../solid-start/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] +} diff --git a/packages/start-static-server-functions/tsconfig.json b/packages/start-static-server-functions/tsconfig.json index 8542a253207..d024783f5f9 100644 --- a/packages/start-static-server-functions/tsconfig.json +++ b/packages/start-static-server-functions/tsconfig.json @@ -1,10 +1,15 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../react-start/tsconfig.internal.json" }, + { "path": "../solid-start/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" } + ] } diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json index 36e42bb110d..31e148e3732 100644 --- a/packages/start-storage-context/package.json +++ b/packages/start-storage-context/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/start-storage-context/tsconfig.internal.json b/packages/start-storage-context/tsconfig.internal.json new file mode 100644 index 00000000000..d7329059d6c --- /dev/null +++ b/packages/start-storage-context/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] +} diff --git a/packages/start-storage-context/tsconfig.json b/packages/start-storage-context/tsconfig.json index 8542a253207..1e67f865812 100644 --- a/packages/start-storage-context/tsconfig.json +++ b/packages/start-storage-context/tsconfig.json @@ -1,10 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js", "module": "esnext", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [{ "path": "../router-core/tsconfig.internal.json" }] } diff --git a/packages/valibot-adapter/package.json b/packages/valibot-adapter/package.json index 453b7d6d174..e3f5872bf30 100644 --- a/packages/valibot-adapter/package.json +++ b/packages/valibot-adapter/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/valibot-adapter/tsconfig.internal.json b/packages/valibot-adapter/tsconfig.internal.json new file mode 100644 index 00000000000..1ea3c25e82c --- /dev/null +++ b/packages/valibot-adapter/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] +} diff --git a/packages/valibot-adapter/tsconfig.json b/packages/valibot-adapter/tsconfig.json index 041d9fe354e..7bbc69865a5 100644 --- a/packages/valibot-adapter/tsconfig.json +++ b/packages/valibot-adapter/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] } diff --git a/packages/virtual-file-routes/package.json b/packages/virtual-file-routes/package.json index 1fa8f1efbe9..abf852bd632 100644 --- a/packages/virtual-file-routes/package.json +++ b/packages/virtual-file-routes/package.json @@ -24,9 +24,10 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/virtual-file-routes/tsconfig.internal.json b/packages/virtual-file-routes/tsconfig.internal.json new file mode 100644 index 00000000000..b596ec47adf --- /dev/null +++ b/packages/virtual-file-routes/tsconfig.internal.json @@ -0,0 +1,15 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"] +} diff --git a/packages/virtual-file-routes/tsconfig.json b/packages/virtual-file-routes/tsconfig.json index d05c6bfbf36..cd5e13d87e8 100644 --- a/packages/virtual-file-routes/tsconfig.json +++ b/packages/virtual-file-routes/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "target": "ESNext", "moduleResolution": "Bundler" diff --git a/packages/vue-router-devtools/package.json b/packages/vue-router-devtools/package.json index 526d24862aa..eccd6b8cb89 100644 --- a/packages/vue-router-devtools/package.json +++ b/packages/vue-router-devtools/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -34,6 +34,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/vue-router-devtools/tsconfig.internal.json b/packages/vue-router-devtools/tsconfig.internal.json new file mode 100644 index 00000000000..71726fbf5aa --- /dev/null +++ b/packages/vue-router-devtools/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-router-devtools/tsconfig.json b/packages/vue-router-devtools/tsconfig.json index ca9a2a40923..2e4df80a0f4 100644 --- a/packages/vue-router-devtools/tsconfig.json +++ b/packages/vue-router-devtools/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue", "types": ["node"] }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../router-devtools-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] } diff --git a/packages/vue-router-ssr-query/package.json b/packages/vue-router-ssr-query/package.json index 59438eb17a5..74a93d02cd7 100644 --- a/packages/vue-router-ssr-query/package.json +++ b/packages/vue-router-ssr-query/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "exit 0; vitest", "test:unit:dev": "pnpm run test:unit --watch", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/vue-router-ssr-query/tsconfig.internal.json b/packages/vue-router-ssr-query/tsconfig.internal.json new file mode 100644 index 00000000000..74d9fdc4f6e --- /dev/null +++ b/packages/vue-router-ssr-query/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-ssr-query-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-router-ssr-query/tsconfig.json b/packages/vue-router-ssr-query/tsconfig.json index 6c6fc6320bd..c27c3135832 100644 --- a/packages/vue-router-ssr-query/tsconfig.json +++ b/packages/vue-router-ssr-query/tsconfig.json @@ -1,8 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue" }, - "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"] + "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"], + "references": [ + { "path": "../router-ssr-query-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] } diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index 518111c724b..a0f6aa260e7 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm run test:unit", "test:eslint": "eslint", "test:types": "pnpm run test:unit .test-d.ts", @@ -34,6 +34,7 @@ "test:perf": "vitest bench", "test:perf:dev": "pnpm run test:perf --watch --hideSkippedTests", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && tsc -p tsconfig.build.json" }, "type": "module", diff --git a/packages/vue-router/tsconfig.internal.json b/packages/vue-router/tsconfig.internal.json new file mode 100644 index 00000000000..a9f1c245fb3 --- /dev/null +++ b/packages/vue-router/tsconfig.internal.json @@ -0,0 +1,19 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-router/tsconfig.json b/packages/vue-router/tsconfig.json index 80e4e5e0458..d35e4803e26 100644 --- a/packages/vue-router/tsconfig.json +++ b/packages/vue-router/tsconfig.json @@ -1,9 +1,13 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue", "types": ["node"] }, - "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"] + "include": ["src", "tests", "vite.config.ts", "eslint.config.ts"], + "references": [ + { "path": "../history/tsconfig.internal.json" }, + { "path": "../router-core/tsconfig.internal.json" } + ] } diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json index 3e8e2facc21..6f1786381c8 100644 --- a/packages/vue-start-client/package.json +++ b/packages/vue-start-client/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:unit:dev": "vitest --watch", @@ -37,6 +37,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/vue-start-client/tsconfig.internal.json b/packages/vue-start-client/tsconfig.internal.json new file mode 100644 index 00000000000..b224fa9d018 --- /dev/null +++ b/packages/vue-start-client/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-start-client/tsconfig.json b/packages/vue-start-client/tsconfig.json index 99ea7800427..1067780698b 100644 --- a/packages/vue-start-client/tsconfig.json +++ b/packages/vue-start-client/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue", "module": "esnext" }, - "include": ["src", "vite.config.ts"] + "include": ["src", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] } diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json index 20c9aab0e05..84e9afb2436 100644 --- a/packages/vue-start-server/package.json +++ b/packages/vue-start-server/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "exit 0; vitest", "test:eslint": "eslint ./src", @@ -36,6 +36,7 @@ "test:types:ts60": "tsc6", "test:types:ts70": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/vue-start-server/tsconfig.internal.json b/packages/vue-start-server/tsconfig.internal.json new file mode 100644 index 00000000000..4d8ce29c78f --- /dev/null +++ b/packages/vue-start-server/tsconfig.internal.json @@ -0,0 +1,20 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-start-server/tsconfig.json b/packages/vue-start-server/tsconfig.json index cf7ed62e510..2b703660d3a 100644 --- a/packages/vue-start-server/tsconfig.json +++ b/packages/vue-start-server/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue", "module": "esnext" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [ + { "path": "../router-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" } + ] } diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json index ee6dec79e3f..22e9d305f90 100644 --- a/packages/vue-start/package.json +++ b/packages/vue-start/package.json @@ -24,9 +24,10 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test": "pnpm test:build", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build && vite build -c vite.config.server-entry.ts" }, "type": "module", diff --git a/packages/vue-start/tsconfig.internal.json b/packages/vue-start/tsconfig.internal.json new file mode 100644 index 00000000000..e8b81f4ba56 --- /dev/null +++ b/packages/vue-start/tsconfig.internal.json @@ -0,0 +1,24 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [ + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" }, + { "path": "../vue-start-client/tsconfig.internal.json" }, + { "path": "../vue-start-server/tsconfig.internal.json" } + ] +} diff --git a/packages/vue-start/tsconfig.json b/packages/vue-start/tsconfig.json index 6d71059a1ee..6242ac903f7 100644 --- a/packages/vue-start/tsconfig.json +++ b/packages/vue-start/tsconfig.json @@ -1,10 +1,237 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "vue", "module": "esnext", - "types": ["node"] + "types": ["node"], + "paths": { + "@tanstack/vue-start/client": ["./src/client.tsx"], + "@tanstack/vue-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] + } }, - "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"] + "include": ["src", "vite.config.ts", "vite.config.server-entry.ts"], + "references": [ + { "path": "../router-utils/tsconfig.internal.json" }, + { "path": "../start-client-core/tsconfig.internal.json" }, + { "path": "../start-plugin-core/tsconfig.internal.json" }, + { "path": "../start-server-core/tsconfig.internal.json" }, + { "path": "../vue-router/tsconfig.internal.json" }, + { "path": "../vue-start-client/tsconfig.internal.json" }, + { "path": "../vue-start-server/tsconfig.internal.json" } + ] } diff --git a/packages/vue-start/tsconfig.server-entry.json b/packages/vue-start/tsconfig.server-entry.json index 96014bcf93b..a4bf6e1e9ae 100644 --- a/packages/vue-start/tsconfig.server-entry.json +++ b/packages/vue-start/tsconfig.server-entry.json @@ -3,7 +3,222 @@ "compilerOptions": { "rootDir": "./src", "paths": { - "@tanstack/vue-start/server": ["./src/server.tsx"] + "@tanstack/vue-start/client": ["./src/client.tsx"], + "@tanstack/vue-start/server": ["./src/server.tsx"], + "@tanstack/arktype-adapter": ["../arktype-adapter/dist-ts/index"], + "@tanstack/eslint-plugin-router": [ + "../eslint-plugin-router/dist-ts/index" + ], + "@tanstack/eslint-plugin-start": ["../eslint-plugin-start/dist-ts/index"], + "@tanstack/history": ["../history/dist-ts/index"], + "@tanstack/react-router": ["../react-router/dist-ts/index"], + "@tanstack/react-router/ssr/server": [ + "../react-router/dist-ts/ssr/server" + ], + "@tanstack/react-router/ssr/client": [ + "../react-router/dist-ts/ssr/client" + ], + "@tanstack/react-router-devtools": [ + "../react-router-devtools/dist-ts/index" + ], + "@tanstack/react-router-ssr-query": [ + "../react-router-ssr-query/dist-ts/index" + ], + "@tanstack/react-start": ["../react-start/dist-ts/index"], + "@tanstack/react-start/client": ["../react-start/dist-ts/client"], + "@tanstack/react-start/hydration": ["../react-start/dist-ts/hydration"], + "@tanstack/react-start/client-rpc": ["../react-start/dist-ts/client-rpc"], + "@tanstack/react-start/server": ["../react-start/dist-ts/server"], + "@tanstack/react-start/server-rpc": ["../react-start/dist-ts/server-rpc"], + "@tanstack/react-start/ssr-rpc": ["../react-start/dist-ts/ssr-rpc"], + "@tanstack/react-start/plugin/vite": [ + "../react-start/dist-ts/plugin/vite" + ], + "@tanstack/react-start/plugin/rsbuild": [ + "../react-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/react-start/server-entry": [ + "../react-start/dist-ts/default-entry/server" + ], + "@tanstack/react-start/rsc": ["../react-start/dist-ts/rsc"], + "@tanstack/react-start/rsc/serialization/server": [ + "../react-start/dist-ts/rsc/serialization/server" + ], + "@tanstack/react-start/rsc/serialization/client": [ + "../react-start/dist-ts/rsc/serialization/client" + ], + "@tanstack/react-start/rsbuild/browser-decode": [ + "../react-start/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start/rsbuild/ssr-decode": [ + "../react-start/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start/server-only": [ + "../react-start/dist-ts/server-only" + ], + "@tanstack/react-start/client-only": [ + "../react-start/dist-ts/client-only" + ], + "@tanstack/react-start-client": ["../react-start-client/dist-ts/index"], + "@tanstack/react-start-client/hydration": [ + "../react-start-client/dist-ts/hydration" + ], + "@tanstack/react-start-client/Hydrate": [ + "../react-start-client/dist-ts/Hydrate" + ], + "@tanstack/react-start-rsc": ["../react-start-rsc/dist-ts/index"], + "@tanstack/react-start-rsc/serialization.client": [ + "../react-start-rsc/dist-ts/serialization.client" + ], + "@tanstack/react-start-rsc/serialization.server": [ + "../react-start-rsc/dist-ts/serialization.server" + ], + "@tanstack/react-start-rsc/plugin/vite": [ + "../react-start-rsc/dist-ts/plugin/vite" + ], + "@tanstack/react-start-rsc/plugin/rscCssTransform": [ + "../react-start-rsc/dist-ts/plugin/rscCssTransform" + ], + "@tanstack/react-start-rsc/rsbuild/ssr-decode": [ + "../react-start-rsc/dist-ts/rsbuild/ssr-decode" + ], + "@tanstack/react-start-rsc/rsbuild/browser-decode": [ + "../react-start-rsc/dist-ts/rsbuild/browser-decode" + ], + "@tanstack/react-start-server": ["../react-start-server/dist-ts/index"], + "@tanstack/router-cli": ["../router-cli/dist-ts/index"], + "@tanstack/router-core": ["../router-core/dist-ts/index"], + "@tanstack/router-core/ssr/server": ["../router-core/dist-ts/ssr/server"], + "@tanstack/router-core/ssr/client": ["../router-core/dist-ts/ssr/client"], + "@tanstack/router-core/isServer": [ + "../router-core/dist-ts/isServer/client" + ], + "@tanstack/router-core/scroll-restoration-script": [ + "../router-core/dist-ts/scroll-restoration-script/server" + ], + "@tanstack/router-devtools": ["../router-devtools/dist-ts/index"], + "@tanstack/router-devtools-core": [ + "../router-devtools-core/dist-ts/index" + ], + "@tanstack/router-generator": ["../router-generator/dist-ts/index"], + "@tanstack/router-plugin": ["../router-plugin/dist-ts/index"], + "@tanstack/router-plugin/vite": ["../router-plugin/dist-ts/vite"], + "@tanstack/router-plugin/context": ["../router-plugin/dist-ts/context"], + "@tanstack/router-plugin/rspack": ["../router-plugin/dist-ts/rspack"], + "@tanstack/router-plugin/webpack": ["../router-plugin/dist-ts/webpack"], + "@tanstack/router-plugin/esbuild": ["../router-plugin/dist-ts/esbuild"], + "@tanstack/router-ssr-query-core": [ + "../router-ssr-query-core/dist-ts/index" + ], + "@tanstack/router-utils": ["../router-utils/dist-ts/index"], + "@tanstack/router-vite-plugin": ["../router-vite-plugin/dist-ts/index"], + "@tanstack/solid-router": ["../solid-router/dist-ts/index"], + "@tanstack/solid-router/ssr/server": [ + "../solid-router/dist-ts/ssr/server" + ], + "@tanstack/solid-router/ssr/client": [ + "../solid-router/dist-ts/ssr/client" + ], + "@tanstack/solid-router-devtools": [ + "../solid-router-devtools/dist-ts/index" + ], + "@tanstack/solid-router-ssr-query": [ + "../solid-router-ssr-query/dist-ts/index" + ], + "@tanstack/solid-start": ["../solid-start/dist-ts/index"], + "@tanstack/solid-start/client": ["../solid-start/dist-ts/client"], + "@tanstack/solid-start/hydration": ["../solid-start/dist-ts/hydration"], + "@tanstack/solid-start/client-rpc": ["../solid-start/dist-ts/client-rpc"], + "@tanstack/solid-start/server-rpc": ["../solid-start/dist-ts/server-rpc"], + "@tanstack/solid-start/ssr-rpc": ["../solid-start/dist-ts/ssr-rpc"], + "@tanstack/solid-start/server": ["../solid-start/dist-ts/server"], + "@tanstack/solid-start/plugin/vite": [ + "../solid-start/dist-ts/plugin/vite" + ], + "@tanstack/solid-start/plugin/rsbuild": [ + "../solid-start/dist-ts/plugin/rsbuild" + ], + "@tanstack/solid-start/server-entry": [ + "../solid-start/dist-ts/default-entry/server" + ], + "@tanstack/solid-start/server-only": [ + "../solid-start/dist-ts/server-only" + ], + "@tanstack/solid-start/client-only": [ + "../solid-start/dist-ts/client-only" + ], + "@tanstack/solid-start-client": ["../solid-start-client/dist-ts/index"], + "@tanstack/solid-start-client/hydration": [ + "../solid-start-client/dist-ts/hydration" + ], + "@tanstack/solid-start-client/Hydrate": [ + "../solid-start-client/dist-ts/Hydrate" + ], + "@tanstack/solid-start-server": ["../solid-start-server/dist-ts/index"], + "@tanstack/start-client-core": ["../start-client-core/dist-ts/index"], + "@tanstack/start-client-core/client": [ + "../start-client-core/dist-ts/client/index" + ], + "@tanstack/start-client-core/client-rpc": [ + "../start-client-core/dist-ts/client-rpc/index" + ], + "@tanstack/start-client-core/hydration": [ + "../start-client-core/dist-ts/hydration" + ], + "@tanstack/start-client-core/hydration/constants": [ + "../start-client-core/dist-ts/hydration/constants" + ], + "@tanstack/start-client-core/hydration/runtime": [ + "../start-client-core/dist-ts/hydration/runtime" + ], + "@tanstack/start-fn-stubs": ["../start-fn-stubs/dist-ts/index"], + "@tanstack/start-plugin-core": ["../start-plugin-core/dist-ts/index"], + "@tanstack/start-plugin-core/utils": [ + "../start-plugin-core/dist-ts/utils" + ], + "@tanstack/start-plugin-core/vite": [ + "../start-plugin-core/dist-ts/vite/index" + ], + "@tanstack/start-plugin-core/rsbuild": [ + "../start-plugin-core/dist-ts/rsbuild/index" + ], + "@tanstack/start-plugin-core/rsbuild/types": [ + "../start-plugin-core/dist-ts/rsbuild/types" + ], + "@tanstack/start-server-core": ["../start-server-core/dist-ts/index"], + "@tanstack/start-server-core/createServerRpc": [ + "../start-server-core/dist-ts/createServerRpc" + ], + "@tanstack/start-server-core/createSsrRpc": [ + "../start-server-core/dist-ts/createSsrRpc" + ], + "@tanstack/start-server-core/request-response": [ + "../start-server-core/dist-ts/request-response" + ], + "@tanstack/start-server-core/constants": [ + "../start-server-core/dist-ts/constants" + ], + "@tanstack/start-server-core/virtual-modules": [ + "../start-server-core/dist-ts/virtual-modules" + ], + "@tanstack/start-static-server-functions": [ + "../start-static-server-functions/dist-ts/index" + ], + "@tanstack/start-storage-context": [ + "../start-storage-context/dist-ts/index" + ], + "@tanstack/valibot-adapter": ["../valibot-adapter/dist-ts/index"], + "@tanstack/virtual-file-routes": ["../virtual-file-routes/dist-ts/index"], + "@tanstack/vue-router": ["../vue-router/dist-ts/index"], + "@tanstack/vue-router/ssr/server": ["../vue-router/dist-ts/ssr/server"], + "@tanstack/vue-router/ssr/client": ["../vue-router/dist-ts/ssr/client"], + "@tanstack/vue-router-devtools": ["../vue-router-devtools/dist-ts/index"], + "@tanstack/vue-router-ssr-query": [ + "../vue-router-ssr-query/dist-ts/index" + ], + "@tanstack/vue-start-client": ["../vue-start-client/dist-ts/index"], + "@tanstack/vue-start-server": ["../vue-start-server/dist-ts/index"], + "@tanstack/zod-adapter": ["../zod-adapter/dist-ts/index"] } }, "include": ["src/default-entry"] diff --git a/packages/zod-adapter/package.json b/packages/zod-adapter/package.json index f6c30ebf6c0..b0a61e1a987 100644 --- a/packages/zod-adapter/package.json +++ b/packages/zod-adapter/package.json @@ -24,7 +24,7 @@ "typescript" ], "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", + "clean": "rimraf ./dist ./dist-ts && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", @@ -36,6 +36,7 @@ "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack . && node ../../scripts/check-published-types.mjs", + "compile": "tsc6 -p tsconfig.internal.json", "build": "vite build" }, "type": "module", diff --git a/packages/zod-adapter/tsconfig.internal.json b/packages/zod-adapter/tsconfig.internal.json new file mode 100644 index 00000000000..1ea3c25e82c --- /dev/null +++ b/packages/zod-adapter/tsconfig.internal.json @@ -0,0 +1,16 @@ +// Generated by scripts/internal-types-config.mjs. Do not edit. +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "noEmit": false, + "stripInternal": false, + "rootDir": "./src", + "outDir": "./dist-ts", + "tsBuildInfoFile": "./dist-ts/tsconfig.internal.tsbuildinfo" + }, + "include": ["src"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] +} diff --git a/packages/zod-adapter/tsconfig.json b/packages/zod-adapter/tsconfig.json index 041d9fe354e..7bbc69865a5 100644 --- a/packages/zod-adapter/tsconfig.json +++ b/packages/zod-adapter/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx" }, - "include": ["src", "tests", "vite.config.ts"] + "include": ["src", "tests", "vite.config.ts"], + "references": [{ "path": "../react-router/tsconfig.internal.json" }] } From 1e39f9621dc283b61bfbe8feccc1a231710eadba Mon Sep 17 00:00:00 2001 From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:18:02 +0100 Subject: [PATCH 3/4] chore(nx): order type checks by compile instead of build Add a cached `compile` target default that depends on `^compile` and outputs `{projectRoot}/dist-ts`. For projects under packages/, `test:types` and `test:eslint` depend on `^compile` only and no longer on any Vite build, `build` adds `^compile` because its declaration step type-checks against the dependencies' internal set, and `test:unit` adds `^compile` for the Vitest type check while keeping `^build` for runtime. Examples, e2e projects and benchmarks keep their targets. packages/tsconfig.base.json and the map join `sharedGlobals`. Co-Authored-By: Claude Opus 5.5 --- nx.json | 128 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 42 deletions(-) diff --git a/nx.json b/nx.json index 6dc311cc0fe..c6b5d709948 100644 --- a/nx.json +++ b/nx.json @@ -17,7 +17,9 @@ "{workspaceRoot}/.nx/workflows/ultracache-config.yaml", "{workspaceRoot}/.nvmrc", "{workspaceRoot}/package.json", - "{workspaceRoot}/tsconfig.json" + "{workspaceRoot}/tsconfig.json", + "{workspaceRoot}/packages/tsconfig.base.json", + "{workspaceRoot}/packages/tsconfig.paths.json" ], "dependentTaskOutputs": [ { @@ -47,27 +49,43 @@ "cache": true, "inputs": ["sharedGlobals", "{workspaceRoot}/docs/**/*"] }, - "test:eslint": { - "cache": true, - "dependsOn": ["^build", "build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ] - }, - "test:unit": { - "cache": true, - "dependsOn": ["^build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ], - "outputs": ["{projectRoot}/coverage"] - }, + "test:eslint": [ + { + "cache": true, + "dependsOn": ["^build", "build"], + "inputs": [ + "default", + "^production", + "{workspaceRoot}/eslint.config.js", + "dependentTaskOutputs" + ] + }, + { + "filter": { + "projects": ["packages/*"] + }, + "dependsOn": ["^compile"] + } + ], + "test:unit": [ + { + "cache": true, + "dependsOn": ["^build"], + "inputs": [ + "default", + "^production", + "{workspaceRoot}/eslint.config.js", + "dependentTaskOutputs" + ], + "outputs": ["{projectRoot}/coverage"] + }, + { + "filter": { + "projects": ["packages/*"] + }, + "dependsOn": ["^build", "^compile"] + } + ], "test:e2e": { "cache": true, "dependsOn": ["^build", "test:e2e--*"], @@ -93,16 +111,24 @@ "inputs": ["default", "^production"], "parallelism": false }, - "test:types": { - "cache": true, - "dependsOn": ["^build", "build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ] - }, + "test:types": [ + { + "cache": true, + "dependsOn": ["^build", "build"], + "inputs": [ + "default", + "^production", + "{workspaceRoot}/eslint.config.js", + "dependentTaskOutputs" + ] + }, + { + "filter": { + "projects": ["packages/*"] + }, + "dependsOn": ["^compile"] + } + ], "test:types:client": { "cache": true, "inputs": [ @@ -133,18 +159,36 @@ "dependentTaskOutputs" ] }, - "build": { + "compile": { "cache": true, - "dependsOn": ["^build"], - "inputs": ["buildProduction", "^buildProduction", "dependentTaskOutputs"], - "outputs": [ - "{projectRoot}/.netlify", - "{projectRoot}/.wrangler", - "{projectRoot}/.output", - "{projectRoot}/build", - "{projectRoot}/dist" - ] + "dependsOn": ["^compile"], + "inputs": ["production", "dependentTaskOutputs"], + "outputs": ["{projectRoot}/dist-ts"] }, + "build": [ + { + "cache": true, + "dependsOn": ["^build"], + "inputs": [ + "buildProduction", + "^buildProduction", + "dependentTaskOutputs" + ], + "outputs": [ + "{projectRoot}/.netlify", + "{projectRoot}/.wrangler", + "{projectRoot}/.output", + "{projectRoot}/build", + "{projectRoot}/dist" + ] + }, + { + "filter": { + "projects": ["packages/*"] + }, + "dependsOn": ["^build", "^compile"] + } + ], "test:build": { "cache": true, "dependsOn": ["build"], From dad27eade3701060b29875216b2d4baedc30776a Mon Sep 17 00:00:00 2001 From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com> Date: Mon, 30 Nov 2026 02:18:02 +0100 Subject: [PATCH 4/4] docs(agents): describe compile and the internal declarations Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index f47b5103e19..32090c0c5d1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,8 @@ - For sandbox-blocked registry/store access, escalate the same command; report the blocker if unavailable. Do not change stores, delete dependencies/lockfiles, use `--force`/`--ignore-scripts`, or weaken workspace trust/build policies to bypass it. - Never manually edit `pnpm-lock.yaml` or any `routeTree.gen.ts`. Regenerate the lockfile with `pnpm install --no-frozen-lockfile` after intentional dependency changes; regenerate route trees through app builds/dev servers or the generator fixture harness. - Always use control-flow braces. Run `pnpm format` before validation. -- Use Nx: workspace imports consume built packages, so direct runners can test stale dependencies. Inspect resolved targets with `pnpm nx show project --json`; some are inferred. +- Use Nx: at runtime, workspace imports consume built packages, so direct runners can test stale dependencies. Inspect resolved targets with `pnpm nx show project --json`; some are inferred. +- In `packages/*`, type checks read a workspace dependency's `dist-ts`. Its `compile` target (`tsc6 -p tsconfig.internal.json`) writes that set with `stripInternal: false`, and `packages/tsconfig.paths.json` maps each `@tanstack/*` entry point to it for types only. Nx compiles the dependencies before `build`, `test:types`, `test:eslint` and `test:unit`; run `compile` for them yourself before a direct `tsc`, ESLint or editor check. After changing a package's `exports` or workspace dependencies, run `node scripts/internal-types-config.mjs` to regenerate the map, each `tsconfig.internal.json` and the `references`; the root `test:unit` fails while they are stale. A package's imports of its own specifiers map to its `src` in its `tsconfig.json`. - Run finite validation through `run-many` with explicit projects and targets, including a single project/target. Nx automatically selects `summary` output when it detects an AI agent: omit `--outputStyle` for normal runs. Read the reported full log files for failures; use `--outputStyle=summary` if agent detection is unavailable. - Use `--outputStyle=static` or `pnpm nx run :` only when diagnosing a task and its full output is needed. Continuous/watch targets may use live output.