Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ng-dev/release/publish/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ export abstract class ReleaseAction {
/** Installs all Yarn dependencies in the current branch. */
protected async installDependenciesForCurrentBranch() {
if (await this.pnpmVersioning.isUsingPnpm(this.projectDir)) {
// Note: We delate all contents of `node_modules` before installing dependencies. We do
// this because if a pnpm workspace package exists at one ref and not another, it can
// cause the pnpm install from within Bazel to errantly attempt to install a package that
// does not exist.
try {
this.git.run(['clean', '-qdfX', '**/node_modules']);
} catch {}
await ExternalCommands.invokePnpmInstall(this.projectDir);
return;
}
Expand Down
6 changes: 5 additions & 1 deletion ng-dev/release/publish/external-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ export abstract class ExternalCommands {
'install',
...(yarnCommand.legacy ? ['--frozen-lockfile', '--non-interactive'] : ['--immutable']),
],
{cwd: projectDir},
{
cwd: projectDir,
mode: 'on-error',
},
);
Log.info(green(' ✓ Installed project dependencies.'));
} catch (e) {
Expand All @@ -250,6 +253,7 @@ export abstract class ExternalCommands {
],
{
cwd: projectDir,
mode: 'on-error',
},
);

Expand Down
Loading