Skip to content

Commit 53ca80c

Browse files
committed
test: ensure to use the correct version for @angular/ssr packages
This commit fixes an issue that causes update tests to fail when we are in feature freeze (cherry picked from commit 62aa739)
1 parent ca3387c commit 53ca80c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/schematics/angular/migrations/update-17/replace-nguniversal-engines.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function (): Rule {
9090
removePackageJsonDependency(tree, '@nguniversal/express-engine');
9191
removePackageJsonDependency(tree, '@nguniversal/common');
9292
},
93-
addDependency('@angular/ssr', latestVersions.Angular),
93+
addDependency('@angular/ssr', latestVersions.AngularSSR),
9494
]);
9595
}
9696

packages/schematics/angular/ssr/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function updateWebpackBuilderServerTsConfigRule(options: SSROptions): Rule {
207207

208208
function addDependencies(): Rule {
209209
return chain([
210-
addDependency('@angular/ssr', '^0.0.0-PLACEHOLDER', {
210+
addDependency('@angular/ssr', latestVersions.AngularSSR, {
211211
type: DependencyType.Default,
212212
}),
213213
addDependency('express', latestVersions['express'], {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export const latestVersions: Record<string, string> & {
1010
Angular: string;
1111
DevkitBuildAngular: string;
12+
AngularSSR: string;
1213
} = {
1314
// We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe,
1415
// but ts_library doesn't support JSON inputs.
@@ -17,8 +18,6 @@ export const latestVersions: Record<string, string> & {
1718
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
1819
Angular: '^17.0.0-next.0',
1920

20-
// Since @angular-devkit/build-angular and @schematics/angular are always
21-
// published together from the same monorepo, and they are both
22-
// non-experimental, they will always have the same version.
23-
DevkitBuildAngular: '^' + require('../package.json')['version'],
21+
DevkitBuildAngular: '^0.0.0-PLACEHOLDER',
22+
AngularSSR: '^0.0.0-PLACEHOLDER',
2423
};

0 commit comments

Comments
 (0)