@angular/cli 14.2.0 → 15.0.0-next.0

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.
@@ -215,7 +215,7 @@ export interface AngularClassOptionsSchema {
215
215
  /**
216
216
  * The name of the project.
217
217
  */
218
- project?: string;
218
+ project: string;
219
219
  /**
220
220
  * Do not create "spec.ts" test files for the new class.
221
221
  */
@@ -275,7 +275,7 @@ export interface AngularComponentOptionsSchema {
275
275
  /**
276
276
  * The name of the project.
277
277
  */
278
- project?: string;
278
+ project: string;
279
279
  /**
280
280
  * The HTML selector to use for this component.
281
281
  */
@@ -360,7 +360,7 @@ export interface AngularDirectiveOptionsSchema {
360
360
  /**
361
361
  * The name of the project.
362
362
  */
363
- project?: string;
363
+ project: string;
364
364
  /**
365
365
  * The HTML selector to use for this directive.
366
366
  */
@@ -394,7 +394,7 @@ export interface AngularEnumOptionsSchema {
394
394
  * The name of the project in which to create the enum. Default is the configured default
395
395
  * project for the workspace.
396
396
  */
397
- project?: string;
397
+ project: string;
398
398
  /**
399
399
  * Adds a developer-defined type to the filename, in the format "name.type.ts".
400
400
  */
@@ -424,7 +424,7 @@ export interface AngularGuardOptionsSchema {
424
424
  /**
425
425
  * The name of the project.
426
426
  */
427
- project?: string;
427
+ project: string;
428
428
  /**
429
429
  * Do not create "spec.ts" test files for the new guard.
430
430
  */
@@ -455,7 +455,7 @@ export interface AngularInterceptorOptionsSchema {
455
455
  /**
456
456
  * The name of the project.
457
457
  */
458
- project?: string;
458
+ project: string;
459
459
  /**
460
460
  * Do not create "spec.ts" test files for the new interceptor.
461
461
  */
@@ -480,7 +480,7 @@ export interface AngularInterfaceOptionsSchema {
480
480
  /**
481
481
  * The name of the project.
482
482
  */
483
- project?: string;
483
+ project: string;
484
484
  /**
485
485
  * Adds a developer-defined type to the filename, in the format "name.type.ts".
486
486
  */
@@ -639,7 +639,7 @@ export interface AngularPipeOptionsSchema {
639
639
  /**
640
640
  * The name of the project.
641
641
  */
642
- project?: string;
642
+ project: string;
643
643
  /**
644
644
  * Do not import this pipe into the owning NgModule.
645
645
  */
@@ -673,7 +673,7 @@ export interface AngularResolverOptionsSchema {
673
673
  /**
674
674
  * The name of the project.
675
675
  */
676
- project?: string;
676
+ project: string;
677
677
  /**
678
678
  * Do not create "spec.ts" test files for the new resolver.
679
679
  */
@@ -698,7 +698,7 @@ export interface AngularServiceOptionsSchema {
698
698
  /**
699
699
  * The name of the project.
700
700
  */
701
- project?: string;
701
+ project: string;
702
702
  /**
703
703
  * Do not create "spec.ts" test files for the new service.
704
704
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "14.2.0",
3
+ "version": "15.0.0-next.0",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,36 +25,36 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1402.0",
29
- "@angular-devkit/core": "14.2.0",
30
- "@angular-devkit/schematics": "14.2.0",
31
- "@schematics/angular": "14.2.0",
28
+ "@angular-devkit/architect": "0.1500.0-next.0",
29
+ "@angular-devkit/core": "15.0.0-next.0",
30
+ "@angular-devkit/schematics": "15.0.0-next.0",
31
+ "@schematics/angular": "15.0.0-next.0",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "debug": "4.3.4",
35
- "ini": "3.0.0",
35
+ "ini": "3.0.1",
36
36
  "inquirer": "8.2.4",
37
- "jsonc-parser": "3.1.0",
37
+ "jsonc-parser": "3.2.0",
38
38
  "npm-package-arg": "9.1.0",
39
- "npm-pick-manifest": "7.0.1",
39
+ "npm-pick-manifest": "7.0.2",
40
40
  "open": "8.4.0",
41
41
  "ora": "5.4.1",
42
42
  "pacote": "13.6.2",
43
43
  "resolve": "1.22.1",
44
44
  "semver": "7.3.7",
45
45
  "symbol-observable": "4.0.0",
46
- "uuid": "8.3.2",
46
+ "uuid": "9.0.0",
47
47
  "yargs": "17.5.1"
48
48
  },
49
49
  "ng-update": {
50
50
  "migrations": "@schematics/angular/migrations/migration-collection.json",
51
51
  "packageGroup": {
52
- "@angular/cli": "14.2.0",
53
- "@angular-devkit/architect": "0.1402.0",
54
- "@angular-devkit/build-angular": "14.2.0",
55
- "@angular-devkit/build-webpack": "0.1402.0",
56
- "@angular-devkit/core": "14.2.0",
57
- "@angular-devkit/schematics": "14.2.0"
52
+ "@angular/cli": "15.0.0-next.0",
53
+ "@angular-devkit/architect": "0.1500.0-next.0",
54
+ "@angular-devkit/build-angular": "15.0.0-next.0",
55
+ "@angular-devkit/build-webpack": "0.1500.0-next.0",
56
+ "@angular-devkit/core": "15.0.0-next.0",
57
+ "@angular-devkit/schematics": "15.0.0-next.0"
58
58
  }
59
59
  },
60
60
  "engines": {
@@ -156,11 +156,6 @@ class SchematicsCommandModule extends command_module_1.CommandModule {
156
156
  if (!property || !(0, core_1.isJsonObject)(property)) {
157
157
  return options;
158
158
  }
159
- if (property['format'] === 'path' && !property['$default']) {
160
- options['path'] = workingDir || undefined;
161
- this.context.logger.warn(`The 'path' option in '${schematic === null || schematic === void 0 ? void 0 : schematic.schema}' is using deprecated behaviour. ` +
162
- `'workingDirectory' smart default provider should be used instead.`);
163
- }
164
159
  return options;
165
160
  });
166
161
  if (options.interactive !== false && (0, tty_1.isTTY)()) {
@@ -430,9 +430,23 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
430
430
  const content = JSON.parse(packageContent.toString());
431
431
  installedVersion = content.version;
432
432
  }
433
+ const packageVersionsNonDeprecated = [];
434
+ const packageVersionsDeprecated = [];
435
+ for (const [version, { deprecated }] of Object.entries(npmPackageJson.versions)) {
436
+ if (deprecated) {
437
+ packageVersionsDeprecated.push(version);
438
+ }
439
+ else {
440
+ packageVersionsNonDeprecated.push(version);
441
+ }
442
+ }
443
+ const findSatisfyingVersion = (targetVersion) => {
444
+ var _a, _b;
445
+ return (_b = ((_a = semver.maxSatisfying(packageVersionsNonDeprecated, targetVersion)) !== null && _a !== void 0 ? _a : semver.maxSatisfying(packageVersionsDeprecated, targetVersion))) !== null && _b !== void 0 ? _b : undefined;
446
+ };
433
447
  if (!installedVersion) {
434
448
  // Find the version from NPM that fits the range to max.
435
- installedVersion = semver.maxSatisfying(Object.keys(npmPackageJson.versions), packageJsonRange);
449
+ installedVersion = findSatisfyingVersion(packageJsonRange);
436
450
  }
437
451
  if (!installedVersion) {
438
452
  throw new schematics_1.SchematicsException(`An unexpected error happened; could not determine version for package ${name}.`);
@@ -450,7 +464,7 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
450
464
  targetVersion = npmPackageJson['dist-tags']['latest'];
451
465
  }
452
466
  else {
453
- targetVersion = semver.maxSatisfying(Object.keys(npmPackageJson.versions), targetVersion);
467
+ targetVersion = findSatisfyingVersion(targetVersion);
454
468
  }
455
469
  }
456
470
  if (targetVersion && semver.lte(targetVersion, installedVersion)) {
@@ -36,6 +36,7 @@ export interface NgPackageManifestProperties {
36
36
  };
37
37
  }
38
38
  export interface PackageManifest extends Manifest, NgPackageManifestProperties {
39
+ deprecated?: boolean;
39
40
  }
40
41
  export declare function fetchPackageMetadata(name: string, logger: logging.LoggerApi, options?: {
41
42
  registry?: string;