From 190a2ec21ac65e4ddb01b036b3565136c59e6179 Mon Sep 17 00:00:00 2001 From: Brandon Cheng Date: Wed, 26 Mar 2025 02:04:29 -0400 Subject: [PATCH] fix: selectively revert changes to allProjectsGraph for legacy deploy --- .changeset/brown-mugs-pick.md | 6 +++ .../plugin-commands-deploy/src/deploy.ts | 44 ++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .changeset/brown-mugs-pick.md diff --git a/.changeset/brown-mugs-pick.md b/.changeset/brown-mugs-pick.md new file mode 100644 index 0000000000..28e552687a --- /dev/null +++ b/.changeset/brown-mugs-pick.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-deploy": patch +pnpm: patch +--- + +A [change in pnpm v10.6.3](https://github.com/pnpm/pnpm/pull/9259) introduced new bugs in `pnpm deploy` running in legacy mode. (Legacy deploys are performed when `force-legacy-deploy=true` or the `--legacy` flag is used.) This change is now reverted for `pnpm deploy` in legacy mode. diff --git a/releasing/plugin-commands-deploy/src/deploy.ts b/releasing/plugin-commands-deploy/src/deploy.ts index 3e1b31da30..db82fd5c16 100644 --- a/releasing/plugin-commands-deploy/src/deploy.ts +++ b/releasing/plugin-commands-deploy/src/deploy.ts @@ -14,7 +14,7 @@ import rimraf from '@zkochan/rimraf' import renderHelp from 'render-help' import { deployHook } from './deployHook.js' import { logger, globalWarn } from '@pnpm/logger' -import { type Project } from '@pnpm/types' +import { type ProjectsGraph, type Project } from '@pnpm/types' import { createDeployFiles } from './createDeployFiles.js' const FORCE_LEGACY_DEPLOY = 'force-legacy-deploy' satisfies keyof typeof configTypes @@ -130,8 +130,44 @@ export async function handler (opts: DeployOptions, params: string[]): Promise path.relative(rootDir, searchedDir) === '') + if (project == null) return undefined + return { [searchedDir]: { dependencies: [], package: project } } +}