@angular/cli 18.1.0-rc.0 → 18.1.0-rc.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "18.1.0-rc.0",
3
+ "version": "18.1.0-rc.1",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1801.0-rc.0",
29
- "@angular-devkit/core": "18.1.0-rc.0",
30
- "@angular-devkit/schematics": "18.1.0-rc.0",
31
- "@inquirer/prompts": "5.0.6",
28
+ "@angular-devkit/architect": "0.1801.0-rc.1",
29
+ "@angular-devkit/core": "18.1.0-rc.1",
30
+ "@angular-devkit/schematics": "18.1.0-rc.1",
31
+ "@inquirer/prompts": "5.0.7",
32
32
  "@listr2/prompt-adapter-inquirer": "2.0.13",
33
- "@schematics/angular": "18.1.0-rc.0",
33
+ "@schematics/angular": "18.1.0-rc.1",
34
34
  "@yarnpkg/lockfile": "1.1.0",
35
35
  "ini": "4.1.3",
36
36
  "jsonc-parser": "3.3.1",
@@ -46,14 +46,14 @@
46
46
  "ng-update": {
47
47
  "migrations": "@schematics/angular/migrations/migration-collection.json",
48
48
  "packageGroup": {
49
- "@angular/cli": "18.1.0-rc.0",
50
- "@angular/build": "18.1.0-rc.0",
51
- "@angular/ssr": "18.1.0-rc.0",
52
- "@angular-devkit/architect": "0.1801.0-rc.0",
53
- "@angular-devkit/build-angular": "18.1.0-rc.0",
54
- "@angular-devkit/build-webpack": "0.1801.0-rc.0",
55
- "@angular-devkit/core": "18.1.0-rc.0",
56
- "@angular-devkit/schematics": "18.1.0-rc.0"
49
+ "@angular/cli": "18.1.0-rc.1",
50
+ "@angular/build": "18.1.0-rc.1",
51
+ "@angular/ssr": "18.1.0-rc.1",
52
+ "@angular-devkit/architect": "0.1801.0-rc.1",
53
+ "@angular-devkit/build-angular": "18.1.0-rc.1",
54
+ "@angular-devkit/build-webpack": "0.1801.0-rc.1",
55
+ "@angular-devkit/core": "18.1.0-rc.1",
56
+ "@angular-devkit/schematics": "18.1.0-rc.1"
57
57
  }
58
58
  },
59
59
  "packageManager": "yarn@4.3.0",
@@ -191,7 +191,7 @@ function _validateUpdatePackages(infoMap, force, next, logger) {
191
191
  }
192
192
  }
193
193
  function _performUpdate(tree, context, infoMap, logger, migrateOnly) {
194
- const packageJsonContent = tree.read('/package.json');
194
+ const packageJsonContent = tree.read('/package.json')?.toString();
195
195
  if (!packageJsonContent) {
196
196
  throw new schematics_1.SchematicsException('Could not find a package.json. Are you in a Node project?');
197
197
  }
@@ -232,10 +232,12 @@ function _performUpdate(tree, context, infoMap, logger, migrateOnly) {
232
232
  logger.warn(`Package ${name} was not found in dependencies.`);
233
233
  }
234
234
  });
235
- const newContent = JSON.stringify(packageJson, null, 2);
236
- if (packageJsonContent.toString() != newContent || migrateOnly) {
235
+ const eofMatches = packageJsonContent.match(/\r?\n$/);
236
+ const eof = eofMatches?.[0] ?? '';
237
+ const newContent = JSON.stringify(packageJson, null, 2) + eof;
238
+ if (packageJsonContent != newContent || migrateOnly) {
237
239
  if (!migrateOnly) {
238
- tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2));
240
+ tree.overwrite('/package.json', newContent);
239
241
  }
240
242
  const externalMigrations = [];
241
243
  // Run the migrate schematics with the list of packages to use. The collection contains
@@ -25,5 +25,5 @@ class Version {
25
25
  }
26
26
  }
27
27
  // TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
28
- // export const VERSION = new Version('18.1.0-rc.0');
28
+ // export const VERSION = new Version('18.1.0-rc.1');
29
29
  exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);