Commit graph

33088 commits

Author SHA1 Message Date
Paul Gschwendtner
397f9987ef build: support new ng_project rule (#61275)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61275
2025-05-14 12:01:51 +00:00
Alan Agius
a7b58e3c5a build: update dependency @rollup/plugin-node-resolve to v16 (#61326)
See associated pull request for more information.

Closes #61323 as a pr takeover

PR Close #61326
2025-05-14 11:18:15 +00:00
Angular Robot
0fc0d67146 build: update cross-repo angular dependencies (#61286)
See associated pull request for more information.

PR Close #61286
2025-05-14 10:43:35 +00:00
Kristiyan Kostadinov
3aef3e64cd refactor(language-service): rename all references to selectorless directives (#61307)
Follow-up to #61240 that adds renaming support for selectorless components/directives both from the template and from the TypeScript source.

PR Close #61307
2025-05-14 11:06:22 +02:00
Kristiyan Kostadinov
f6bb6cc09a build: set up runtime tests for selectorless (#61307)
Sets up the tests for the selectorless runtime so that we can easily start writing them when we get to it. The tests need to be AoT compiled so they're defined as a separate target from the other `acceptance` tests.

PR Close #61307
2025-05-14 11:06:22 +02:00
Kristiyan Kostadinov
eae1083a54 refactor(compiler): indicate in AST if node is self-closing (#61307)
Follow-up from https://github.com/angular/angular/pull/61240#discussion_r2084445328. Adds a `isSelfClosing` property on element-like AST nodes so consumers can easily determine if it's self-closing, rather than having to look at the spans. This is useful for migrations and in the language service.

PR Close #61307
2025-05-14 11:06:22 +02:00
Paul Gschwendtner
84d50d205a refactor: support arbitrary stats/metrics in tsurge (#61272)
Supports arbitrary stats/metrics in Tsurge. This will make
complex analysis easier as we aren't bound to just `Record<string,
number>` counters.

PR Close #61272
2025-05-14 11:05:55 +02:00
Paul Gschwendtner
3d0ecb2273 refactor: remove unused beam pipeline code (#61272)
We don't need this logic anymore as we combine in batches and don't deal
with bulk data files that combine all units.

PR Close #61272
2025-05-14 11:05:55 +02:00
cexbrayat
4058f8d202 refactor(core): remove leftover todos in integration tests (#61313)
The TODOs can be removed as the tests were fixed in 193bd7c54a

PR Close #61313
2025-05-14 10:16:14 +02:00
Angular Robot
c34efccef0 build: lock file maintenance (#61266)
See associated pull request for more information.

PR Close #61266
2025-05-13 16:35:32 -07:00
Miles Malerba
612e3970de docs: update references to the cdk/testing apis (#60853)
PR Close #60853
2025-05-13 16:32:35 -07:00
Miles Malerba
cf57c3a073 docs: generate api pages for cdk (#60853)
Generates html for the cdk api pages based on the json files imported
from angular/cdk-builds

PR Close #60853
2025-05-13 16:32:35 -07:00
Kristiyan Kostadinov
8f2874e86d fix(compiler): incorrectly handling let declarations inside i18n (#60512)
The compiler wasn't handling `@let` declarations placed inside i18n blocks. The problem is that `assignI18nSlotDependencies` phase assigns the `target` of i18n ops much earlier than the `@let` optimization. If the `@let` ends up getting optimized because it isn't used in any child views, the pointer in the i18n instruction becomes invalid. This hadn't surfaced so far, because we didn't optimize `declareLet` ops, however once we do, we start hitting assertions that the optimized `declareLet` isn't used anywhere.

These changes resolve the issue by moving the i18n phases after the `@let` optimization.

PR Close #60512
2025-05-13 16:31:38 -07:00
Kristiyan Kostadinov
a6b7b9b8c5 perf(compiler): reduce allocations for let declarations only used in the same view (#60512)
We have some code that avoids `storeLet` calls for declarations only used in the same view, however we didn't previously remove the corresponding `declareLet` calls, because of the following case:

```
@let foo = something$ | async; <!-- First in the template -->
{{foo}}
```

Here we need a `TNode` (created by `declareLet`) in order for DI to work correctly. Since this is only required when using pipes, we can optimize away expressions that do not have pipes.

PR Close #60512
2025-05-13 16:31:38 -07:00
Paul Gschwendtner
810b0a7e5c refactor: add explicit types for exports relying on inferred call return type (#61312)
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).

These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!

To improve code quality and keep the existing behavior working, we are
doing the following:

- adding a lint rule that reduces the risk of such imports breaking. The
  failure scenario without the rule is that API goldens show unexpected
  diffs, and types might be duplicated in a different package!

- keeping the `<amd-module` headers, but we manually insert them into
  the package entry-points. This should ensure we don't regress
  anywhere; while we also improved general safety around this above.

Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.

PR Close #61312
2025-05-13 22:45:18 +00:00
Matthieu Riegler
dd25f3d20f refactor(core): remove USE_RUNTIME_DEPS_TRACKER_FOR_JIT flag. (#61265)
The code has been migrated in G3, this flag is no longer necessary.

PR Close #61265
2025-05-13 15:22:18 -07:00
Alan Agius
b4c383b274 build: do not auto install peer dependencies (#61294)
Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue to rely on peer dependency placeholders substituted via Bazel.

PR Close #61294
2025-05-13 08:55:42 +00:00
Alan Agius
9085134474 ci: disable updates for @angular/build-tooling (#61294)
This package requires some work to be updated.

PR Close #61294
2025-05-13 08:55:42 +00:00
Alan Agius
cda963600f ci: refactor renovate config to use dev-infra preset (#61268)
This change uses the dev-infra preset.

PR Close #61268
2025-05-12 15:36:32 -07:00
Kristiyan Kostadinov
4dc7136c49 refactor(migrations): remove unused code (#61260)
The `waitForAsync` rule has been disabled internally which allows us to delete its code, as well as some unused adjacent code.

PR Close #61260
2025-05-12 15:34:07 -07:00
Andrew Scott
1755e09d0a refactor(docs-infra): Clean up embedded editor code (#61242)
This commit cleans up the embedded editor code quite a bit by making
better use of current signal APIs

PR Close #61242
2025-05-12 15:32:25 -07:00
Kristiyan Kostadinov
fa27b76339 refactor(language-service): initial reference and rename implementation for selectorless (#61240)
Adds an initial implementation for finding references and renaming to selectorless components/directives.

Finding references should work everywhere, whereas renaming only currently works when initiated from the template.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
f074c30616 refactor(language-service): support quick info selectorless symbols (#61240)
Updates the language service to produce quick info for selectorless components and directives.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
cec512fdfd refactor(language-service): support definitions for selectorless (#61240)
Updates the language service to handle producing definition information for selectorless components and directives.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
c69dda61c2 refactor(language-service): set up template targets for selectorless (#61240)
Adds the logic to resolve the template targets for the selectorless component and directive nodes. This is a prerequisite for other functionality.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
109e49c31e refactor(compiler-cli): produce template symbols for selectorless nodes (#61240)
Updates the template type checker to produce symbols for selectorless nodes. This is necessary for integration into the language service.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
c439d6938d fix(compiler-cli): symbol builder duplicating host directives (#61240)
The template symbol builder works by finding the variables referring to template AST nodes with specific offsets and resolving them to directives. Afterwards it goes through the directives and resolves their host directives.

The problem is that host directives are added with the exact same offsets as their host which means they get added once initially and again when resolving host directives.

These changes resolve the issue by de-duplicating them.

PR Close #61240
2025-05-12 15:31:44 -07:00
Angular Robot
8f9a21ae6f build: update cross-repo angular dependencies (#61234)
See associated pull request for more information.

PR Close #61234
2025-05-12 15:30:57 -07:00
Joey Perrott
70f2031527 build: migrate service-worker package to use ts_project (#61226)
Migrate the package to using rules_js

PR Close #61226
2025-05-12 15:29:28 -07:00
Charles Lyding
f03ff5acf9 fix(compiler-cli): avoid fatal diagnostics for invalid module schemas (#61220)
In the event of an invalid `schemas` field for an Angular module, an
empty schema array will now be used instead of a fatal error occurring.
A build will still fail in this case with the error reported as a
diagnostic. However, for the language service, this allows the module
to exist in the compiler registry and prevents cascading diagnostics
within an IDE due to "missing" modules/components. The originating
schema related errors will still be reported in the IDE.

PR Close #61220
2025-05-12 15:28:45 -07:00
Matthieu Riegler
ba38e1c301 docs(docs-infra): preselect search text on re-open (#61129)
PR Close #61129
2025-05-12 15:25:50 -07:00
Andrew Scott
3c9b8d9de5 refactor(docs-infra): Remove rethrowing error handler (#61243)
This is no longer necessary since the work in the FW to rethrow in the
TestBed error handler.

PR Close #61243
2025-05-09 10:40:14 -07:00
Jens Kuehlers
9fb0fc84dc docs: change supported versions when v20 releases (#61238)
PR Close #61238
2025-05-09 10:33:35 -07:00
Alan Agius
a5f016541b refactor: remove redundant renovate setting (#61232)
Remove `pinDigests` as we do update docker images.

PR Close #61232
2025-05-09 10:32:56 -07:00
Matthieu Riegler
fd5a92d3e0 build: force resolution of @angular/core to recent version (#61128)
This intends to fix the Angular Language service issues for devtools/adev because it pulls the version from the node_modules and it currently is 14.3.0.

PR Close #61128
2025-05-09 10:30:16 -07:00
Matthieu Riegler
3eeea56ba0 refactor(core): remove compileComponents invocations (#61032)
Those weren't necessary.

PR Close #61032
2025-05-09 10:27:14 -07:00
Hakeem
108043fa76 docs(docs-infra): limit the flexible width of the main content for better UX (#58831)
PR Close #58831
2025-05-09 10:24:13 -07:00
ahmadhakeem18
20fdeab612 docs(docs-infra): fix the global layout of the site (#58831)
take the full width of the page for all the pages that use docs-viewer, also reserve an area for table of contents on-demand

Resolves: #52648

PR Close #58831
2025-05-09 10:24:13 -07:00
Miles Malerba
c0e9fc103f docs: rename @nodoc to @docs-private (#61194)
This aligns with how angular/components marks their hidden APIs.
`@nodoc` has been broken since the switch to adev, this change should
properly hide the APIs again.

PR Close #61194
2025-05-09 10:23:00 -07:00
Joey Perrott
12a5b7bb86 build: migrate upgrade package to use ts_project (#61245)
Migrate the package to using rules_js

PR Close #61245
2025-05-09 16:43:04 +00:00
Joey Perrott
5f1c08d75f build: migrate adev shared-docs package to use ts_project (#61193)
Migrate the build rules for shared docs to use ts_project

PR Close #61193
2025-05-09 16:30:05 +00:00
Paul Gschwendtner
d02165d639 build: remove unused debugging leftover from RBE investigation (#61181)
This log output doesn't provide any benefit anymore, so we can remove
it.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
10bc80a788 build: migrate compiler-cli/src/ngtsc to ts_project (#61181)
Migrates all of `compiler-cli/src/ngtsc` to `ts_project`. This change
was generated using Gemini.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
81566ec1dc build: migrate manual_api_docs to rules_js (#61181)
Migrates `manual_api_docs` to `rules_js`. Since compiler CLI is ESM
compiled but doesn't have extensions, we can either bundle or simply use
the dependency as type only. This is easier and sufficient for this
use-case.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
32c4792667 build: migrate compiler-cli/src/ngtsc/docs to ts_project (#61181)
Migrates `compiler-cli/src/ngtsc/docs` to `ts_project`.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
54e785683a build: prepare for compiler-cli to be using ts_project (#61181)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61181
2025-05-09 15:59:46 +00:00
Alan Agius
83c22ec904 ci: restore .npmrc before executing postUpgradeTasks (#61239)
Renovate temporarily modifies the `.npmrc` file during its operations and reverts these changes afterward. However, during `postUpgradeTasks`, the non reverted `.npmrc` will lead to errors when running `yarn bazel sync --only=repo`

See: https://github.com/renovatebot/renovate/discussions/14897

PR Close #61239
2025-05-09 14:25:49 +00:00
Paul Gschwendtner
c8dfe6da34 ci: ensure pnpm-lock file and aspect lock files are up-to-date (#61224)
Ensures that the pnpm lock file and Aspect lock files are up-to-date
in PRs.

PR Close #61224
2025-05-09 11:54:38 +02:00
Paul Gschwendtner
838ad545af build: update pnpm-lock file and aspect lock files (#61224)
These files apparently need an update. Likely `main` is not properly
updated.

PR Close #61224
2025-05-09 11:54:38 +02:00
Alan Agius
db06708e5e ci: update workflow to clone repo with history (#61223)
Tentative fix for:
```
Adding upstream remote: ***github.com/angular-robot/angular.git
origin	https://github.com/angular/angular (fetch)
origin	https://github.com/angular/angular (push)
upstream	***github.com/angular-robot/angular.git (fetch)
upstream	***github.com/angular-robot/angular.git (push)
Pushing 19.2.x from origin to angular-robot upstream...
To https://github.com/angular-robot/angular.git
 ! [rejected]        19.2.x -> 19.2.x (stale info)
error: failed to push some refs to 'https://github.com/angular-robot/angular.git'
```

PR Close #61223
2025-05-08 11:56:57 -07:00