Skip to content

Commit

Permalink
chore: prevent tsconfig.base.json from changing for dev and e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
r1tsuu committed Dec 28, 2024
1 parent 68a5f5c commit 236b2f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,5 @@ test/databaseAdapter.js
/filename-compound-index
/media-with-relation-preview
/media-without-relation-preview

tsconfig.generated.json
5 changes: 4 additions & 1 deletion test/testHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": ["./tsconfig.base.json", "./tsconfig.generated.json"],
"compilerOptions": {
"composite": false,
"noEmit": true,
Expand Down

0 comments on commit 236b2f7

Please sign in to comment.