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.
The `seedrandom` dependency is not currently used within the package or project.
As a result, it has been removed to prevent unneeded packages from being installed during development.
BREAKING CHANGE:
The below APIs have been removed without replacement. Users should leverage other Node.js or other APIs.
- `fs` namespace
- `clean`
- `mapObject`
Internally, we've gotten a lot of bugs of users running the CLI in the wrong directory and not understanding this error. Hopefully calling this out more explicitly will key users to double-check their working directory before filing a bug.