We recently added a new message format called `legacy-extract` that is used to migrate between
legacy and canonical message IDs (see https://github.com/angular/angular/pull/41026).
These changes expose the new format in `extract-i18n`.
Previously, if a browser build failed using the `browserBuild` test utility function, the test utility would try to access properties that did not exist and would crash. This increased the complexity to debug failing tests. With the new behavior, the `browserBuild` test utility will return with an empty `files` object and the failed builder result.
This change adds support for using the Webpack `processAssets` hook to handle the resource loader child compilation's assets. This new hook is the recommended way to process assets in Webpack 5+.
When using the `statsJson` browser builder option, the resulting JSON data is now streamed into a file instead of written in one large block. This mitigates crashes due to the generated string exceeded the Node.js limit.
Change the default of this flag to disabled by default as this is a caused of rebuild performance degradation for large projects.
BREAKING CHANGE
The server and browser builder `showCircularDependencies` option default value has been changed from `true` to `false`.
The resource loader used to process component styles and templates has been changed to be fully typed and to leverage more of Webpack's child compilation APIs.
The later of which removes the need to manually propagate most information from the child compilation to the parent compilation.
BREAKING CHANGE
`suppressZoneJsIncompatibilityWarning` option has been removed. If you are using this plugin directly and `async/await` in ES2017 make sure you downlevel the async syntax using Babel.
See: https://github.com/angular/zone.js/pull/1140 for more information.
With this change we update the TypeScript target of server compilation unit for new projects.
- E2E target has been update from `es2018` to `es2019`
- Browser target has been update from `es2015` to `es2017`
- Server target has been update from `es2016` to `es2019`
By using the output path provided directly by the Webpack builder's result, one additional reason for using the expensive `Stats.toJson` call is removed.
This change also removes multiple linting disable rule comments now that the output path property is guaranteed to be present.
This change adds the output path for the Webpack build directly to the result of the builder. This removes one of the reasons for using the Webpack JSON stats object which is expensive to generate.
Webpack's `Stats.toJson` function is an expensive operation and is recommended to be avoided where possible. In the case of the karma plugin, the compilation errors can be accessed directly without the need for the function call.
Webpack's Stats.toJson function is an expensive operation and is recommended to be avoided where possible. In the case of the analytics plugin, the chunks and assets can be accessed directly from the Webpack compilation.
This change uses the newly introduced precalculated file dependencies for each TypeScript file instead of querying TypeScript for the SourceFile's dependencies when performing the unused file check at the end of the build cycle. This change removes the need to recalculate the dependencies for each TypeScript file present in the Webpack compilation.
This ensures that vendor sourcemaps are not loaded from file when they have not been previously loaded via sourcemap-loader.
When vendor sourcemap is enabled, `inputSourceMap` is not needed, since the sourcemap is already available and the `sourceMappingURL` comment is removed from source.
With this change we automate the generation of `@angular/cli/lib/config/schema.json`. While on paper we could use quicktype for this. Quicktype doesn't handle `patternProperties` and `oneOf` that well.
How does this works?
Relative `$ref` will be resolved and inlined as part of the root schema definitions.
Example
```json
"@schematics/angular:enum": {
"$ref": "../../../../schematics/angular/enum/schema.json"
},
```
Will be parsed and transformed to
```json
"@schematics/angular:enum": {
"$ref": "#/definitions/SchematicsAngularEnumSchema"
},
"definitions: {
"SchematicsAngularEnumSchema": {
"title": "Angular Enum Options Schema",
"type": "object",
"description": "Generates a new, generic enum definition for the given or default project.",
"properties": {...}
}
}
```
As the `--prod` is now deprecated, and `ng build` uses by default the `production` configuration,
then we should remove the references to `ng build --prod` in the generated project.
This change augments a TypeScript Compiler Host's resolveModuleNames function to collect dependencies of the containing file based on the module names passed to the resolveModuleNames function. This process assumes that consumers of the Compiler Host will call resolveModuleNames with modules that are actually present in a containing file. The TypeScript compiler exhibits such behavior making this process effective at generating a set of all direct dependencies for a given source file.
This process is a workaround for gathering a TypeScript SourceFile's dependencies as there is no currently exposed public method to do so. A BuilderProgram does have a `getAllDependencies` function. However, that function returns all transitive dependencies as well which can cause excessive Webpack rebuilds especially in larger programs.
BREAKING CHANGE:
The `ng add` command will now ask the user to confirm the package and version prior to installing and executing an uninstalled package.
This new behavior allows a user to abort the action if the version selected is not appropriate or if a typo occurred on the command line and an incorrect package would be installed.
A `--skip-confirmation` option has been added to skip the prompt and directly install and execute the package. This option is useful in CI and non-TTY scenarios such as automated scripts.