ci: Fix typescript incremental builds (no-changelog) (#7275)

`tsBuildInfoFile` is supposed to be relative to `tsconfig` like `outDir`
is.
Because of this, we are currently saving the TS incremental build cache
for all packages in the same file. This is likely causing issues where
the built backend code sometimes does not accurately map to the current
source code.

This PR changes the incremental build setup to keep the cache in
individual `dist` folders, like it used to be up until a 2 months ago,
before https://github.com/n8n-io/n8n/pull/6816.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-09-29 13:26:06 +02:00 committed by GitHub
parent 763d4514fa
commit f8406c04b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 17 additions and 9 deletions

View file

@ -2,7 +2,8 @@
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"], "extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"compilerOptions": { "compilerOptions": {
"rootDir": "src", "rootDir": "src",
"outDir": "dist" "outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["test/**"] "exclude": ["test/**"]

View file

@ -2,7 +2,8 @@
"extends": ["./tsconfig.json", "../../tsconfig.build.json"], "extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": { "compilerOptions": {
"rootDir": "src", "rootDir": "src",
"outDir": "dist" "outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["test/**"] "exclude": ["test/**"]

View file

@ -10,6 +10,7 @@
"@/*": ["./*"], "@/*": ["./*"],
"@db/*": ["./databases/*"] "@db/*": ["./databases/*"]
}, },
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
// TODO: remove all options below this line // TODO: remove all options below this line
"strict": false, "strict": false,
"noUnusedLocals": false, "noUnusedLocals": false,

View file

@ -2,7 +2,8 @@
"extends": ["./tsconfig.json", "../../tsconfig.build.json"], "extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": { "compilerOptions": {
"rootDir": "src", "rootDir": "src",
"outDir": "dist" "outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["test/**"] "exclude": ["test/**"]

View file

@ -7,6 +7,7 @@
"paths": { "paths": {
"@/*": ["./*"] "@/*": ["./*"]
}, },
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
// TODO: remove all options below this line // TODO: remove all options below this line

View file

@ -3,6 +3,7 @@
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"preserveSymlinks": true, "preserveSymlinks": true,
"tsBuildInfoFile": "dist/build.tsbuildinfo",
// TODO: remove all options below this line // TODO: remove all options below this line
"noUnusedLocals": false, "noUnusedLocals": false,
"useUnknownInCatchVariables": false "useUnknownInCatchVariables": false

View file

@ -1,7 +1,8 @@
{ {
"extends": ["./tsconfig.json", "../../tsconfig.build.json"], "extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": { "compilerOptions": {
"outDir": "dist" "outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"include": [ "include": [
"credentials/**/*.ts", "credentials/**/*.ts",

View file

@ -6,6 +6,7 @@
"@test/*": ["./test/*"], "@test/*": ["./test/*"],
"@utils/*": ["./utils/*"] "@utils/*": ["./utils/*"]
}, },
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
// TODO: remove all options below this line // TODO: remove all options below this line
"noImplicitReturns": false, "noImplicitReturns": false,
"useUnknownInCatchVariables": false "useUnknownInCatchVariables": false

View file

@ -2,7 +2,8 @@
"extends": ["./tsconfig.json", "../../tsconfig.build.json"], "extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": { "compilerOptions": {
"rootDir": "src", "rootDir": "src",
"outDir": "dist" "outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["test/**"] "exclude": ["test/**"]

View file

@ -7,6 +7,7 @@
"paths": { "paths": {
"@/*": ["./*"] "@/*": ["./*"]
}, },
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
// TODO: remove all options below this line // TODO: remove all options below this line
"useUnknownInCatchVariables": false "useUnknownInCatchVariables": false
}, },

View file

@ -1,7 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"types": ["node", "jest"], "types": ["node", "jest"],
"noEmit": true, "noEmit": true
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo"
} }
} }

View file

@ -2,8 +2,7 @@
"compilerOptions": { "compilerOptions": {
"types": ["node"], "types": ["node"],
"noEmit": false, "noEmit": false,
"declaration": true, "declaration": true
"tsBuildInfoFile": "dist/build.tsbuildinfo"
}, },
"tsc-alias": { "tsc-alias": {
"replacers": { "replacers": {