diff --git a/get-changed-packages.ts b/get-changed-packages.ts index 9a49325..ab592f4 100644 --- a/get-changed-packages.ts +++ b/get-changed-packages.ts @@ -86,7 +86,10 @@ export let getChangedPackages = async ({ for (let item of tree.data.tree) { if (!item.path) continue; - if (item.path.endsWith("/package.json")) { + if ( + item.path === "package.json" || + item.path.endsWith("/package.json") + ) { let dirPath = nodePath.dirname(item.path); potentialWorkspaceDirectories.push(dirPath); } else if (item.path === "pnpm-workspace.yaml") { @@ -113,9 +116,9 @@ export let getChangedPackages = async ({ } let tool: | { - tool: Tool; - globs: string[]; - } + tool: Tool; + globs: string[]; + } | undefined; if (isPnpm) { @@ -190,8 +193,8 @@ export let getChangedPackages = async ({ changedPackages: (packages.tool === "root" ? packages.packages : packages.packages.filter((pkg) => - changedFiles.some((changedFile) => changedFile.startsWith(`${pkg.dir}/`)) - ) + changedFiles.some((changedFile) => changedFile.startsWith(`${pkg.dir}/`)) + ) ).map((x) => x.packageJson.name), releasePlan, };