@angular/cli 17.1.0-rc.0 → 17.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": "17.1.0-rc.0",
3
+ "version": "17.1.0-rc.1",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1701.0-rc.0",
29
- "@angular-devkit/core": "17.1.0-rc.0",
30
- "@angular-devkit/schematics": "17.1.0-rc.0",
31
- "@schematics/angular": "17.1.0-rc.0",
28
+ "@angular-devkit/architect": "0.1701.0-rc.1",
29
+ "@angular-devkit/core": "17.1.0-rc.1",
30
+ "@angular-devkit/schematics": "17.1.0-rc.1",
31
+ "@schematics/angular": "17.1.0-rc.1",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "ini": "4.1.1",
@@ -47,13 +47,13 @@
47
47
  "ng-update": {
48
48
  "migrations": "@schematics/angular/migrations/migration-collection.json",
49
49
  "packageGroup": {
50
- "@angular/cli": "17.1.0-rc.0",
51
- "@angular/ssr": "17.1.0-rc.0",
52
- "@angular-devkit/architect": "0.1701.0-rc.0",
53
- "@angular-devkit/build-angular": "17.1.0-rc.0",
54
- "@angular-devkit/build-webpack": "0.1701.0-rc.0",
55
- "@angular-devkit/core": "17.1.0-rc.0",
56
- "@angular-devkit/schematics": "17.1.0-rc.0"
50
+ "@angular/cli": "17.1.0-rc.1",
51
+ "@angular/ssr": "17.1.0-rc.1",
52
+ "@angular-devkit/architect": "0.1701.0-rc.1",
53
+ "@angular-devkit/build-angular": "17.1.0-rc.1",
54
+ "@angular-devkit/build-webpack": "0.1701.0-rc.1",
55
+ "@angular-devkit/core": "17.1.0-rc.1",
56
+ "@angular-devkit/schematics": "17.1.0-rc.1"
57
57
  }
58
58
  },
59
59
  "engines": {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ export declare function getEOL(content: string): string;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getEOL = void 0;
11
+ const node_os_1 = require("node:os");
12
+ const CRLF = '\r\n';
13
+ const LF = '\n';
14
+ function getEOL(content) {
15
+ const newlines = content.match(/(?:\r?\n)/g);
16
+ if (newlines?.length) {
17
+ const crlf = newlines.filter((l) => l === CRLF).length;
18
+ const lf = newlines.length - crlf;
19
+ return crlf > lf ? CRLF : LF;
20
+ }
21
+ return node_os_1.EOL;
22
+ }
23
+ exports.getEOL = getEOL;
@@ -10,10 +10,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.parseJson = exports.readAndParseJson = exports.JSONFile = void 0;
11
11
  const fs_1 = require("fs");
12
12
  const jsonc_parser_1 = require("jsonc-parser");
13
+ const eol_1 = require("./eol");
13
14
  /** @internal */
14
15
  class JSONFile {
15
16
  path;
16
17
  content;
18
+ eol;
17
19
  constructor(path) {
18
20
  this.path = path;
19
21
  const buffer = (0, fs_1.readFileSync)(this.path);
@@ -23,6 +25,7 @@ class JSONFile {
23
25
  else {
24
26
  throw new Error(`Could not read '${path}'.`);
25
27
  }
28
+ this.eol = (0, eol_1.getEOL)(this.content);
26
29
  }
27
30
  _jsonAst;
28
31
  get JsonAst() {
@@ -66,6 +69,7 @@ class JSONFile {
66
69
  formattingOptions: {
67
70
  insertSpaces: true,
68
71
  tabSize: 2,
72
+ eol: this.eol,
69
73
  },
70
74
  });
71
75
  if (edits.length === 0) {
@@ -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('17.1.0-rc.0');
28
+ // export const VERSION = new Version('17.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);