@angular/cli 18.0.2 → 18.0.3

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.0.2",
3
+ "version": "18.0.3",
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.1800.2",
29
- "@angular-devkit/core": "18.0.2",
30
- "@angular-devkit/schematics": "18.0.2",
31
- "@schematics/angular": "18.0.2",
28
+ "@angular-devkit/architect": "0.1800.3",
29
+ "@angular-devkit/core": "18.0.3",
30
+ "@angular-devkit/schematics": "18.0.3",
31
+ "@schematics/angular": "18.0.3",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "ini": "4.1.2",
@@ -46,14 +46,14 @@
46
46
  "ng-update": {
47
47
  "migrations": "@schematics/angular/migrations/migration-collection.json",
48
48
  "packageGroup": {
49
- "@angular/cli": "18.0.2",
50
- "@angular/build": "18.0.2",
51
- "@angular/ssr": "18.0.2",
52
- "@angular-devkit/architect": "0.1800.2",
53
- "@angular-devkit/build-angular": "18.0.2",
54
- "@angular-devkit/build-webpack": "0.1800.2",
55
- "@angular-devkit/core": "18.0.2",
56
- "@angular-devkit/schematics": "18.0.2"
49
+ "@angular/cli": "18.0.3",
50
+ "@angular/build": "18.0.3",
51
+ "@angular/ssr": "18.0.3",
52
+ "@angular-devkit/architect": "0.1800.3",
53
+ "@angular-devkit/build-angular": "18.0.3",
54
+ "@angular-devkit/build-webpack": "0.1800.3",
55
+ "@angular-devkit/core": "18.0.3",
56
+ "@angular-devkit/schematics": "18.0.3"
57
57
  }
58
58
  },
59
59
  "engines": {
@@ -256,7 +256,17 @@ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModu
256
256
  return false;
257
257
  }
258
258
  async getCollectionName() {
259
- const [, collectionName] = this.context.args.positional;
259
+ let [, collectionName] = this.context.args.positional;
260
+ // The CLI argument may specify also a version, like `ng add @my/lib@13.0.0`,
261
+ // but here we need only the name of the package, like `@my/lib`
262
+ try {
263
+ const packageIdentifier = (0, npm_package_arg_1.default)(collectionName);
264
+ collectionName = packageIdentifier.name ?? collectionName;
265
+ }
266
+ catch (e) {
267
+ (0, error_1.assertIsError)(e);
268
+ this.context.logger.error(e.message);
269
+ }
260
270
  return collectionName;
261
271
  }
262
272
  isPackageInstalled(name) {
@@ -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.0.2');
28
+ // export const VERSION = new Version('18.0.3');
29
29
  exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);