angular / angular-cli Public
master
Commits on Mar 24, 2022
-
-
build: change bazel project_id option to bes_instance_name
The `--project_id` option was deprecated and renamed to `--bes_instance_name` in Bazel 5.0.0.
-
build: update bazel rules_nodejs to v5.3.0
The `check_bazel_version` and `check_rules_nodejs_version` calls have also been removed from the WORKSPACE file as they are no longer supported or recommended by `rules_nodejs`.
Commits on Mar 23, 2022
-
-
fix(@angular-devkit/build-angular): remove unneeded JIT reflect metad…
…ata polyfill Since Angular 8, the CLI has transformed decorator metadata to a form that can be used by the Angular dependency injector without the TDZ limitations of Typescript's decorator metadata emit feature. As a result, a JIT application compiled with the CLI no longer requires the reflect metadata polyfill that was provided by `core-js`. This polyfill was also the last remaining usage of the `core-js` package within `@angular-devkit/build-angular` which allows the `core-js` package to also be removed. Refs: #14473 & angular/angular#37382 BREAKING CHANGE: Reflect metadata polyfill is no longer automatically provided in JIT mode Reflect metadata support is not required by Angular in JIT applications compiled by the CLI. Applications built in AOT mode did not and will continue to not provide the polyfill. For the majority of applications, the reflect metadata polyfill removal should have no effect. However, if an application uses JIT mode and also uses the previously polyfilled reflect metadata JavaScript APIs, the polyfill will need to be manually added to the application after updating. To replicate the previous behavior, the `core-js` package should be manually installed and the `import 'core-js/proposals/reflect-metadata';` statement should be added to the application's `polyfills.ts` file.
-
refactor(@angular/cli): call package manager supports method async
With this change we call the `supports` method for Yarn, NPM and PNPM asynchronous
-
refactor(@angular-devkit/build-angular): lazy import
inquirer
`inquirer` has a number of depedencies which slow down module resolution when importing (~138ms) by lazy loading this module we remove this overhead when prompts are not needed.
-
refactor(@angular/cli): lazy import
inquirer
`inquirer` has a number of depedencies which slow down module resolution when importing (~138ms) by lazy loading this module we remove this overhead when prompts are not needed.
-
fix(@ngtools/webpack): update peer dependency to reflect TS 4.6 support
Updates the peer dependency to reflect the TS 4.6 support, avoiding warnings like: ``` warning "@angular-devkit/build-angular > @ngtools/[email protected]" has incorrect peer dependency "typescript@>=4.4.3 <4.6". ```
Commits on Mar 22, 2022
-
feat(@angular/cli): add support for multiple schematics collections
The `schematicCollections` can be placed under the `cli` option in the global `.angular.json` configuration, at the root or at project level in `angular.json` . ```jsonc { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "cli": { "schematicCollections": ["@schematics/angular", "@angular/material"] } // ... } ``` **Rationale** When this option is not configured and a user would like to run a schematic which is not part of `@schematics/angular`, the collection name needs to be provided to `ng generate` command in the form of `[collection-name:schematic-name]`. This make the `ng generate` command too verbose for repeated usages. This is where `schematicCollections` comes handle. When adding `@angular/material` to the list of `schematicCollections`, the generate command will try to locate the schematic in the specified collections. ``` ng generate navigation ``` is equivalent to: ``` ng generate @angular/material:navigation ``` **Conflicting schematic names** When multiple collections have a schematic with the same name. Both `ng generate` and `ng new` will run the first schematic matched based on the ordering (as specified) of `schematicCollections`. DEPRECATED: The `defaultCollection` workspace option has been deprecated in favor of `schematicCollections`. Before ```json "defaultCollection": "@angular/material" ``` After ```json "schematicCollections": ["@angular/material"] ``` Closes #12157
-
feat(@angular-devkit/schematics): add parameter to `listSchematicName…
…s` to allow returning hidden schematics. The return value of `listSchematicNames` will include hidden schematics when is invoked with true as first parameter. By default, hidden schematics are not returned.
Commits on Mar 21, 2022
-
-
-
feat(@angular/cli): deprecated
defaultProject
optionWith this change we deprecate the angular.json `defaultProject` option. DEPRECATED: The `defaultProject` workspace option has been deprecated. The project to use will be determined from the current working directory. Closes #20661
-
feat(@schematics/angular): add migratiom to remove
defaultProject
i……n workspace config This option is deprecated in Angular CLI and will be removed in a future major version.
-
refactor(@schematics/angular): remove usage of deprecated `defaultPro…
…ject` This option is deprecated in Angular CLI and will be removed in a future major version.
-
refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <[email protected]>
-
fix(@schematics/angular): Consolidated setup with a single `beforeEac…
…h()` Since f463c84 we use native `async`/`await` and thus we do not need to split setup in two `beforeEach()`
Commits on Mar 18, 2022
-
feat(@angular/cli): add
ng cache
commandWith this change we create a new command `ng cache` that can be used control and check the disk cache settings. This command has 4 subcommands - `ng cache enable` which can be used to enable the cache. - `ng cache disable` which can be used to disable the cache. - `ng cache clean` which can be used to delete the cache from disk. - `ng cache info` which will print statistics and information about the cache.
-
-
fix(@angular/cli): print entire config when no positional args are pr…
…ovided to `ng config` This fixes a regression were when no positional args are provided to `ng config` the entire config file should to be printed in the console.
-
fix(@angular/cli): hide private schematics from
ng g
help outputWith this change we don't display private schematic in `ng generate` help output.
-
fix(@angular/cli):
ng g
show descrption fromcollection.json
if n……ot present in `schema.json` Wiht this change we show the descrption from `collection.json` if not present in schematic `schema.json` in `ng generate` help output
Commits on Mar 16, 2022
-
-
-
refactor(@angular/cli): remove
hasAnalyticsConfig
analytics logicWith this change we clean up further the analytics code and re-use the `getAnalytics` to determine if the config is set or not. Also, this change inclused a refactor to the `createAnalytics` method to make it more readable.
-
-
fix(@schematics/angular): remove
@types/node
from new projectsThe `@types/node` package is now only added if E2E tests (`ng generate e2e`) or universal are added to a project.
-
-
build: handle default sub command in json help output
This change is needed to handle default subcommands which are used in `ng generate` default subcommands are prefixed with `$0` or `*`. More info: https://github.com/yargs/yargs/blob/main/docs/advanced.md#default-commands
-
refactor(@angular/cli): remove old
CommandModule
and `SchematicComm……and` implementations Use the newly implemented `CommandModule` and `SchematicsCommandModule`.
Commits on Mar 15, 2022
-
feat(@angular/cli): add disable/enable aliases for off/on `ng analyti…
…cs` command `ng analytics enable/disable`better aligns with `ng cache enable/disable` that will be available in the future.
-
refactor(@angular/cli): clean up analytics methods
Re-use methods were possible.