feat: Migrate build system to rolldown in Front End packages (no-changelog) (#20717)

This commit is contained in:
Alex Grozav
2025-10-14 13:26:54 +03:00
committed by GitHub
parent 424cf05b8c
commit 6883d95c76
27 changed files with 1141 additions and 461 deletions
-1
View File
@@ -46,7 +46,6 @@
"eslint-plugin-unused-imports": "^4.1.4",
"eslint-plugin-vue": "^10.2.0",
"globals": "^16.2.0",
"tsup": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "^8.35.0",
"vitest": "catalog:"
+3 -2
View File
@@ -31,11 +31,11 @@
},
"scripts": {
"clean": "rimraf dist",
"dev": "tsup --watch",
"dev": "tsdown --watch",
"lint": "eslint . --quiet",
"typecheck:frontend": "vue-tsc --noEmit --project tsconfig.frontend.json",
"typecheck:backend": "tsc --noEmit --project tsconfig.backend.json",
"build": "pnpm \"/^typecheck:.+/\" && pnpm clean && tsup && pnpm create-json-schema",
"build": "pnpm \"/^typecheck:.+/\" && pnpm clean && tsdown && pnpm create-json-schema",
"create-json-schema": "tsx scripts/create-json-schema.ts",
"preview": "vite preview"
},
@@ -47,6 +47,7 @@
"@n8n/typescript-config": "workspace:*",
"@vitejs/plugin-vue": "catalog:frontend",
"@vue/tsconfig": "catalog:frontend",
"tsdown": "catalog:",
"rimraf": "catalog:",
"vite": "catalog:",
"vue": "catalog:frontend",
@@ -1,6 +1,8 @@
{
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"composite": true,
"declaration": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.backend.tsbuildinfo"
},
"include": ["src/backend/**/*.ts"]
@@ -1,6 +1,8 @@
{
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"composite": true,
"declaration": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.backend.tsbuildinfo"
},
"include": ["src/*.ts"]
@@ -1,6 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"composite": true,
"declaration": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.frontend.tsbuildinfo"
},
"include": ["src/frontend/**/*.ts", "src/frontend/**/*.vue"]
@@ -1,5 +1,6 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
// eslint-disable-next-line import-x/no-default-export
export default defineConfig([
{
clean: false,
+1 -1
View File
@@ -164,7 +164,7 @@
"fast-glob": "catalog:",
"jest-mock-extended": "^3.0.4",
"n8n-core": "workspace:*",
"tsup": "catalog:"
"tsup": "^8.5.0"
},
"dependencies": {
"@aws-sdk/client-sso-oidc": "3.808.0",
+3 -3
View File
@@ -18,8 +18,8 @@
}
},
"scripts": {
"dev": "vite",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsdown",
"preview": "vite preview",
"typecheck": "tsc --noEmit",
"test": "vitest run",
@@ -35,7 +35,7 @@
"@n8n/vitest-config": "workspace:*",
"@testing-library/jest-dom": "catalog:frontend",
"@testing-library/user-event": "catalog:frontend",
"tsup": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
+1 -1
View File
@@ -7,5 +7,5 @@
"types": ["vite/client", "vitest/globals"],
"isolatedModules": true
},
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsup.config.ts"]
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsdown.config.ts"]
}
@@ -1,11 +1,9 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__**/*'],
format: ['cjs', 'esm'],
clean: true,
dts: true,
cjsInterop: true,
splitting: true,
sourcemap: true,
});
+3 -2
View File
@@ -29,7 +29,7 @@
},
"scripts": {
"cleanup": "rimraf dist",
"dev": "vite",
"dev": "tsdown --watch",
"lint": "eslint src --quiet",
"lint:fix": "eslint src --fix",
"lint:styles": "run-script-os",
@@ -39,7 +39,7 @@
"lint:styles:fix:default": "stylelint \"src/**/*.{scss,sass,vue}\" --fix --cache --custom-formatter $(pwd)/../../../packages/@n8n/stylelint-config/dist/formatter-summary.js",
"lint:styles:fix:windows": "stylelint \"src/**/*.{scss,sass,vue}\" --fix --cache --custom-formatter \"%cd%/../../../packages/@n8n/stylelint-config/dist/formatter-summary.js\"",
"typecheck": "vue-tsc --noEmit",
"build:backend": "tsup",
"build:backend": "tsdown",
"build:frontend": "vite build",
"build": "pnpm cleanup && pnpm run \"/^build:.*/\"",
"preview": "vite preview"
@@ -57,6 +57,7 @@
"@n8n/typescript-config": "workspace:*",
"@vitejs/plugin-vue": "catalog:frontend",
"@vue/tsconfig": "catalog:frontend",
"tsdown": "catalog:",
"rimraf": "catalog:",
"vite": "catalog:",
"vue": "catalog:frontend",
@@ -7,7 +7,6 @@
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"strict": true,
@@ -16,5 +15,5 @@
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
"include": ["vite.config.ts", "tsdown.config.ts"]
}
@@ -1,4 +1,4 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: [
@@ -13,8 +13,8 @@
}
},
"scripts": {
"dev": "vite",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsdown",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"test": "vitest run",
@@ -35,7 +35,7 @@
"@vue/tsconfig": "catalog:frontend",
"@vueuse/core": "catalog:frontend",
"vue": "catalog:frontend",
"tsup": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
@@ -7,5 +7,5 @@
"types": ["vite/client", "vitest/globals"],
"isolatedModules": true
},
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsup.config.ts"]
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsdown.config.ts"]
}
@@ -1,11 +1,10 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
// eslint-disable-next-line import-x/no-default-export
export default defineConfig({
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__/**/*'],
format: ['cjs', 'esm'],
clean: true,
dts: true,
cjsInterop: true,
splitting: true,
sourcemap: true,
});
+3 -3
View File
@@ -21,8 +21,8 @@
}
},
"scripts": {
"dev": "vite",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsdown",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"test": "vitest run",
@@ -47,7 +47,7 @@
"@vue/tsconfig": "catalog:frontend",
"@vueuse/core": "catalog:frontend",
"vue": "catalog:frontend",
"tsup": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
+1 -1
View File
@@ -8,5 +8,5 @@
"isolatedModules": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsup.config.ts"]
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsdown.config.ts"]
}
@@ -1,11 +1,9 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__/**/*'],
format: ['cjs', 'esm'],
clean: true,
dts: true,
cjsInterop: true,
splitting: true,
sourcemap: true,
});
@@ -21,8 +21,8 @@
}
},
"scripts": {
"dev": "vite",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsdown",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"test": "vitest run",
@@ -49,7 +49,7 @@
"@n8n/vitest-config": "workspace:*",
"@testing-library/jest-dom": "catalog:frontend",
"@testing-library/user-event": "catalog:frontend",
"tsup": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
@@ -10,5 +10,5 @@
"@n8n/utils/*": ["../../../@n8n/utils/src/*"]
}
},
"include": ["src/**/*.ts", "vite.config.ts", "tsup.config.ts"]
"include": ["src/**/*.ts", "vite.config.ts", "tsdown.config.ts"]
}
@@ -1,11 +1,9 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__/**/*'],
format: ['cjs', 'esm'],
clean: true,
dts: true,
cjsInterop: true,
splitting: true,
sourcemap: true,
});
+3 -3
View File
@@ -21,8 +21,8 @@
}
},
"scripts": {
"dev": "vite",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsdown",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"test": "vitest run",
@@ -47,7 +47,7 @@
"@vueuse/core": "catalog:frontend",
"pinia": "catalog:frontend",
"vue": "catalog:frontend",
"tsup": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
+1 -1
View File
@@ -7,5 +7,5 @@
"types": ["vite/client", "vitest/globals"],
"isolatedModules": true
},
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsup.config.ts"]
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsdown.config.ts"]
}
@@ -1,11 +1,9 @@
import { defineConfig } from 'tsup';
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__/**/*'],
format: ['cjs', 'esm'],
clean: true,
dts: true,
cjsInterop: true,
splitting: true,
sourcemap: true,
});
+1096 -414
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -46,11 +46,11 @@ catalog:
picocolors: 1.0.1
reflect-metadata: 0.2.2
rimraf: 6.0.1
tsup: ^8.5.0
tsdown: ^0.15.6
tsx: ^4.19.3
simple-git: 3.28.0
uuid: 10.0.0
vite: ^6.3.5
vite: npm:rolldown-vite@latest
vite-plugin-dts: ^4.5.4
vitest: ^3.1.3
vitest-mock-extended: ^3.1.0