Skip to content

Commit

Permalink
use path.join
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed May 10, 2024
1 parent 9fb8f25 commit d1e7fef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node-src/lib/findChangedDependencies.ts
Expand Up @@ -39,13 +39,13 @@ export const findChangedDependencies = async (ctx: Context) => {
ctx.log.debug({ rootPath, rootManifestPath, rootLockfilePath }, `Found manifest and lockfile`);

// Handle monorepos with (multiple) nested package.json files.
const nestedManifestPaths = await findFilesFromRepositoryRoot(`**/${PACKAGE_JSON}`);
const nestedManifestPaths = await findFilesFromRepositoryRoot(path.join('**', PACKAGE_JSON));
const metadataPathPairs = await Promise.all(
nestedManifestPaths.map(async (manifestPath) => {
const dirname = path.dirname(manifestPath);
const [lockfilePath] = await findFilesFromRepositoryRoot(
`${dirname}/${YARN_LOCK}`,
`${dirname}/${PACKAGE_LOCK}`
path.join(dirname, YARN_LOCK),
path.join(dirname, PACKAGE_LOCK)
);
// Fall back to the root lockfile if we can't find one in the same directory.
return [manifestPath, lockfilePath || rootLockfilePath];
Expand Down

0 comments on commit d1e7fef

Please sign in to comment.