Skip to content

Commit

Permalink
refactor: Move tsconfig.*.json files to separate npm package (no-ch…
Browse files Browse the repository at this point in the history
…angelog) (#13426)
  • Loading branch information
alexgrozav authored Feb 25, 2025
1 parent 288cce6 commit 2f395fe
Show file tree
Hide file tree
Showing 62 changed files with 200 additions and 99 deletions.
1 change: 1 addition & 0 deletions packages/@n8n/api-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dist/**/*"
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@n8n/config": "workspace:*",
"n8n-workflow": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/api-types/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/api-types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"zx": "^8.1.4"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/convict": "^6.1.1",
"@types/k6": "^0.52.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/benchmark/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/benchmark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"baseUrl": "src",
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/client-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
],
"dependencies": {
"axios": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/client-oauth2/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/client-oauth2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/codemirror-lang/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@lezer/lr": "^1.4.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@lezer/generator": "^1.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/codemirror-lang/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/codemirror-lang/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo"
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"dependencies": {
"@n8n/di": "workspace:*",
"reflect-metadata": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"emitDecoratorMetadata": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/di/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
],
"dependencies": {
"reflect-metadata": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/di/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/di/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/imap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"uuencode": "0.0.4"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/imap": "^0.8.40",
"@types/quoted-printable": "^1.0.2",
"@types/utf8": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/imap/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/imap/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/json-schema-to-zod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"zod": "^3.0.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/json-schema": "^7.0.15",
"zod": "catalog:"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/json-schema-to-zod/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["../../../tsconfig.json"],
"extends": ["@n8n/typescript-config/tsconfig.common.json"],
"compilerOptions": {
"rootDir": ".",
"baseUrl": "src",
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/nodes-langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"@mozilla/readability": "0.5.0",
"@n8n/json-schema-to-zod": "workspace:*",
"@n8n/typeorm": "0.3.20-12",
"@n8n/typescript-config": "workspace:*",
"@n8n/vm2": "3.9.25",
"@pinecone-database/pinecone": "4.0.0",
"@qdrant/js-client-rest": "1.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/nodes-langchain/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/nodes-langchain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"paths": {
"@utils/*": ["./utils/*"]
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/permissions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
]
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/task-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"ws": "^8.18.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/lodash": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/task-runner/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/task-runner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"emitDecoratorMetadata": true,
Expand Down
19 changes: 19 additions & 0 deletions packages/@n8n/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@n8n/typescript-config",
"version": "1.1.0",
"type": "module",
"files": [
"tsconfig.backend.json",
"tsconfig.build.json",
"tsconfig.common.json",
"tsconfig.frontend.json"
],
"exports": {
"./tsconfig.backend.json": "./tsconfig.backend.json",
"./tsconfig.build.json": "./tsconfig.build.json",
"./tsconfig.common.json": "./tsconfig.common.json",
"./tsconfig.frontend.json": "./tsconfig.frontend.json",
"./*": "./*"
},
"license": "See LICENSE.md file in the root of the repository"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./tsconfig.common.json",
"compilerOptions": {
"types": ["node", "jest"]
}
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions packages/@n8n/typescript-config/tsconfig.common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"strict": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es2021",
"lib": ["es2021", "es2022.error", "dom"],
"removeComments": true,
"useUnknownInCatchVariables": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"preserveConstEnums": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"incremental": true,
"declaration": false,
"sourceMap": true,
"skipLibCheck": true
},
"files": ["../../../node_modules/jest-expect-message/types/index.d.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.json",
"extends": "./tsconfig.common.json",
"compilerOptions": {
"target": "esnext",
"module": "esnext",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"!dist/**/e2e.*"
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@redocly/cli": "^1.25.5",
"@types/aws4": "^1.5.1",
"@types/bcryptjs": "^2.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../tsconfig.json", "../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"emitDecoratorMetadata": true,
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"bin"
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/aws4": "^1.5.1",
"@types/concat-stream": "^2.0.0",
"@types/express": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../tsconfig.json", "../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"baseUrl": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"devDependencies": {
"@n8n/frontend-eslint-config": "workspace:*",
"@n8n/frontend-typescript-config": "workspace:*",
"@n8n/frontend-vitest-config": "workspace:*",
"@n8n/typescript-config": "workspace:*",
"@n8n/storybook": "workspace:*",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/user-event": "^14.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@n8n/frontend-typescript-config",
"extends": "@n8n/typescript-config/tsconfig.frontend.json",
"compilerOptions": {
"baseUrl": ".",
"rootDirs": [".", "../../frontend/@n8n/composables/src"],
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"devDependencies": {
"@n8n/frontend-eslint-config": "workspace:*",
"@n8n/frontend-vitest-config": "workspace:*",
"@n8n/frontend-typescript-config": "workspace:*",
"@n8n/typescript-config": "workspace:*",
"@faker-js/faker": "^8.0.2",
"@iconify/json": "^2.2.228",
"@pinia/testing": "^0.1.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@n8n/frontend-typescript-config",
"extends": "@n8n/typescript-config/tsconfig.frontend.json",
"compilerOptions": {
"baseUrl": ".",
"rootDirs": [
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/@n8n/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"devDependencies": {
"@iconify-json/mdi": "^1.1.54",
"@n8n/storybook": "workspace:*",
"@n8n/typescript-config": "workspace:*",
"@vitejs/plugin-vue": "catalog:frontend",
"@vitest/coverage-v8": "catalog:frontend",
"unplugin-icons": "^0.19.0",
Expand Down
Loading

0 comments on commit 2f395fe

Please sign in to comment.