From 7d6ec6544eea2e5a45e3482b14345072d6a0db48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 12 Sep 2024 11:14:03 +0200 Subject: [PATCH] fix(core): Fix the type for InstalledNodes.latestVersion (no-changelog) (#10782) --- packages/cli/src/databases/entities/installed-nodes.ts | 2 +- .../src/databases/repositories/installed-packages.repository.ts | 2 +- packages/cli/test/integration/security-audit/utils.ts | 2 +- packages/cli/test/integration/shared/utils/community-nodes.ts | 2 +- packages/workflow/src/Interfaces.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/databases/entities/installed-nodes.ts b/packages/cli/src/databases/entities/installed-nodes.ts index bed9175095..271dbe3ec2 100644 --- a/packages/cli/src/databases/entities/installed-nodes.ts +++ b/packages/cli/src/databases/entities/installed-nodes.ts @@ -10,7 +10,7 @@ export class InstalledNodes { type: string; @Column() - latestVersion: string; + latestVersion: number; @ManyToOne('InstalledPackages', 'installedNodes') @JoinColumn({ name: 'package', referencedColumnName: 'packageName' }) diff --git a/packages/cli/src/databases/repositories/installed-packages.repository.ts b/packages/cli/src/databases/repositories/installed-packages.repository.ts index 245b00e43b..bb1beae952 100644 --- a/packages/cli/src/databases/repositories/installed-packages.repository.ts +++ b/packages/cli/src/databases/repositories/installed-packages.repository.ts @@ -35,7 +35,7 @@ export class InstalledPackagesRepository extends Repository { const installedNode = this.installedNodesRepository.create({ name: nodeTypes[loadedNode.name].type.description.displayName, type: loadedNode.name, - latestVersion: loadedNode.version.toString(), + latestVersion: loadedNode.version, package: { packageName }, }); diff --git a/packages/cli/test/integration/security-audit/utils.ts b/packages/cli/test/integration/security-audit/utils.ts index d87bb42b0a..d245b801e0 100644 --- a/packages/cli/test/integration/security-audit/utils.ts +++ b/packages/cli/test/integration/security-audit/utils.ts @@ -104,7 +104,7 @@ export const MOCK_PACKAGE: InstalledPackages[] = [ { name: 'My Test Node', type: 'myTestNode', - latestVersion: '1', + latestVersion: 1, } as InstalledNodes, ], }, diff --git a/packages/cli/test/integration/shared/utils/community-nodes.ts b/packages/cli/test/integration/shared/utils/community-nodes.ts index d1b4a83eba..ff47aeb5a5 100644 --- a/packages/cli/test/integration/shared/utils/community-nodes.ts +++ b/packages/cli/test/integration/shared/utils/community-nodes.ts @@ -22,7 +22,7 @@ export const mockNode = (packageName: string) => { return Container.get(InstalledNodesRepository).create({ name: nodeName, type: nodeName, - latestVersion: COMMUNITY_NODE_VERSION.CURRENT.toString(), + latestVersion: COMMUNITY_NODE_VERSION.CURRENT, package: { packageName }, }); }; diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index b63a549300..b5f224dfa2 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -2447,7 +2447,7 @@ export type PublicInstalledPackage = { export type PublicInstalledNode = { name: string; type: string; - latestVersion: string; + latestVersion: number; package: PublicInstalledPackage; };