fix: improve package.json detection by re-taro · Pull Request #94 · changesets/bot
Expand Up
@@ -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") { Expand All @@ -113,9 +116,9 @@ export let getChangedPackages = async ({ } let tool: | { tool: Tool; globs: string[]; } tool: Tool; globs: string[]; } | undefined;
if (isPnpm) { Expand Down Expand Up @@ -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, }; Expand Down
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") { Expand All @@ -113,9 +116,9 @@ export let getChangedPackages = async ({ } let tool: | { tool: Tool; globs: string[]; } tool: Tool; globs: string[]; } | undefined;
if (isPnpm) { Expand Down Expand Up @@ -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, }; Expand Down