From 4417b7ade9e0dc5ece04a9d2399b7fcfae571ff0 Mon Sep 17 00:00:00 2001 From: Kylesoda <249518290+kylesoda@users.noreply.github.com> Date: Fri, 20 Feb 2026 21:08:20 -0500 Subject: [PATCH] fix: update TypeScript configuration for correct root directory and test exclusion --- package.json | 3 ++- tsconfig.build.json | 4 ++-- tsconfig.json | 8 +++++--- vitest.config.ts | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0fe3f59..21c72ab 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "build": "rimraf ./dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json", - "prepare": "pnpm build" + "prepare": "pnpm build", + "test": "vitest" }, "keywords": [], "author": "", diff --git a/tsconfig.build.json b/tsconfig.build.json index 9f34180..d8f72e1 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,10 +1,10 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "rootDir": "./src", + "rootDir": "./lib", }, "exclude": [ - "tests/**/*", + "*.test.ts", "vitest.config.ts", ] } diff --git a/tsconfig.json b/tsconfig.json index 3318180..2389261 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "baseUrl": "./", "paths": { "@/*": [ - "./src/*" + "lib/*" ] }, "plugins": [ @@ -31,10 +31,12 @@ "transform": "typescript-transform-paths", "afterDeclarations": true } + ], + "typeRoots": [ + "lib/types" ] }, "include": [ - "src/**/*", - "tests/**/*", + "lib/**/*", ], } diff --git a/vitest.config.ts b/vitest.config.ts index e9232c4..a7230d1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ resolve: { alias: { - '@': path.resolve(__dirname, './src'), + '@': path.resolve(__dirname, './lib'), }, }, test: {