Remove deprecated unused options from schematics.
BREAKING CHANGE: App-shell and Universal schematics deprecated unused `appId` option has been removed.
This commit removes generation of `.withServerTransition` in the universal schematic as is deprecated.
DEPRECATED: the `app-id` option in the app-shell and universal schematics has been deprecated without replacement. See: https://github.com/angular/angular/pull/49422 for more information about the rational of this change.
These async methods are a replacement for the Observable based `runSchematicAsync` and `runExternalSchematicAsync` methods.
DEPRECATED:
The Observable based `SchematicTestRunner.runSchematicAsync` and `SchematicTestRunner.runExternalSchematicAsync` method have been deprecated in favor of the Promise based `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic`.
BREAKING CHANGE: Removed unused`appDir` option from Universal and App-Shell schematic. This option can safely be removed if present since it no longer has effect.
With this change we change the how we handle `"format": "path"` schematic property option. We replace the formatter in favour of a `SmartDefaultProvider`, which ensures that nested schematics can access the `workingDirectory`.
Code related to decoding buffers into strings and parsing content into JSON can now be removed by using the
support provided directly from the Tree instance for the executing schematic.
With this change we refactor the Angular CLI and replace the underlying args parser and command builder. We choose to use Yargs as our parser and command builder of choice. The main advantages of Yargs over other command builders are;
- Highly configurable.
- We already use it in other packages such as the compiler-cli/dev-infra etc..
- Commands and options can be added during runtime. This is a requirement that is needed to support architect and schematics commands.
- Outstanding documentation.
- The possibility to parse args without parser configuration (Free form).
- Commands are built lazily based on the arguments passed.
BREAKING CHANGE:
Several changes in the Angular CLI commands and arguments handling.
- `ng help` has been removed in favour of the `—-help` option.
- `ng —-version` has been removed in favour of `ng version` and `ng v`.
- Deprecated camel cased arguments are no longer supported. Ex. using `—-sourceMap` instead of `—-source-map` will result in an error.
- `ng update`, `—-migrate-only` option no longer accepts a string of migration name, instead use `—-migrate-only -—name <migration-name>`.
- `—-help json` help has been removed.
Closes#20976, closes#16614 and closes#16241
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
Previously, the `--project` flag was ignored when gathering and merging the schematics defaults from the angular workspace configuration file.
Closes#20666
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.
- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
BREAKING CHANGE:
- Deprecated `scripts[].lazy` has been renamed with `scripts[].inject`
- Deprecated `styles[].lazy` has been renamed with `styles[].inject`
Note: this change only effects direct `@angular-devkit/build-angular` users and not application developers. Users will be migrated automatically off these options.
This change introduces a helper function (`applyToUpdateRecorder`) that handles all known `Change` classes. The use of this helper function removes type assumptions within the schematics. Many of these assumptions caused compilation errors when strict TypeScript options are enabled.
By leveraging TypeScript's AST type guards, function parameter assumptions and casting can be removed. Many of these cases caused errors when enabling TypeScript's strict option. This is preliminary work to support enabling full TypeScript strict mode within the project.
BREAKING CHANGE: The below options have been removed as they had no effect
- `test` and `testTsconfigFileName` have been removed form the universal schematic
- `universalProject`, `name`, `outDir`, `root` and `index` have been removed from the app-shell schematic