@schematics/angular 19.2.0 → 19.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,7 +99,10 @@ function* updateBuildTarget(projectName, buildTarget, serverTarget, tree, contex
99
99
  // Update server file
100
100
  const ssrMainFile = serverTarget?.options?.['main'];
101
101
  if (typeof ssrMainFile === 'string') {
102
- yield deleteFile(ssrMainFile);
102
+ // Do not delete the server main file if it's the same as the browser file.
103
+ if (buildTarget.options?.browser !== ssrMainFile) {
104
+ yield deleteFile(ssrMainFile);
105
+ }
103
106
  yield (0, schematics_1.externalSchematic)('@schematics/angular', 'ssr', {
104
107
  project: projectName,
105
108
  skipInstall: true,
@@ -346,8 +349,13 @@ function deleteFile(path) {
346
349
  };
347
350
  }
348
351
  function updateJsonFile(path, updater) {
349
- return (tree) => {
350
- updater(new json_file_1.JSONFile(tree, path));
352
+ return (tree, ctx) => {
353
+ if (tree.exists(path)) {
354
+ updater(new json_file_1.JSONFile(tree, path));
355
+ }
356
+ else {
357
+ ctx.logger.info(`Skipping updating '${path}' as it does not exist.`);
358
+ }
351
359
  };
352
360
  }
353
361
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "19.2.0",
3
+ "version": "19.2.1",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "schematics": "./collection.json",
24
24
  "dependencies": {
25
- "@angular-devkit/core": "19.2.0",
26
- "@angular-devkit/schematics": "19.2.0",
25
+ "@angular-devkit/core": "19.2.1",
26
+ "@angular-devkit/schematics": "19.2.1",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -16,7 +16,7 @@ exports.latestVersions = {
16
16
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
17
17
  Angular: '^19.2.0',
18
18
  NgPackagr: '^19.2.0',
19
- DevkitBuildAngular: '^19.2.0',
20
- AngularBuild: '^19.2.0',
21
- AngularSSR: '^19.2.0',
19
+ DevkitBuildAngular: '^19.2.1',
20
+ AngularBuild: '^19.2.1',
21
+ AngularSSR: '^19.2.1',
22
22
  };