From 4b553ad4defcee1d8117e75642cc0cdf4791ec1f Mon Sep 17 00:00:00 2001 From: Robert Fidler Date: Wed, 14 Oct 2026 01:25:18 -0400 Subject: [PATCH 1/2] [build-config] Enable tsconfig paths in shared Vite presets --- .changeset/bright-paths-resolve.md | 6 ++++++ packages/build-config/README.md | 3 ++- packages/build-config/src/index.test.ts | 19 +++++++++++++++++++ packages/build-config/src/index.ts | 3 +++ .../src/index.test.ts | 1 + .../tanstack-start-build-config/src/index.ts | 1 - 6 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .changeset/bright-paths-resolve.md diff --git a/.changeset/bright-paths-resolve.md b/.changeset/bright-paths-resolve.md new file mode 100644 index 00000000..98a5edf7 --- /dev/null +++ b/.changeset/bright-paths-resolve.md @@ -0,0 +1,6 @@ +--- +"@party-stack/build-config": patch +"@party-stack/tanstack-start-build-config": patch +--- + +Enable TypeScript path resolution by default in the shared app and library Vite configs. Preserve the default when merging caller resolve options, allow explicit opt-outs, and have the TanStack Start preset inherit the shared setting. diff --git a/packages/build-config/README.md b/packages/build-config/README.md index 9d6add90..3a7537b9 100644 --- a/packages/build-config/README.md +++ b/packages/build-config/README.md @@ -22,6 +22,7 @@ The preset provides: - `check`, `build`, and `test` tasks, ordered after their prerequisites. - Unbundled ESM, declarations, and source maps in `lib` through `vp pack`. - Vitest discovery under `src`, with package-specific test options. +- TypeScript path resolution through `resolve.tsconfigPaths` for libraries and apps. - Strict TypeScript settings targeting ES2022, with Node and DOM types. Apps use `defineAppConfig` from the same package. It provides check/build/test/dev @@ -31,7 +32,7 @@ plugins and app-specific settings in the caller. Apps can extend TanStack Start apps use `@party-stack/tanstack-start-build-config` for framework plugins, React Compiler, Tailwind, and the app TSConfig together. -Package options override the defaults. Individual task options are merged; +Package options override the defaults. Resolve and individual task options are merged; arrays and task cache options replace their defaults. Lint and formatting remain in the workspace root. diff --git a/packages/build-config/src/index.test.ts b/packages/build-config/src/index.test.ts index 6561c5c4..6bafb659 100644 --- a/packages/build-config/src/index.test.ts +++ b/packages/build-config/src/index.test.ts @@ -1,6 +1,25 @@ import { describe, expect, it } from "vite-plus/test"; import { defineAppConfig, defineLibraryConfig } from "./index.js"; +describe.each([ + ["library", defineLibraryConfig], + ["app", defineAppConfig], +] as const)("%s resolution defaults", (_name, defineConfig) => { + it("enables tsconfig paths by default", () => { + expect(defineConfig().resolve?.tsconfigPaths).toBe(true); + }); + + it("preserves tsconfig paths with caller aliases", () => { + const alias = { "@app": "/src" }; + expect(defineConfig({ resolve: { alias } }).resolve).toEqual({ tsconfigPaths: true, alias }); + }); + + it("allows callers to disable tsconfig paths", () => { + expect(defineConfig({ resolve: { tsconfigPaths: false } }).resolve?.tsconfigPaths).toBe(false); + expect(defineConfig().resolve?.tsconfigPaths).toBe(true); + }); +}); + describe("library config composition", () => { it("keeps prerequisites and packaging when a package overrides its commands", () => { const config = defineLibraryConfig({ diff --git a/packages/build-config/src/index.ts b/packages/build-config/src/index.ts index ea1de05f..362a151c 100644 --- a/packages/build-config/src/index.ts +++ b/packages/build-config/src/index.ts @@ -18,6 +18,7 @@ export type LibraryConfig = Omit & { */ export function defineLibraryConfig(config: LibraryConfig = {}): ViteUserConfig { const base = defineConfig({ + resolve: { tsconfigPaths: true }, run: { tasks: { check: { @@ -64,6 +65,7 @@ export type AppConfig = LibraryConfig; export function defineAppConfig(config: AppConfig = {}): ViteUserConfig { return composeConfig( defineConfig({ + resolve: { tsconfigPaths: true }, run: { tasks: { check: { @@ -110,6 +112,7 @@ function composeConfig(base: ViteUserConfig, config: LibraryConfig): ViteUserCon return { ...base, ...config, + resolve: { ...base.resolve, ...config.resolve }, ...(base.pack || config.pack ? { pack: Array.isArray(config.pack) diff --git a/packages/tanstack-start-build-config/src/index.test.ts b/packages/tanstack-start-build-config/src/index.test.ts index 6c1a83f6..3d38ed07 100644 --- a/packages/tanstack-start-build-config/src/index.test.ts +++ b/packages/tanstack-start-build-config/src/index.test.ts @@ -27,6 +27,7 @@ describe("TanStack Start config", () => { expect(config.plugins?.[1]).toEqual({ name: "worktreeDev" }); expect(devtools).toHaveBeenCalledWith({ consolePiping: { enabled: false } }); expect(config.server).toEqual({ port: 3000 }); + expect(config.resolve?.tsconfigPaths).toBe(true); expect(config.build).toMatchObject({ sourcemap: true }); expect(config.run?.tasks?.dev).toMatchObject({ command: "vp dev --host", diff --git a/packages/tanstack-start-build-config/src/index.ts b/packages/tanstack-start-build-config/src/index.ts index ee5b01ff..3e3a85a2 100644 --- a/packages/tanstack-start-build-config/src/index.ts +++ b/packages/tanstack-start-build-config/src/index.ts @@ -16,7 +16,6 @@ export function defineAppConfig(config: TanStackStartConfig = {}): ViteUserConfi const { start, plugins, worktreeDev: worktreeDevOptions, ...appConfig } = config; return defineBaseAppConfig({ ...appConfig, - resolve: { tsconfigPaths: true, ...appConfig.resolve }, plugins: lazyPlugins(() => [ plugins, worktreeDevOptions !== false && worktreeDev(worktreeDevOptions), From f793b8d9cf56f8b27a8195aaeea7deb881c5fc1f Mon Sep 17 00:00:00 2001 From: Robert Fidler Date: Wed, 14 Oct 2026 01:31:26 -0400 Subject: [PATCH 2/2] [monorepo] Exclude old packages from Changesets and publishing --- .changeset/config.json | 10 +++++++++- old/apollo/package.json | 1 + old/foundry-graphql-schema/package.json | 1 + old/foundry-graphql/package.json | 1 + old/osdk-react/package.json | 1 + old/osdk-utils/package.json | 1 + 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index cad40068..7d3025a5 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,13 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": [ + "@bobbyfidz/apollo", + "@bobbyfidz/foundry-graphql", + "@bobbyfidz/foundry-graphql-schema", + "@bobbyfidz/foundry-graphql-server", + "@bobbyfidz/osdk-react", + "@bobbyfidz/osdk-react-todo-app", + "@bobbyfidz/osdk-utils" + ] } diff --git a/old/apollo/package.json b/old/apollo/package.json index 4f10a0fe..558202c9 100644 --- a/old/apollo/package.json +++ b/old/apollo/package.json @@ -1,6 +1,7 @@ { "name": "@bobbyfidz/apollo", "version": "0.3.1", + "private": true, "files": [ "lib" ], diff --git a/old/foundry-graphql-schema/package.json b/old/foundry-graphql-schema/package.json index d9f42f6b..26361da3 100644 --- a/old/foundry-graphql-schema/package.json +++ b/old/foundry-graphql-schema/package.json @@ -1,6 +1,7 @@ { "name": "@bobbyfidz/foundry-graphql-schema", "version": "0.2.6", + "private": true, "files": [ "lib" ], diff --git a/old/foundry-graphql/package.json b/old/foundry-graphql/package.json index 3bad2ed6..32a6a7f4 100644 --- a/old/foundry-graphql/package.json +++ b/old/foundry-graphql/package.json @@ -1,6 +1,7 @@ { "name": "@bobbyfidz/foundry-graphql", "version": "0.1.6", + "private": true, "bin": { "foundry-graphql": "./bin/run.js" }, diff --git a/old/osdk-react/package.json b/old/osdk-react/package.json index 8996e850..079b6feb 100644 --- a/old/osdk-react/package.json +++ b/old/osdk-react/package.json @@ -1,6 +1,7 @@ { "name": "@bobbyfidz/osdk-react", "version": "0.13.1", + "private": true, "files": [ "lib" ], diff --git a/old/osdk-utils/package.json b/old/osdk-utils/package.json index a9b0c464..c95ef9f9 100644 --- a/old/osdk-utils/package.json +++ b/old/osdk-utils/package.json @@ -1,6 +1,7 @@ { "name": "@bobbyfidz/osdk-utils", "version": "0.2.2", + "private": true, "files": [ "lib" ],