From 2a11c7edd37a0cdcbca2d41addd8ba4955b26c0d Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Tue, 7 Nov 2023 16:04:40 +0200 Subject: [PATCH] fix(repo): Fallback to * for non-Clerk empty version packages in integration tests --- integration/models/applicationConfig.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/integration/models/applicationConfig.ts b/integration/models/applicationConfig.ts index 8e624a7e58d..f1fbc9151d2 100644 --- a/integration/models/applicationConfig.ts +++ b/integration/models/applicationConfig.ts @@ -57,10 +57,16 @@ export const applicationConfig = () => { addDependency: (name: string, version: string | undefined) => { if (version) { dependencies.set(name, version); + } else if (name.includes('@clerk/')) { + // find package folder using the package name + const packageNameDirectory = name.split('/').pop()?.replace('clerk-', ''); + dependencies.set(name, `file:${process.cwd()}/packages/${packageNameDirectory}`); } else { - const packageName = name.split('/').pop()?.replace('clerk-', ''); - dependencies.set(name, `file:${process.cwd()}/packages/${packageName}`); + // since we have moved the integrations outside the monorepo we should fallback to * in case + // of empty version for non Clerk packages (eg next should install the latest version) + dependencies.set(name, '*'); } + return self; }, commit: async (opts?: { stableHash?: string }) => {