375 Commits

Author SHA1 Message Date
Alan Agius
2f70f9554b build: lock file maintenance 2024-03-05 15:59:07 +01:00
Angular Robot
8d09b80be9 build: update dependency picomatch to v4 2024-02-08 11:31:38 +01:00
Charles Lyding
910531a3c8 refactor: remove outdated namespace syntax usage
The `namespace` TypeScript usage within the CLI has been removed. This
syntax is not recommended outside of type definition files.
2024-01-26 08:55:53 +01:00
Charles Lyding
cd08b55ac6 refactor(@angular-devkit/core): remove single usage of const enum
const enums complicate the potential use of the TypeScript isolatedModules option.
2024-01-25 18:46:41 +01:00
Angular Robot
248b4c9a75 build: update all non-major dependencies 2024-01-23 10:52:36 +01:00
Alan Agius
d77c005313 fix(@angular-devkit/core): retain existing EOL when updating workspace config
This commit updates the JSON utility to retain the existing EOF when updating the workspace config.
2024-01-05 16:30:06 +01:00
Alan Agius
11420667f9 build: use single Node.js toolchain to run unit tests
E2E tests are used to run tests on multiple platforms and node.js versions.
2023-10-30 17:50:47 +01:00
Angular Robot
0155ae73b2 build: update dependency picomatch to v3 2023-10-30 08:59:54 +01:00
Charles Lyding
f9372acb1a refactor(@angular-devkit/core): use picomatch for PatternMatchingHost glob support
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.
2023-08-30 09:08:39 +02:00
Charles Lyding
e037dc9675 refactor(@angular-devkit/core): use package exports field for secondary entries
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.
2023-05-23 10:36:29 -04:00
Charles Lyding
11e0a51b17 build: minor cleanup of bazel build rules
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.
2023-05-22 09:36:44 -04:00
Alan Agius
a70e7a42f1 refactor(@angular-devkit/core): update stringToFileBuffer and fileBufferToString to use TextDecoder and TextEncoder
`TextDecoder` and `TextEncoder` can now be used on Node.js
2023-05-10 15:33:35 +00:00
Angular Robot
367ddabed0 build: update dependency rxjs to v7.8.1 2023-04-27 10:01:39 +00:00
Kristiyan Kostadinov
f3070f2e93 build: update to TypeScript 5.0
Updates the repo to TypeScript 5.0.0-beta. The remaining usages in tests and schematics will be updated once the 5.0 final version is released.
2023-03-02 18:59:49 +00:00
Alan Agius
0ad81cdbc7 refactor(@angular-devkit/core): remove deprecated exceptions
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.
2023-02-21 16:56:43 +00:00
Alan Agius
d58428d3db feat(@angular/cli): remove deprecated defaultProject from workspace configuration
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.
2023-02-17 16:10:21 +00:00
Alan Agius
8095268fa4 build: update to rxjs 7
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
2023-02-16 14:59:40 +00:00
Alan Agius
f6624b974f feat(@angular-devkit/core): update SchemaRegistry compile to return Promise
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.
2023-02-15 21:03:30 +00:00
Alan Agius
f6f5d79199 fix(@angular-devkit/core): handle number like strings in workspace writer
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
2023-01-19 22:13:34 +00:00
Angular Robot
df5ca315a6 build: update all non-major dependencies 2023-01-06 15:04:14 +00:00
Charles Lyding
7f93735e98 build: use bazel to perform release builds
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.
2023-01-05 03:21:58 +00:00
Angular Robot
e333eabef9 build: update all non-major dependencies 2022-11-14 09:30:15 -08:00
Charles Lyding
18b72a8cb5 refactor(@angular-devkit/core): remove unneeded import statements from Node.js file host
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.
2022-11-04 11:06:44 -07:00
Günhan Gülsoy
c3a3871312 refactor: Make Logger.forEach compatible with both rxjs 6 and 7.
Some build environments build angular with rxjs 7, and see build
failures due to this file.
2022-10-25 10:52:01 -07:00
Alan Agius
cf1b7789a5 fix(@angular-devkit/core): update logger forEach promiseCtor type
`typeof Promise` and `PromiseConstructorLike` are not the same thing. This causes issues in G3 when `strictNullChecks` are being enabled using RXJS 7.
2022-10-14 15:26:47 +02:00
Alan Agius
c969152de6 refactor: remove analytics API from core and architect
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`.
2022-10-11 18:52:30 +02:00
Günhan Gülsoy
2230374e18 refactor: remove add implicate types for better code readability
When strictNullChecks in enabled in TS compiler, the following files
cause some failures in certain environments. Fix these failures.
Also update outdated goldens.
2022-10-10 12:22:56 +02:00
Alan Agius
93adeeb798 refactor: move experimental jobs API from @angular-devkit/core to @angular-devkit/architect
With this change we move `jobs` APIs to `@angular-devkit/architect` as this are intended to used with `@angular-devkit/architect`.
2022-10-07 11:09:53 -04:00
AgentEnder
86150d9ddc fix(@angular-devkit/core): project extension warning message should identify concerned project 2022-10-07 10:34:32 -04:00
Alan Agius
ea4c0aa2e8 fix(@angular-devkit/core): throw error when project has missing root property
BREAKING CHANGE: Workspace projects with missing `root` is now an error.
2022-09-21 14:42:25 -04:00
Jason Bedard
4de9045de8 test: unit test multiple node versions in separate jobs 2022-09-14 10:43:17 -07:00
Charles Lyding
b2add316e7 build: remove unneeded BUILD file licenses rule comments 2022-09-13 10:33:49 -07:00
Charles Lyding
f33fb34ae1 build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-09-01 06:24:31 -04:00
Charles Lyding
e402c2358c build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-08-31 08:37:19 -04:00
Angular Robot
56b3299f12 build: update all non-major dependencies 2022-08-30 08:54:10 -04:00
Jason Bedard
1cc2d655e5 build: allow no-remote-exec targets to be cached on CI 2022-08-29 08:16:30 -04:00
Kristiyan Kostadinov
48dec89e91 build: update to TypeScript 4.8 RC
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.
2022-08-22 15:28:47 -06:00
Alan Agius
4368c85983 refactor: remove unused local variables 2022-08-12 08:19:26 -04:00
Charles Lyding
ddf1257d14 refactor(@angular-devkit/core): remove deprecated rxjs empty function usage
The RxJS `empty` function is deprecated and will be removed in future versions.
The `EMPTY` constant is the recommended replacement.
2022-08-11 13:00:48 -04:00
AgentEnder
db17eac251 fix(@angular-devkit/core): update workspace extension warning to use correct phrasing 2022-08-11 11:56:12 -04:00
Jason Bedard
db5c1fc13c test: run tests on multiple node versions 2022-08-03 10:33:46 -07:00
Charles Lyding
fa0404daf4 refactor(@angular-devkit/core): add allowed extensions options to JSON workspace reader
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.
2022-07-28 09:46:29 +02:00
Paul Gschwendtner
087ab46ca9 build: update dev-infra packages and account for build-tooling split from ng-dev
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.
2022-07-27 12:35:15 +02:00
Alan Agius
e63375ea39 fix(@angular-devkit/core): classify string util should concat string without using a .
`.` 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
2022-07-21 19:18:48 -04:00
Angular Robot
0a990c525a build: update all non-major dependencies 2022-07-14 15:21:03 -07:00
Katerina Skroumpelou
9defbdf534 fix(@angular-devkit/core): log name of invalid extension too 2022-07-14 15:15:29 -07:00
Fortunato Ventre
3ec69320f0 fix(@angular-devkit/core): add i18n as valid project extension
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.
2022-07-14 15:15:07 -07:00
Alan Agius
624e0b0ec6 fix(@angular-devkit/core): provide actionable warning when a workspace project has missing root property
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
2022-07-08 15:57:51 +02:00
renovate[bot]
04160c58ce build: update all non-major dependencies 2022-06-27 08:15:08 -04:00
Alan Agius
1af3f71aa2 fix(@angular-devkit/core): workspace writer skip creating empty projects property
Before
```json
{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "projects": {},
  "cli": {
    "analytics": false,
    "warnings": {
      "versionMismatch": false
    }
  }
}
````

After
```json
{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "cli": {
    "analytics": false,
    "warnings": {
      "versionMismatch": false
    }
  }
}
```
2022-06-22 10:37:25 -07:00