fix: Update tsdown and packages imports/exports (no-changelog) (#21935)

This commit is contained in:
Alex Grozav 2025-11-17 16:36:22 +02:00 committed by GitHub
parent e0e15bf444
commit 323468a697
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 328 additions and 280 deletions

View File

@ -1,5 +1,6 @@
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('get-tsconfig').getTsconfig().config;
const { resolve } = require('path');
/** @type {import('ts-jest').TsJestGlobalOptions} */
const tsJestOptions = {
@ -42,11 +43,14 @@ const config = {
},
transformIgnorePatterns: [`/node_modules/(?!${esmDependenciesPattern})/`],
// This resolve the path mappings from the tsconfig relative to each jest.config.js
moduleNameMapper: compilerOptions?.paths
? pathsToModuleNameMapper(compilerOptions.paths, {
prefix: `<rootDir>${compilerOptions.baseUrl ? `/${compilerOptions.baseUrl.replace(/^\.\//, '')}` : ''}`,
})
: {},
moduleNameMapper: {
'^@n8n/utils$': resolve(__dirname, 'packages/@n8n/utils/dist/index.cjs'),
...(compilerOptions?.paths
? pathsToModuleNameMapper(compilerOptions.paths, {
prefix: `<rootDir>${compilerOptions.baseUrl ? `/${compilerOptions.baseUrl.replace(/^\.\//, '')}` : ''}`,
})
: {}),
},
setupFilesAfterEnv: ['jest-expect-message'],
collectCoverage: isCoverageEnabled,
coverageReporters: ['text-summary', 'lcov', 'html-spa'],

View File

@ -1,4 +1,4 @@
import { sublimeSearch } from '@n8n/utils/dist/search/sublimeSearch';
import { sublimeSearch } from '@n8n/utils';
import type { INodeTypeDescription, NodeConnectionType } from 'n8n-workflow';
import { NodeConnectionTypes } from 'n8n-workflow';

View File

@ -9,22 +9,22 @@
"README.md"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./backend": {
"types": "./dist/backend/index.d.ts",
"import": "./dist/backend/index.js",
"types": "./dist/backend/index.d.mts",
"import": "./dist/backend/index.mjs",
"require": "./dist/backend/index.cjs"
},
"./frontend": {
"types": "./dist/frontend/index.d.ts",
"import": "./dist/frontend/index.js",
"types": "./dist/frontend/index.d.mts",
"import": "./dist/frontend/index.mjs",
"require": "./dist/frontend/index.cjs"
},
"./*": "./*"

View File

@ -10,6 +10,7 @@ export default defineConfig([
dts: true,
sourcemap: true,
tsconfig: 'tsconfig.common.json',
hash: false,
},
{
clean: false,
@ -24,6 +25,7 @@ export default defineConfig([
dts: true,
sourcemap: true,
tsconfig: 'tsconfig.backend.json',
hash: false,
},
{
clean: false,
@ -38,5 +40,6 @@ export default defineConfig([
dts: true,
sourcemap: true,
tsconfig: 'tsconfig.frontend.json',
hash: false,
},
]);

View File

@ -5,15 +5,23 @@
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./dist/*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
},

View File

@ -0,0 +1,9 @@
export * from './assert';
export * from './event-bus';
export * from './event-queue';
export * from './retry';
export * from './number/smartDecimal';
export * from './search/reRankSearchResults';
export * from './search/sublimeSearch';
export * from './sort/sortByProperty';
export * from './string/truncate';

View File

@ -6,4 +6,5 @@ export default defineConfig({
clean: true,
dts: true,
sourcemap: true,
hash: false,
});

View File

@ -16,13 +16,13 @@
"require": "./n8n.manifest.json"
},
"./backend": {
"types": "./dist/backend/index.d.ts",
"import": "./dist/backend/index.js",
"types": "./dist/backend/index.d.mts",
"import": "./dist/backend/index.mjs",
"require": "./dist/backend/index.cjs"
},
"./frontend": {
"types": "./dist/frontend/index.d.ts",
"import": "./dist/frontend/index.js",
"types": "./dist/frontend/index.d.mts",
"import": "./dist/frontend/index.mjs",
"require": "./dist/frontend/index.umd.cjs"
},
"./*": "./*"

View File

@ -12,4 +12,5 @@ export default defineConfig({
dts: true,
sourcemap: true,
tsconfig: 'tsconfig.backend.json',
hash: false,
});

View File

@ -7,8 +7,8 @@
],
"exports": {
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
},

View File

@ -7,4 +7,5 @@ export default defineConfig({
clean: true,
dts: true,
sourcemap: true,
hash: false,
});

View File

@ -6,17 +6,17 @@
"dist"
],
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.mjs",
"types": "dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
},

View File

@ -6,4 +6,5 @@ export default defineConfig({
clean: true,
dts: true,
sourcemap: true,
hash: false,
});

View File

@ -6,17 +6,17 @@
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
},

View File

@ -6,4 +6,5 @@ export default defineConfig({
clean: true,
dts: true,
sourcemap: true,
hash: false,
});

View File

@ -6,17 +6,17 @@
"dist"
],
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.mjs",
"types": "dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"types": "./dist/*.d.mts",
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
},

View File

@ -6,4 +6,5 @@ export default defineConfig({
clean: true,
dts: true,
sourcemap: true,
hash: false,
});

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ catalog:
rimraf: 6.0.1
run-script-os: 1.1.6
simple-git: 3.28.0
tsdown: ^0.15.6
tsdown: ^0.16.5
tsx: ^4.19.3
typescript: 5.9.2
uuid: 10.0.0
@ -70,7 +70,7 @@ catalogs:
'@vue/tsconfig': ^0.7.0
'@vueuse/core': ^10.11.0
element-plus: 2.4.3
highlight.js: ^11.8.0
highlight.js: 11.8.0
pinia: ^2.2.4
unplugin-icons: ^0.19.0
vue: ^3.5.13