Skip to content

Commit 222e118

Browse files
kyliaujosephperrott
authored andcommitted
refactor(@schematics/angular): read build-angular's version from package.json
Now that `@angular-devkit/build-angular` is promoted to stable (#20528), it will always have the same version as `@schematics/angular`. With this change, there is no need to manually update `DevkitBuildAngular` field in `latest-versions.ts` anymore.
1 parent 7fbf6a2 commit 222e118

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

docs/process/release.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ using the `--githubToken` flag. You just then have to confirm the draft.
153153

154154
**For each released version**:
155155

156-
Update the package versions to reflect the *next* release version in **both**:
157-
1. `version` in [`package.json`](https://github.com/angular/angular-cli/blob/master/package.json#L3)
158-
1. `DevkitBuildAngular` in [`packages/schematics/angular/utility/latest-versions.ts`](https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/latest-versions.ts)
156+
Update `version` in root [`package.json`](/package.json#L3) to the *next* release version.
159157

160158
```sh
161159
git checkout -b release-bump-vXX

packages/schematics/angular/utility/latest-versions.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ export const latestVersions = {
1414
TypeScript: '~4.2.3',
1515
TsLib: '^2.1.0',
1616

17-
// The versions below must be manually updated when making a new devkit release.
18-
// For our e2e tests, these versions must match the latest tag present on the branch.
19-
// During RC periods they will not match the latest RC until there's a new git tag, and
20-
// should not be updated.
21-
DevkitBuildAngular: '~12.0.0-rc.0',
17+
// Since @angular-devkit/build-angular and @schematics/angular are always
18+
// published together from the same monorepo, and they are both
19+
// non-experimental, they will always have the same version.
20+
DevkitBuildAngular: '~' + require('../package.json')['version'],
2221

2322
ngPackagr: '^12.0.0-next.8',
2423
};

0 commit comments

Comments
 (0)