257 Commits

Author SHA1 Message Date
Alan Agius
e7413d3ae1 refactor: reduce dependencies on @angular-devkit/core
By converting schemas from TypeScript `interfaces` to `types`, we can minimize the reliance on `json.JsonObject`. This approach avoids the error "Type 'Schema' does not satisfy the constraint 'JsonObject'" caused by the missing index signature for type 'string' in 'Schema'.
2025-01-21 16:36:23 +01:00
Paul Gschwendtner
14584f0bfd build: migrate @angular-devkit/build-webpack tests to rules_js
Migrates the `@angular-devkit/build-webpack` jasmine tests to
`rules_js`. This requires wiring up in the pnpm workspace.

Additionally `typescript` is added as it was missing as a "peer
dependency" at runtime for `@ngtools/webpack`. This is expected, and
we're already adding other peer deps before this change.
2025-01-21 09:25:54 +01:00
Paul Gschwendtner
96b6a16a65 refactor: add explicit types for createBuilder exports
This is necessary as with the new compilation, leveraging pnpm-linked
first party dependencies, there are cases **during migration** where
multiple locations of the same package exist. e.g.

- `@angular_devkit/architect/node_modules/@angular-devkit/core` (pnpm package output)
- `@angular_devkit/core` (plain js sources)

This is fine, and there is no risk of wrong types, and this should only
occur during migration anyway, but it causes a few type issues as
TypeScript is unable to emit proper types for inference. This is okay,
as we'd likely even want to make use of `isolatedDeclarations` at some
point, but we just add explicit types right now.

(also making `Builder` type more type safe, checking assignability
properly).
2025-01-15 19:20:40 +01:00
Paul Gschwendtner
4fee94a96c build: rename //:root_modules to //:node_modules.
This is necessary as `rules_js` requires this "common name" when dealing
with Yarn workspaces, linking first party dependencies automatically.

In the future, we may be able to send a PR to `rules_js` to support a
custom name somehow.
2025-01-15 19:20:40 +01:00
Paul Gschwendtner
edca9b2e04 build: migrate @angular-devkit/build-webpack to npm_package
Updates to the `rules_js` npm archive rule, as part of the overall
migration effort.
2025-01-14 16:06:07 +01:00
Paul Gschwendtner
a8335cf950 build: never use interop targets for ts compilations
* Removes `interop_deps` from the `ts_project` interop macro.
* Keeps `_rjs` suffix for now as we still need the interop targets for
  e.g. `jasmine_node_test` and the `rules_nodejs` linker.

In follow-ups we can remove the suffix, and interop layer.
2025-01-09 09:42:06 +01:00
Charles Lyding
b4e9a2af9e build: migrate @angular-devkit/build-webpack to ts_project
The `@angular-devkit/build-webpack` package has been migrated to the `rules_js` ts_project rule.
2024-12-21 12:58:54 -05:00
Paul Gschwendtner
cdf5d86688 build: improve ts_project hybrid interop with node modules
Currently the interop resulting target of a `ts_project` ends up not
necessarily working at runtime. This may be the case because a consuming
Node program may end up with mixes of `node_modules` dependencies from
`rules_nodejs` (old) and `rules_js` (new). This sounds fine at first
glance, but in practice can break very subtly because:

* Rules NodeJS leverages the linker, creating `node_module` directories
  outside of Bazel, at runtime. These don't depend on symlink resolving.
* Rules JS puts real node module folders via Bazel actions. These rely
  on `pnpm` non-hoisting layout, and symlink resolving.

As we can see there is a hard conflict with symlinks. They need to be
enabled with the new toolchain, but the other one doesn't enable symlink
resolution, and enabling is not possible as we'd otherwise risk escaping
the sandbox and cause even more subtle errors.

A good compromise solution is to automatically drop the `rules_js` node
module files/folder in the interop-`rules_nodejs` target and instead
brining in the equivalent `@npm//` dependencies from `rules_nodejs`.
This kind of keeps the logic similar to when not using `rules_js` or the
interop, and enables the simplest & safest mental model; and it works
compared to other solutions I tried with symlinking. Notably, we can't
keep both node module variants as the linker doesn't override existing
node module files from e.g. rules_js then (and would break then).
2024-12-19 12:21:37 -05:00
Angular Robot
ffad81a4de build: update all non-major dependencies 2024-12-06 10:14:31 +01:00
Alan Agius
f2571b3251 build: update all non-major dependencies 2024-12-04 15:37:27 +01:00
Angular Robot
69768bdaa4 build: update all non-major dependencies 2024-11-01 08:25:17 -04:00
Alan Agius
3cbbf456c1 refactor: handle standalone by default change
In tests, add `standalone: false` where it's missing.

Note: In the future, we should update our integration tests to use a standalone app.
2024-10-17 14:20:52 +00:00
Alan Agius
422e847a39 build: update all non-major dependencies 2024-09-27 14:49:44 -04:00
Alan Agius
358f85e4d2 build: update dependency webpack to v5.94.0 2024-08-23 13:55:59 +02:00
Angular Robot
81a3563b6f build: update all non-major dependencies 2024-07-12 11:19:35 +02:00
Charles Lyding
39f946a848 build: enabled isolated modules TypeScript option
The TypeScript `isolatedModules` option is now enabled for all TypeScript
code within the repository. As a result, all packages will now be built
with the option enabled. This does not affect projects created with the CLI
and is only related to the building of the actual Angular CLI code.
The `isolatedModules` option ensures that code can be emitted without the
TypeScript typechecker and allows tools other than TypeScript to potentially
be used. Code was updated to correct all errors after the option was enabled.
Additionally, some early code fixes were done to add function and accessor
return types to prepare for future `isolatedDeclarations` usage. More changes
would be needed to consider turning on `isolatedDeclarations`, however.
2024-06-23 15:34:49 +02:00
Angular Robot
a442f8c3a3 build: update all non-major dependencies 2024-06-20 09:15:40 +02:00
Angular Robot
a4d81759b8 build: update all non-major dependencies 2024-06-13 08:15:35 -04:00
Alan Agius
60b7c13bdd refactor: format bazel build files
The formatter does not automatically fix these failures.
2024-06-06 11:12:06 +02:00
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
David LJ
d24b087eff docs: update browser support links aio->adev 2024-05-27 08:31:53 +02:00
Alan Agius
0b8f53bc5f build: update all non-major dependencies 2024-03-21 09:30:08 -04:00
Alan Agius
e729f6ea10 build: update dependency webpack-dev-server to v5 2024-03-11 19:00:54 +01:00
Charles Lyding
422a9eaa70 build: update webpack to v5.90.3 2024-02-26 13:18:37 -05:00
Alan Agius
1011f3185d build: update all non-major dependencies 2024-02-02 09:56:02 -05:00
Angular Robot
eadd898e96 build: update all non-major dependencies 2024-01-25 09:35:26 +01:00
Charles Lyding
810d22114c refactor(@angular-devkit/build-webpack): align builders source directory structure with build-angular
The source code for the builders within the `@angular-devkit/build-webpack` package have been moved
into a `builders` subdirectory to more closely align with the structure of the builders in the
`@angular-devkit/build-angular` package. An initial `package.json` exports field definition has also
been added that currently continues to allow deep imports.
2023-12-05 10:05:05 -05:00
Charles Lyding
e588e84160 test: remove node-fetch package usage
Native fetch support is now available in Node.js and the `node-fetch` package can now be removed.
2023-10-31 08:57:42 +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
8a47ddbd24 build: update all non-major dependencies 2023-10-16 12:16:58 -07:00
Alan Agius
c0eb2eb5fd build: update Angular to 17.0.0-next.5 2023-09-20 21:27:35 +02:00
Angular Robot
a0bf9462f5 build: update all non-major dependencies 2023-07-18 15:30:12 -07:00
Charles Lyding
333da08ea2 build: update webpack to v5.88.1 2023-06-30 20:07:47 +02:00
Angular Robot
fdd1958941 build: update all non-major dependencies 2023-06-27 07:00:12 +02:00
Alan Agius
aa0370a1c4 build: update build-tooling package and enable Node.js 18 tests
This commit updates the build-tooling package which contains fixes for RBE on Node.js 18. It also enables the Node.js 18 test suit.
2023-06-16 12:05:22 -04:00
Angular Robot
bb4c9c82e8 build: update all non-major dependencies 2023-06-15 09:59:43 -04:00
Alan Agius
051998c908 build: update all non-major dependencies
(cherry picked from commit 310fef6e9028dbc95dc1456e37e294201fc247c3)
2023-06-08 17:27:38 +02:00
Alan Agius
bc48a0db31 build: update all non-major dependencies 2023-06-07 15:26:36 +02:00
Alan Agius
1225ce4dc4 build: update all non-major dependencies 2023-05-31 10:22:08 -04:00
Kristiyan Kostadinov
b076a6f4ef build: update to TypeScript 5.1
Bumps up the dev depdencies to TypeScript 5.1-beta and expands the allowed version ranges to prepare for the final release.
2023-05-26 10:34:32 -04:00
Alan Agius
b628cff77b build: update all non-major dependencies
(cherry picked from commit 1afbec1e36708737b6ae75277e0649d0e334d1b2)
2023-05-19 17:14:01 +02:00
Angular Robot
419cc8282e build: update all non-major dependencies 2023-05-12 15:56:22 -04:00
Angular Robot
67e940635c build: update all non-major dependencies 2023-05-04 20:26:09 +00:00
Angular Robot
ae54da2990 build: update all non-major dependencies 2023-04-27 10:07:18 +00:00
Angular Robot
367ddabed0 build: update dependency rxjs to v7.8.1 2023-04-27 10:01:39 +00:00
Angular Robot
7a7ad7fe85 build: update all non-major dependencies 2023-04-25 15:18:20 +00:00
Angular Robot
083ab8067c build: update all non-major dependencies 2023-04-12 20:00:35 +00:00
Angular Robot
bbf871c817 build: update all non-major dependencies 2023-04-11 21:33:57 +00:00
Alan Agius
295b8488a4 build: update all non-major dependencies
(cherry picked from commit 497da48086f84a8e7f260dcd817ffbe84ef7765e)
2023-04-05 10:26:32 +00:00
cexbrayat
202e9a50f6 fix(@schematics/angular): remove compileComponents from component test schematic
`compileComponents` is not necessary when using the CLI (as the templates are inlined) and just adds boilerplate code. So we can remove it from the test schematic and make it independent from `async/await` (only place we would have it in the CLI generated code, and in most Angular apps).
2023-03-24 18:30:26 +00:00