From 236b2f7b15615979f5be723bfe7f75715b0c8626 Mon Sep 17 00:00:00 2001 From: Sasha <64744993+r1tsuu@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:31:14 +0200 Subject: [PATCH] chore: prevent `tsconfig.base.json` from changing for dev and e2e --- .gitignore | 2 ++ test/testHooks.ts | 5 ++++- tsconfig.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c4e5c6d72dd..a7a29d9feb3 100644 --- a/.gitignore +++ b/.gitignore @@ -317,3 +317,5 @@ test/databaseAdapter.js /filename-compound-index /media-with-relation-preview /media-without-relation-preview + +tsconfig.generated.json diff --git a/test/testHooks.ts b/test/testHooks.ts index 4d3ef594433..7c2fa015012 100644 --- a/test/testHooks.ts +++ b/test/testHooks.ts @@ -38,7 +38,10 @@ export const createTestHooks = async (testSuiteName = '_community') => { ? `./${testSuiteName}/config.ts` : `./test/${testSuiteName}/config.ts`, ] - await writeFile(tsConfigPath, stringify(tsConfig, null, 2) + '\n') + await writeFile( + path.resolve(path.dirname(tsConfigPath), 'tsconfig.generated.json'), + stringify(tsConfig, null, 2) + '\n', + ) process.env.PAYLOAD_CONFIG_PATH = path.resolve(dirname, testSuiteName, 'config.ts') }, diff --git a/tsconfig.json b/tsconfig.json index 4e940938e27..4651e004e94 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base.json", + "extends": ["./tsconfig.base.json", "./tsconfig.generated.json"], "compilerOptions": { "composite": false, "noEmit": true,