Use promise based methods to reduce RXJS usage and boiler-platting.
BREAKING CHANGE: Several changes to the `SchemaRegistry`.
- `compile` method now returns a `Promise`.
- Deprecated `flatten` has been removed without replacement.
The workspace writer previously transformed number like strings to numbers which causes failures when a project is named using a number like name.
Closes#24541
When performing a release via the dev-infra `ng-dev` tooling, the release
builds for the packages that will be published are now performed using bazel.
Prior to this, the release builds were performed using a custom build script
that programmatically invoked TypeScript APIs. The Bazel build and discovery
process for the releasable packages is performed by a script that is based on
the scripts from components and framework repositories. Several small modifications
were performed to match the behavior and structure of the cli repository:
* Use of `packages` as the source root in the bazel query
* Use of `pkg_npm` rule in the bazel query
* Partial transition to native Node.js `fs` APIs instead of `shelljs`
* Directory creation per package when copying output (supports multiple package scopes)
* Copying of archives (tgz) for each package
The snapshot and local build capabilities are not modified as part of this change
but will be merged in a followup as part of a larger transition to use bazel
throughout the package build process.
This reduces the number of imports for the Node.js file host classes. The `fs` default
import was only used in one place and named imports were already in use for `node:fs`
which allowed the one use to be converted to a named import. The type only import for
`chokidar` was also only used in one type annotation and was moved to the type
annotation directly.
All analytics is now in the @angular/cli package
BREAKING CHANGE: analytics APIs have been removed without replacement from `@angular-devkit/core` and `@angular-devkit/architect`.
When strictNullChecks in enabled in TS compiler, the following files
cause some failures in certain environments. Fix these failures.
Also update outdated goldens.
Updates to the TypeScript 4.8 RC and adds some code to account for a breaking change where the decorators and modifiers of an AST node have been combined into a single array.
Adjust the internal `readJsonWorkspace` to allow for future generalization
of the allowed unprefixed extension fields for the workspace and project objects.
Custom fields that start with a one to three lowercase letter prefix are still
allowed in both locations.
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.
`.` is not a valid character in ES6 class names.
Prior to this change `foo.module` before used to be incorrectly classified to `Foo.Module` instead of `FooModule`.
Closes#13824
When parsing the angular.json file, the 'i18n' key used to configure localization in a localized project should be treated as a special project extension key.
This fixes the warning "Project extension with invalid name found." printed when starting/building the project.
The `root` property is required in a workspace project. Now we issue an actionable warning message when this is missing.
Note: this will become an error in the next major version.
Closes: #21310
Prepares the `@angular-devkit/core` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
The `deepCopy` utility function previously set its internal tracking symbol property to `undefined` after completion.
However, this still caused the property to exist with a value of `undefined`. Jasmine 4.1 now checks for symbols with
its `toEqual` expectation which resulted in failing tests. The internal tracking symbol property is now removed instead
via `delete`.
This is not needed as inputs are typed checked to be `JsonValue`. With this change we get a step closer to remove `fast-json-stable-stringify` dependency.
With this change we deprecate exception classes that are not used in the CLI repo.
DEPRECATED:
- `ContentHasMutatedException`, `InvalidUpdateRecordException`, `UnimplementedException` and `MergeConflictException` symbol from `@angular-devkit/core` have been deprecated in favor of the symbol from `@angular-devkit/schematics`.
- `UnsupportedPlatformException` - A custom error exception should be created instead.
These changes include fixes to tests, timeout and stop of architect to make tests work with Jasmine 4.
One noticeable change that when we didn't stop architect through `run.stop()` this causes Bazel to timeout now.
Example
```
-- Test timed out at 2022-03-24 12:07:07 UTC --
/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/sandbox/darwin-sandbox/398/execroot/angular_cli/bazel-out/darwin-fastbuild/bin/packages/angular_devkit/build_angular/build_angular_browser_test.sh.runfiles/angular_cli/packages/angular_devkit/build_angular/build_angular_browser_test.sh: line 424: 41835 Terminated: 15 "${node}" ${LAUNCHER_NODE_OPTIONS[@]+"${LAUNCHER_NODE_OPTIONS[@]}"} ${USER_NODE_OPTIONS[@]+"${USER_NODE_OPTIONS[@]}"} "${MAIN}" ${ARGS[@]+"${ARGS[@]}"} 0<&0
```
With this change we replace the custom dimension 8 `AOT Enabled`, with `Angular CLI Major Version`. The motivation behind replacing this dimension is that the there is already an `aot` dimension with id 13 which serves for the same purpose.
More information to why we need a new dimension for the Angular CLI major version can be found #22130Closes#22130
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.
BREAKING CHANGE:
Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.