From 23eab26a52fd4d15de7c9656687d0f230a51916a Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 25 Jul 2024 19:23:22 -0700 Subject: [PATCH 1/2] fix: use pnpm host mode to resolve tsc compatibility issues --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 0b634b898..308555701 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ auto-install-peers=true git-checks=false +node-linker=hoisted From 21f620237f380c407fb442221238139cf3b26b3a Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 25 Jul 2024 19:43:11 -0700 Subject: [PATCH 2/2] skip lib check when compiling ts files --- packages/plugins/trpc/src/project.ts | 1 + packages/schema/tests/generator/expression-writer.test.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/plugins/trpc/src/project.ts b/packages/plugins/trpc/src/project.ts index 0a87ba912..2f1ea4c0f 100644 --- a/packages/plugins/trpc/src/project.ts +++ b/packages/plugins/trpc/src/project.ts @@ -6,6 +6,7 @@ const compilerOptions: CompilerOptions = { emitDecoratorMetadata: true, experimentalDecorators: true, esModuleInterop: true, + skipLibCheck: true, }; export const project = new Project({ diff --git a/packages/schema/tests/generator/expression-writer.test.ts b/packages/schema/tests/generator/expression-writer.test.ts index 63254047f..af7cf576c 100644 --- a/packages/schema/tests/generator/expression-writer.test.ts +++ b/packages/schema/tests/generator/expression-writer.test.ts @@ -1332,7 +1332,9 @@ async function check(schema: string, getExpr: (model: DataModel) => Expression, const model = await loadModel(schema); const expr = getExpr(model.declarations.find((d) => isDataModel(d) && d.name === 'Test') as DataModel); - const project = new Project(); + const project = new Project({ + compilerOptions: { skipLibCheck: true }, + }); const { name: sourcePath } = tmp.fileSync({ postfix: '.ts' }); const sf = project.createSourceFile(sourcePath, undefined, {