BREAKING CHANGE:
Deprecated `isObservable` function removed. As an alternative, use `isObservable` from the `rxjs` package.
NOTE: This change does not affect application development.
BREAKING CHANGE:
Deprecated `@angular-devkit/core` terminal API has been removed. Use 3rd party packages like chalk, colors or ansi-colors instead.
**Note:** this changes doesn't effect application developers
Removal changes were previously being improperly recorded with the wrong parent. A property can now be directly removed by setting the value to undefined or by using the delete operator.
BREAKING CHANGE:
The experimental workspace API has been removed from `@angular-devkit/core`. This API was no longer used by the Angular CLI and was replaced with the stable workspace API also found within `@angular-devkit/core`. This change does not affect project code and is related to tooling infrastructure only.
Most of the problems here come from return-only generics. A greater redesign of these core types is necessary to properly fix all the typing issues. However, all these types seem to be exported publicly. In the interest of not introducing any breaking changes, most of these fixes were just casting types to `unknown` or replacing generics with the maximally-allowed type (`JsonValue`).
This commit fixes typings errors after "strict: true" is enabled in
tsconfig.json for the json, logger, and virtual-fs subpackages in
`@angular-devkit/core`.
This change implements the capability to specify multiple translation files per locale. The specified translation files for each locale will be merged prior to localization. The Angular configuration file has been updated to allow for both a single path string or an array of path strings when specifying the translations for each locale. If the same message identifier is present in multiple translation files, a warning will currently be issued and the last file with the duplicate message identifier will take precedence.
Closes#18276
This commit makes a few minor changes to enable syncing the CLI repository
into google3.
1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
Otherwise, the type defaults to `any`.
All locale i18n options now support an object form which allows a base HREF to be defined for the locale. Each locale can now optionally define a custom base HREF that will be combined with the base HREF defined for the build configuration. By default if the shorthand form for the locale is used or the field is not present in the longhand form, the locale code will be used as the base HREF. To disable automatic augmentation a base HREF value of an empty string (`""`) can be used. This will prevent anything from being added to the existing base HREF.
For common scenarios, the shorthand form will result in the preferred and recommended outcome of each built locale variant of the application containing a defined base HREF containing the locale code.
With this change we retain the order of types are declared in the schema.
Ex:
```json
"oneOf": [
{
"type": "boolean"
},
{
"type": "string",
"description": "The name of the migration to run."
}
]
```
Currently this will result in:
```js
{ type: "string", types: ["string", "boolean"] }
```
This is because we use the order of types from the `allTypes` contant variable.a3a657f7e7/packages/angular_devkit/core/src/json/schema/utility.ts (L12)
Now this will result in:
```js
{ type: "boolean", types: ["boolean", "string"] };
```
The CLI parser will iterate over each type and will set a value of true if `--migrate-only` option is provided.
Related test in the CLL parser
1d105eb569/packages/angular/cli/models/parser_spec.ts (L34)1d105eb569/packages/angular/cli/models/parser_spec.ts (L132-L138)
* feat(@angular-devkit/core): update schema to support new i18n options
"projects": {
"my-app": {
"projectType": "application",
"schematics": {},
"root": "",
"i18n": {
"sourceLocale": "en-US",
"locales": {
"fr": "src/locale/messages.fr.xlf"
}
},
"sourceRoot": "src",
...
}
}
* feat(@angular-devkit/build-angular): add new i18n options to browser and server builders
With this change we add `translateLocales` as new options for i18n in browser and server builders.
We also deprecate the following options;
* i18nLocale
* i18nFormat
* i18nFile
* feat(@angular-devkit/build-angular): deprecate `i18nFormat` and `i18nLocale` options of `extract-i18n` builder
Option `i18nFormat` has been deprecated in favor of `format` and `i18nLocale` option has been deprecated in favor of the `sourceLocale` sub option of the `i18n` project level option.
* feat(@angular/cli): add alias of `i18n-extract` for `x18n` command
* refactor: rename `translateLocales` to `localize`
If a prompt is present on a schema property and the type is an array with a set of enum values, then the prompt type is a list with multiselect capabilites. This eliminates the need to specify the longhand form for typical multiselect prompts.
* feat(@angular-devkit/core): support resetting a memory host
* fix(@ngtools/webpack): cleanup more resources after modules are loaded
Followup to #12994