The default Jasmine test timeout is set to 2.5 minutes for all builder tests. The smaller timeouts (that are now removed from individual tests) can lead to test flakes especially on CI which can have large performance variability.
BREAKING CHANGE:
Removal of deprecated browser and server command options.
- `i18nFile`, use `locales` object in the project metadata instead.
- `i18nFormat`, No longer needed as the format will be determined automatically.
- `i18nLocale`, use `localize` option instead.
BREAKING CHANGE: Removal of deprecated `extract-i18n` command options
The deprecated `i18nLocale` option has been removed and the `i18n.sourceLocale` within a project's configuration should be used instead.
The deprecated `i18nFormat` option has been removed and the `format` option should be used instead.
This eliminates the requirement that when master is not a major we require to change the label. `target: minor` is always get merged into master (and master only): ed77bfea26/docs/BRANCHES.md (pull-request-examples) hence using `target: major` is not needed in this case.
BREAKING CHANGE: Removal of View Engine support from application builds
With the removal of the deprecated View Engine compiler in Angular version 12 for applications, Ivy-based compilation will always be used when building an application.
The default behavior for applications is to use the Ivy compiler when building and no changes are required for these applications.
For applications that have opted-out of Ivy, a warning will be shown and an Ivy-based build will be attempted. If the build fails,
the application may need to be updated to become Ivy compatible.
The package's `@angular-devkit/core` dependency is only used in non-test code to provide a single type which is no longer needed with the latest architect.
The `json.JsonObject` generic constraint did not force the options type to be a valid JSON object but required all builders to add the `json.JsonObject` type to all builder option types when calling `createBuilder`.
Deprecated packages that may have been included in a project by the tooling are now ignored when validating an update. This change removes the need to use the `--force` option in a situation where the later migrations will remove and cleanup the deprecated packages.
With the move to refactor and centralize the update logic, the schematics wrapper context needs to be updated to create an exception for the new location of the update schematic.
The `@angular-devkit/core` dependency was only used for two path manipulation functions. Since this schematic already uses Node.js builtins, the `path` builtin can also be used to provide equivalent function without the need for an additional dependency.
The asset extraction within the Angular compiler plugin resource loader needs to occur at the end of the Webpack asset processing pipeline. This ensures that all analysis and preprocessing of the asset have been performed before the resource asset is extracted from the Webpack child compilation.
BREAKING CHANGE:
`entryComponent` option has been removed from the `component` schematic as this was intended to be used with the the now no longer supported ViewEngine rendering engine.
BREAKING CHANGE: Removal of View Engine support from i18n extraction
With the removal of the deprecated View Engine compiler in Angular version 12 for applications, the `ng extract-i18n` command will now always use the Ivy compiler.
The `--ivy` option has also been removed as Ivy-based extraction is always enabled.
The default behavior for applications is to use the Ivy compiler for building/extraction and no changes are required for these applications.
For applications that have opted-out of Ivy, a warning will be shown and Ivy-based extraction will be attempted. If the extraction fails,
the application may need to be updated to become Ivy compatible.
This commit updates the `service-worker` schematics to explicitly
specify the ServiceWorker registration strategy in the
[ServiceWorkerModule.register()] call.
We still use the default strategy, so there should be no change in the
behavior of the generated apps. However, it will help people find out
what the default behavior is when debugging potential issues with
delayed ServiceWorker registration.
(See the discussion in angular/angular#41223 for more details.)
[1]: https://angular.io/api/service-worker/ServiceWorkerModule#register
Previously, `addSymbolToNgModuleMetadata()` assumed that the added
symbol would not span multiple lines. In most cases, the added symbol is
a single word, so this assumption was correct. In some cases, however,
we might want to add a mutli-line string, such as a static method of an
`@NgModule`:
```ts
imports: [
SomeModule.staticMethod({
prop1: 'val1',
prop2: 'val2'
})
]
```
This commit allows `addSymbolToNgModuleMetadata()` to correctly handle
multi-line strings by ensuring that added metadata symbols are always
put on a new line (even if the array is empty) and each line in the
string is indented as necessary.