The glob support in the `PatternMatchingHost` class now uses the capabilities of the
`picomatch` package to convert glob strings into regular expressions. This removes
custom string replacement code that previously was used. The `picomatch` package is
already used by `@angular-devkit/build-angular` and is present in the repository but
is a new dependency for the `@angular-devkit/core` package specifically.
The secondary entry point (`node`) within the `@angular-devkit/core` package is
now defined by an exports entry in the main package.json file for the package. This
removes the need for the additional nested package.json file in a subdirectory.
The exports field also contains backward compatible entries to allow for continued
deep imports into the package. These compatibility entries will, however, be removed
in a future major version. Deep imported files are not considered part of the public
API of the package.
BUILD files for each package have had outdated glob excludes removed.
Additionally, some src args have been reduced to a single file where possible.
The root bazel ignore file has also been expanded to include all node module
directories in each package. The ignore file does not appear to currently support
globs so each path has been individually specified.
With commits removes the several deprecated exceptions.
BREAKING CHANGE:
- `ContentHasMutatedException`, `InvalidUpdateRecordException`, `UnimplementedException` and `MergeConflictException` API from `@angular-devkit/core` have been removed in favor of the API from `@angular-devkit/schematics`.
- `UnsupportedPlatformException` - A custom error exception should be created instead.
The deprecated 'defaultProject' workspace option has been removed
BREAKING CHANGE: The deprecated `defaultProject` workspace option has been removed. The project to use will be determined from the current working directory.
G3 is now using RXJS version 7 which makes it possible for the CLI to also be updated to RXJS 7.
NB: this change does not remove all usages of the deprecated APIs.
Closes#24371
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