|
6 | 6 | * found in the LICENSE file at https://angular.io/license |
7 | 7 | */ |
8 | 8 |
|
9 | | -import {promises as fs, existsSync} from 'fs'; |
10 | | -import path, {join} from 'path'; |
| 9 | +import {promises as fs} from 'fs'; |
| 10 | +import {join} from 'path'; |
11 | 11 | import semver from 'semver'; |
12 | 12 |
|
13 | | -import { |
14 | | - workspaceRelativeBazelModuleLock, |
15 | | - workspaceRelativePackageJsonPath, |
16 | | -} from '../../utils/constants.js'; |
| 13 | +import {workspaceRelativePackageJsonPath} from '../../utils/constants.js'; |
17 | 14 | import {AuthenticatedGitClient} from '../../utils/git/authenticated-git-client.js'; |
18 | 15 | import {isGithubApiError} from '../../utils/git/github.js'; |
19 | 16 | import githubMacros from '../../utils/git/github-macros.js'; |
@@ -44,7 +41,6 @@ import {githubReleaseBodyLimit} from './constants.js'; |
44 | 41 | import {ExternalCommands} from './external-commands.js'; |
45 | 42 | import {promptToInitiatePullRequestMerge} from './prompt-merge.js'; |
46 | 43 | import {Prompt} from '../../utils/prompt.js'; |
47 | | -import glob from 'fast-glob'; |
48 | 44 | import {PnpmVersioning} from './pnpm-versioning.js'; |
49 | 45 | import {Commit} from '../../utils/git/octokit-types.js'; |
50 | 46 | import {updateRenovateConfigTargetLabels} from './actions/renovate-config-updates.js'; |
@@ -139,33 +135,6 @@ export abstract class ReleaseAction { |
139 | 135 | // to avoid unnecessary diff. IDEs usually add a trailing new line. |
140 | 136 | await fs.writeFile(pkgJsonPath, `${JSON.stringify(pkgJson, null, 2)}\n`); |
141 | 137 | Log.info(green(` ✓ Updated project version to ${pkgJson.version}`)); |
142 | | - |
143 | | - if (this.config.rulesJsInteropMode && existsSync(path.join(this.projectDir, '.aspect'))) { |
144 | | - await ExternalCommands.invokeBazelUpdateAspectLockFiles(this.projectDir); |
145 | | - } |
146 | | - |
147 | | - if (existsSync(join(this.projectDir, workspaceRelativeBazelModuleLock))) { |
148 | | - await ExternalCommands.invokeBazelModDepsUpdate(this.projectDir); |
149 | | - } |
150 | | - } |
151 | | - |
152 | | - /* |
153 | | - * Get the modified Aspect lock files if `rulesJsInteropMode` is enabled. |
154 | | - */ |
155 | | - protected getAspectLockFiles(): string[] { |
156 | | - // TODO: Remove after `rules_js` migration is complete. |
157 | | - return this.config.rulesJsInteropMode |
158 | | - ? glob.sync(['.aspect/**', 'pnpm-lock.yaml'], {cwd: this.projectDir}) |
159 | | - : []; |
160 | | - } |
161 | | - |
162 | | - /* |
163 | | - * Get the modified "MODULE.bazel.lock" if bazel modules are enabled. |
164 | | - */ |
165 | | - protected getModuleBazelLockFile(): string | undefined { |
166 | | - return existsSync(join(this.projectDir, workspaceRelativeBazelModuleLock)) |
167 | | - ? workspaceRelativeBazelModuleLock |
168 | | - : undefined; |
169 | 138 | } |
170 | 139 |
|
171 | 140 | /** Gets the most recent commit of a specified branch. */ |
@@ -235,16 +204,7 @@ export abstract class ReleaseAction { |
235 | 204 | } |
236 | 205 |
|
237 | 206 | // Commit message for the release point. |
238 | | - const filesToCommit = [ |
239 | | - workspaceRelativePackageJsonPath, |
240 | | - workspaceRelativeChangelogPath, |
241 | | - ...this.getAspectLockFiles(), |
242 | | - ]; |
243 | | - |
244 | | - const bazelModuleLockFile = this.getModuleBazelLockFile(); |
245 | | - if (bazelModuleLockFile) { |
246 | | - filesToCommit.push(bazelModuleLockFile); |
247 | | - } |
| 207 | + const filesToCommit = [workspaceRelativePackageJsonPath, workspaceRelativeChangelogPath]; |
248 | 208 |
|
249 | 209 | const commitMessage = getCommitMessageForRelease(newVersion); |
250 | 210 |
|
|
0 commit comments