Skip to content

Commit

Permalink
fix(repo): Fallback to * for non-Clerk empty version packages in inte…
Browse files Browse the repository at this point in the history
…gration tests
  • Loading branch information
dimkl committed Nov 8, 2023
1 parent 23aa0f5 commit 2a11c7e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions integration/models/applicationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down

0 comments on commit 2a11c7e

Please sign in to comment.