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.
BREAKING CHANGE: With this change we drop support for the deprecated behaviour to transform `id` in schemas. Use `$id` instead.
Note: this only effects schematics and builders authors.
The dev-infra tooling now directly provides public API change testing capabilities that leverage the `api-extractor` utility. These new testing capabilities are shared with framework and components.
`ts-api-guardian` has been removed as a dependency as a result.
```
DEPRECATION: An asynchronous before/it/after function was defined with the async keyword but also took a done callback. This is not supported and will stop working in the future. Either remove the done callback (recommended) or remove the async keyword.
```
This previously caused an `UnhandledPromiseRejection` which caused tests not to run. But Jasmine, still reported success.
```
yarn bazel test //packages/angular_devkit/core:core_test --test_summary=detailed --test_output=all
INFO: Analyzed target //packages/angular_devkit/core:core_test (1 packages loaded, 10 targets configured).
INFO: Found 1 test target...
Target //packages/angular_devkit/core:core_test up-to-date:
dist/bin/packages/angular_devkit/core/core_test.sh
dist/bin/packages/angular_devkit/core/core_test_loader.js
dist/bin/packages/angular_devkit/core/core_test_require_patch.js
INFO: Elapsed time: 0.327s, Critical Path: 0.03s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
PASSED: //packages/angular_devkit/core:core_test (see /private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/execroot/angular_cli/bazel-out/darwin-fastbuild/testlogs/packages/angular_devkit/core/core_test/test.log)
INFO: From Testing //packages/angular_devkit/core:core_test
==================== Test output for //packages/angular_devkit/core:core_test:
(node:12829) UnhandledPromiseRejectionWarning: Error: Cannot find module '/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/execroot/angular_cli/node_modules/@angular-devkit/core/src/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:303:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:516:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts:10:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Loader.requireShim [as require_] (node_modules/jasmine/lib/loader.js:35:3)
at node_modules/jasmine/lib/loader.js:28:12
at new Promise (<anonymous>)
at Loader.load (node_modules/jasmine/lib/loader.js:27:12)
at Jasmine.loadSpecs (node_modules/jasmine/lib/jasmine.js:91:23)
at Jasmine.execute (node_modules/jasmine/lib/jasmine.js:267:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12829) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:12829) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
================================================================================
Test cases: finished with 1 passing and 0 failing out of 1 test cases
Executed 0 out of 1 test: 1 test passes.
```
AJV only support a single schema with the same ID, compiling schemas async can cause a race condition were multiple schemas with the same name as compiled at the same time.
Closes#20847
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 update ajv to version 8
BREAKING CHANGE: support for JSON Schema draft-04 and draft-06 is removed. If you have schemas using the `id` keyword replace them with `$id`. For an interim period we will auto rename any top level `id` keyword to `$id`.
**NB**: This change only effects schematics and builders authors.
This change provides the first schema validation error to a prompt provider when using a prompt definition's `validate` function. This allows a prompt provider to show additional context to a user when an entered value is invalid.
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