Skip to content
Closed
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
8 changes: 3 additions & 5 deletions ng-dev/release/publish/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,6 @@ export abstract class ReleaseAction {
protected async checkoutUpstreamBranch(branchName: string) {
this.git.run(['fetch', '-q', this.git.getRepoGitUrl(), branchName]);
this.git.run(['checkout', '-q', 'FETCH_HEAD', '--detach']);
try {
// Remove node_modules even if they are ignored. (We do not want to run -dxf to avoid deleting other files suchs as .ng-dev-lock)
this.git.run(['clean', '-qdfX **/node_modules']);
} catch {}
}

/** Installs all Yarn dependencies in the current branch. */
Expand All @@ -386,7 +382,9 @@ export abstract class ReleaseAction {
// This is a workaround for: https://github.com/yarnpkg/yarn/issues/8146. Even though
// we might be able to fix this with Yarn 2+, it is reasonable ensuring clean node modules.
// TODO: Remove this when we use Yarn 2+ in all Angular repositories.
await fs.rm(nodeModulesDir, {force: true, recursive: true, maxRetries: 3});
try {
this.git.run(['clean', '-qdfX', '**/node_modules']);
} catch {}
await ExternalCommands.invokeYarnInstall(this.projectDir);
}

Expand Down
Loading