mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Migrate nodes build system to tsup (no-changelog) (#14192)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||
import { PostgresChatMessageHistory } from '@langchain/community/stores/message/postgres';
|
||||
import { BufferMemory, BufferWindowMemory } from 'langchain/memory';
|
||||
import { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport';
|
||||
import { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport/index';
|
||||
import type { PostgresNodeCredentials } from 'n8n-nodes-base/dist/nodes/Postgres/v2/helpers/interfaces';
|
||||
import { postgresConnectionTest } from 'n8n-nodes-base/dist/nodes/Postgres/v2/methods/credentialTest';
|
||||
import type {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
type PGVectorStoreArgs,
|
||||
} from '@langchain/community/vectorstores/pgvector';
|
||||
import type { EmbeddingsInterface } from '@langchain/core/embeddings';
|
||||
import { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport';
|
||||
import { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport/index';
|
||||
import type { PostgresNodeCredentials } from 'n8n-nodes-base/dist/nodes/Postgres/v2/helpers/interfaces';
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import type pg from 'pg';
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
"clean": "rimraf dist .turbo",
|
||||
"dev": "pnpm run watch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && pnpm n8n-copy-static-files && pnpm n8n-generate-metadata",
|
||||
"copy-nodes-json": "node ../../nodes-base/scripts/copy-nodes-json.js .",
|
||||
"build": "tsup --tsconfig tsconfig.build.json && pnpm copy-nodes-json && tsc-alias -p tsconfig.build.json && pnpm n8n-copy-static-files && pnpm n8n-generate-metadata",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome ci .",
|
||||
"lint": "eslint nodes credentials utils --quiet",
|
||||
"lintfix": "eslint nodes credentials utils --fix",
|
||||
"watch": "tsc-watch -p tsconfig.build.json --onCompilationComplete \"tsc-alias -p tsconfig.build.json\" --onSuccess \"pnpm n8n-generate-metadata\"",
|
||||
"watch": "tsup --watch --tsconfig tsconfig.build.json --onSuccess \"pnpm copy-nodes-json && tsc-alias -p tsconfig.build.json && pnpm n8n-generate-metadata\"",
|
||||
"test": "jest",
|
||||
"test:dev": "jest --watch"
|
||||
},
|
||||
@@ -134,7 +135,8 @@
|
||||
"@types/pg": "^8.11.6",
|
||||
"@types/sanitize-html": "^2.11.0",
|
||||
"@types/temp": "^0.9.1",
|
||||
"n8n-core": "workspace:*"
|
||||
"n8n-core": "workspace:*",
|
||||
"tsup": "catalog:"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-sso-oidc": "3.666.0",
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
},
|
||||
"include": [
|
||||
"credentials/**/*.ts",
|
||||
"credentials/translations/**/*.json",
|
||||
"nodes/**/*.ts",
|
||||
"nodes/**/*.json",
|
||||
"credentials/translations/**/*.json",
|
||||
"types/*.ts"
|
||||
"test/**/*.ts",
|
||||
"types/**/*.ts",
|
||||
"utils/**/*.ts"
|
||||
],
|
||||
"exclude": ["nodes/**/*.test.ts", "test/**"]
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"@n8n/typescript-config/tsconfig.backend.json"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@utils/*": ["./utils/*"]
|
||||
},
|
||||
@@ -11,7 +12,14 @@
|
||||
// TODO: remove all options below this line
|
||||
"useUnknownInCatchVariables": false
|
||||
},
|
||||
"include": ["credentials/**/*", "nodes/**/*", "utils/**/*.ts", "nodes/**/*.json", "types/*.ts"],
|
||||
"include": [
|
||||
"credentials/**/*.ts",
|
||||
"nodes/**/*.ts",
|
||||
"nodes/**/*.json",
|
||||
"test/**/*.ts",
|
||||
"types/**/*.ts",
|
||||
"utils/**/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../../workflow/tsconfig.build.json" },
|
||||
{ "path": "../../core/tsconfig.build.json" }
|
||||
|
||||
11
packages/@n8n/nodes-langchain/tsup.config.ts
Normal file
11
packages/@n8n/nodes-langchain/tsup.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
entry: ['{credentials,nodes,test,types,utils}/**/*.ts', '!**/*.d.ts', '!**/*.test.ts'],
|
||||
format: ['cjs'],
|
||||
clean: true,
|
||||
dts: false,
|
||||
bundle: false,
|
||||
});
|
||||
Reference in New Issue
Block a user