Commit graph

33185 commits

Author SHA1 Message Date
Kristiyan Kostadinov
6783fb7eae refactor(core): consolidate element end instruction logic (#61409)
There was some identical logic between the `elementEnd` and `elementContainerEnd` instructions. These changes consolidate it.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
049fe82de6 refactor(core): consolidate element start logic (#61409)
The logic for the `elementStart` and `elementContainerStart` instructions was identical. These changes consolidate it into a single base instruction.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
d216ffedbd refactor(core): consolidate first create pass (#61409)
The first create pass for elements and containers was identical. These changes consolidate it to reduce code duplication.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
b785256b9e perf(core): avoid intermediate arrays in definition (#61445)
A minor performance improvement for `ɵɵdefineComponent` where the underlying `extractDefListOrFactory` call had a chain of `.map.filter` which meant that we were unnecessarily creating intermediate arrays just to filter out the null values. These changes switch to simple `for` loop to get around it.

PR Close #61445
2025-05-19 09:20:07 +00:00
Alan Agius
cf8c853523 build: remove @types/diff (#61447)
The latest diff package includes the TS types.

PR Close #61447
2025-05-19 09:17:47 +00:00
Andrew Scott
bdbf616a4e refactor(core): Deprecate fixture.autoDetectChanges(true/false) (#61429)
After nearly a decade of existence, there are 0 uses of
`autoDetectChanges(false)` internally. All uses of
`autoDetectChanges(true)` can be migrated directly to
`autoDetectChanges()` instead.

PR Close #61429
2025-05-19 08:31:37 +00:00
Jonathan Meier
77fa204ad1 fix(compiler-cli): rename flag for enabling fast type declaration emission (#61353)
Rename the flag `_geminiAllowEmitDeclarationOnly` to
`_experimentalAllowEmitDeclarationOnly` as a follow-up on a comment in
PR #61334.

PR Close #61353
2025-05-19 08:27:43 +00:00
arturovt
7aae854f5e refactor(animations): mark non-default new expressions as pure (#61452)
Adds `__PURE__` annotations to non-default `new` expressions to enable tree-shaking, even if they are not referenced. These variables are not dropped when Angular is imported from a module that has `sideEffects` set to `true`.

PR Close #61452
2025-05-19 08:26:56 +00:00
Pawel Kozlowski
69984ef55d refactor(core): move the data store operation out of instructions (#61425)
The view data store operation is not an instruction and shouldn't be
located in the instructions folder.

PR Close #61425
2025-05-19 08:24:45 +00:00
Pawel Kozlowski
bf99954390 refactor(core): move i18n logic into its dedicated package (#61425)
Move the i18n-related logic out of the instructions folder into
the i18n-dedicated folder / package.

PR Close #61425
2025-05-19 08:24:45 +00:00
Kristiyan Kostadinov
7fa3203ee7 refactor(compiler): account for pipes without names (#61328)
Updates the compiler logic to account for pipe definitions that may not have names.

PR Close #61328
2025-05-19 08:24:06 +00:00
Ben Hong
6938d6fb15 docs: add intro to new ssr guide and refactor information architecture (#61377)
PR Close #61377
2025-05-19 08:18:48 +00:00
Angular Robot
41be5ee17e build: update dependency google-closure-compiler to v20250514 (#61439)
See associated pull request for more information.

PR Close #61439
2025-05-19 08:07:48 +00:00
Angular Robot
7ac3643a14 build: update cross-repo angular dependencies (#61435)
See associated pull request for more information.

PR Close #61435
2025-05-19 08:05:40 +00:00
Matthieu Riegler
174893b7e3 docs: replace references to platform-brower-dynamic with platform-brower (#61428)
PR Close #61428
2025-05-19 08:04:51 +00:00
Matthieu Riegler
13e3966584 docs(docs-infra): only show clear button of textfield when there is a text (#61427)
PR Close #61427
2025-05-16 15:57:35 +00:00
Paul Gschwendtner
e4d2347d66 Revert "fix(migrations): avoid applying the same replacements twice when cleaning up unused imports (#59656)" (#61421)
This reverts commit d66881d172.

PR Close #61421
2025-05-16 15:56:44 +00:00
Paul Gschwendtner
ca233446f0 refactor: clean-up deduplication workaround from migrations (#61421)
Since the duplication root-cause was solved by the previous commit, we
can revert/drop the logic that was added back then to overcome this
problem with Tsurge.

PR Close #61421
2025-05-16 15:56:44 +00:00
Paul Gschwendtner
4a3d39cd5a refactor: ensure tsurge migrations have clear ownership of files (#61421)
Currently there can be cases, exlusively in 3P, where multiple tsconfig
projects have overlap of source files. This is the default setup of new
CLI applications as well.

When this is the case, Tsurge will treat each tsconfig as an isolated
compilation unit (given the concepts and mental model to support
scalable batching). This is wrong though, and the same `.ts` source file
can appear in two migration invocations; resulting in duplicate
replacements or analysis (depending on the migration).

We've worked around this problem in the past by deduplicating
replacements, or migrating to an ID-based approach with natural
deduplication. This worked, but it's just working around the root cause.

This commit attempts to fix the root cause by adjusting Tsurge to ensure
that no source file ever appears in two compilation units. This is
naively achieved by not adding a source file to a migration unit, if it
was part of a previous one. This is expected to be fine given the nature
of Tsurge migrations that are built to operate on isolated pieces
anyway— so it shouldn't be problematic if e.g. `app.component.ts` ends
up being part of the test tsconfig compilation unit (we avoid this order
though by visiting build targets first).

PR Close #61421
2025-05-16 15:56:44 +00:00
Matthieu Riegler
693006e219 docs(docs-infra): llms-full.txt (#61356)
This includes a basic script to generate the file from the list of markdown files `llms-list.md`

PR Close #61356
2025-05-16 14:38:02 +00:00
Angular Robot
c335dcd04c build: update cross-repo angular dependencies (#61415)
See associated pull request for more information.

Closes #61400 as a pr takeover

PR Close #61415
2025-05-16 14:30:35 +00:00
Kristiyan Kostadinov
35a40cbec1 build: fix golden approval script (#61407)
Fixes the `update_all_goldens` script which was throwing, because the query command was also capturing the call into yarn and Bazel which in turn caused it to throw an error. I've also added some validation for the number of targets.

PR Close #61407
2025-05-16 13:59:10 +00:00
Kristiyan Kostadinov
92cbd7a412 build: fix symbol extractor script (#61407)
* Fixes that the symbol extractor approval script was broken after some recent build changes.
* Fixes the `run_all_symbol_extractor_tests` script which wasn't resolving any targets, because the rule name changed.

PR Close #61407
2025-05-16 13:59:09 +00:00
Matthieu Riegler
ca700e1def docs(docs-infra): Improve formatting of functions (#61154)
The commit introduce prettier to format some API entries.
For now we'll do only functions are other are a bit more complex because of the support of deprecation.

fixes #59211

PR Close #61154
2025-05-16 13:58:35 +00:00
Paul Gschwendtner
dce497806a build: update dev-infra for latest RBE changes (#61408)
Updates dev-infra for the latest RBE changes.

PR Close #61408
2025-05-16 13:25:34 +00:00
Angular Robot
f1abf3c2a1 build: update github/codeql-action action to v3.28.18 (#61403)
See associated pull request for more information.

PR Close #61403
2025-05-16 11:06:10 +00:00
Paul Gschwendtner
b763059bdd build: migrate packages/core/schematics to ts_project (#61370)
Migrates `packages/core/schematics` to `ts_project`. As part of this,
this commit cleans up some of the mixed module types and tsconfigs in
the folder. A single tsconfig (and it's test variant) are now used.

For the shipped schematics, we explicitly use the `.cjs` extension, so
that the bundles are properly recognized as CommonJS; even if they are
part of the `type: module` `@angular/core` package.

The `package.json` with `type: commonjs` is removed from
`packages/core/schematics` as it's no longer needed given the explicit
extension & caused issues as schematics are compiled with ESM but are
only later bundled for shipping & some tests as ESM.

PR Close #61370
2025-05-16 11:02:07 +00:00
Paul Gschwendtner
8cd0e3f24c build: update legacy ESM interop rules to support explicit .js entrypoints (#61370)
As we migrate more and more code to `ts_project`, we are ending up with
`.js` file extensions (ts_library did generate `.mjs` magically).

Since we don't want to get into the business of migrating
`nodejs_binary` targets at this point (in some cases we might)— we
should support pointing to such files.

PR Close #61370
2025-05-16 11:02:07 +00:00
Paul Gschwendtner
d067dff394 build: migrate more targets of @angular/core to ts_project (#61370)
Migrates more targets of `@angular/core` to `ts_project`. Remaining are:

 - tests
 - schematics

PR Close #61370
2025-05-16 11:02:07 +00:00
Vlad Boisa
3dd2f82be8 docs: fix typos (#61257)
Change grammar and fix typos in docs

Fixes #61244

PR Close #61257
2025-05-16 10:20:34 +00:00
Matthieu Riegler
ac190f4544 docs: fix note formatting about optionam chaining (#61251)
PR Close #61251
2025-05-16 10:09:34 +00:00
Matthieu Riegler
08bf41edb8 docs(docs-infra): fix API query filtering. (#61300)
On `19.2`  we pass an undefined value to the text-field.
But more generaly, the CVA should protect itself if it doesn't recieve an `undefined` value.

fixes #61299

PR Close #61300
2025-05-16 09:57:06 +00:00
Vlad Boisa
1a31c117b7 docs: fix incomplete sentence (#61391)
Fix insufficient sentence.


Fixes #61350
PR Close #61391
2025-05-16 09:35:43 +00:00
Matthieu Riegler
0995cb7756 refactor(core): cleanup after* option types (#61216)
The `phase` property of `AfterRenderOptions`  was removed in #60641.

PR Close #61216
2025-05-16 09:35:08 +00:00
Angular Robot
d59ed604b5 build: update all non-major dependencies (#61168)
See associated pull request for more information.

PR Close #61168
2025-05-16 09:33:25 +00:00
Matthieu Riegler
a0be4c19ff docs: fix Routed components example (#61278)
fixes #61277

PR Close #61278
2025-05-16 09:14:38 +00:00
Kristiyan Kostadinov
fb65ad157c perf(platform-server): speed up resolution of base (#61392)
The `getBaseHref` method is called several times per request and currently queries through the entire document. We can speed it up by taking advantage of the fact that the `<base>` can only be a direct child of the `<head>` and is usually defined towards the beginning. Below are some benchmarks for a "Hello world" app before and after this change.

### Before:
```
Running 60s test @ http://localhost:4202
100 connections with 10 pipelining factor

┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%    │ Avg       │ Stdev    │ Max     │
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼─────────┤
│ Latency │ 568 ms │ 853 ms │ 901 ms │ 904 ms │ 866.58 ms │ 437.6 ms │ 9915 ms │
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg     │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec   │ 490     │ 826     │ 1,006   │ 1,643   │ 1,129.3 │ 234.69  │ 490     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 10.4 MB │ 17.4 MB │ 21.3 MB │ 34.7 MB │ 23.9 MB │ 4.96 MB │ 10.3 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 60

69k requests in 60.04s, 1.43 GB read
90 errors (90 timeouts)
```

### After

```
Running 60s test @ http://localhost:4202
100 connections with 10 pipelining factor

┌─────────┬────────┬────────┬────────┬─────────┬───────────┬───────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%     │ Avg       │ Stdev     │ Max     │
├─────────┼────────┼────────┼────────┼─────────┼───────────┼───────────┼─────────┤
│ Latency │ 471 ms │ 831 ms │ 889 ms │ 1668 ms │ 835.91 ms │ 467.89 ms │ 9720 ms │
└─────────┴────────┴────────┴────────┴─────────┴───────────┴───────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg      │ Stdev  │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec   │ 390     │ 860     │ 1,145   │ 1,572   │ 1,156.77 │ 222.65 │ 390     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 8.24 MB │ 18.2 MB │ 24.2 MB │ 33.2 MB │ 24.4 MB  │ 4.7 MB │ 8.24 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 60

71k requests in 60.03s, 1.47 GB read
140 errors (140 timeouts)
```

PR Close #61392
2025-05-16 09:03:38 +00:00
Angular Robot
7d39b4af2e build: update dependency google-closure-compiler to v20250407 (#61397)
See associated pull request for more information.

PR Close #61397
2025-05-16 08:47:18 +00:00
Angular Robot
743c7cf5d2 build: update cross-repo angular dependencies (#61339)
See associated pull request for more information.

PR Close #61339
2025-05-16 08:45:13 +00:00
Alan Agius
333a0f35dd ci: update step name in workflow (#61393)
This was named incorrectly.

PR Close #61393
2025-05-16 08:32:29 +00:00
Angular Robot
a4bac2a339 docs: update Angular CDK apis (#61395)
Updated Angular CDK api files.

PR Close #61395
2025-05-16 08:30:14 +00:00
Alan Agius
d3f667ab31 Revert "docs: update Angular CDK apis [main] (#61346)" (#61394)
This reverts commit eb9806ab0e so that we can test the workflow.

PR Close #61394
2025-05-16 08:08:44 +00:00
Andrew Scott
8e2ca25e26 fix(core): Testing should not throw when Zone does not patch test FW APIs (#61376)
This prevents `core/testing` from throwing an error if ZoneJS is present
but does not patch the test FW APIs such that `fakeAsync` works
automatically. For example, there is currently no patching of the vitest
APIs, so if you try to use Vitest with Zone on the page, it will throw.

PR Close #61376
2025-05-16 07:53:40 +00:00
Jan Martin
f1fc574920 docs: call out the available variables in track expressions (#61252)
At least to me it was surprising that values from the surrounding
"lexical-ish" scope weren't available in `track <expr>`.

PR Close #61252
2025-05-16 07:51:09 +00:00
Andrew Scott
da67f4705c fix(docs-infra): Correctly support the CLI tutorial type (#61246)
There were a myriad of problems when using the type: 'cli' for a
tutorial:

* Editor component would flicker the non-cli version first since that
  was the default value. Fixed by not showing anything until type is
  available
* Editor component still rendered a split screen when there was no
  preview. Fixed
* Project initialization was incorrect because the terminal would appear
  to be available but really didn't work until dependencies were done
  installing. Fixed by sharing initialization with regular project init
  and piping the install output to the interactive terminal
* Terminals would not work when going from type: 'cli' to another or
  vice versa. This is because the element instance of a terminal cannot
  change once it is opened. Fixed by dispoing and recreating terminals
  when the element changes

PR Close #61246
2025-05-16 07:50:24 +00:00
hawkgs
34f60549f2 refactor(devtools): fix profiler tree map viz background color (#61330)
Fixes a regression caused most likely by #60374.

PR Close #61330
2025-05-16 07:43:51 +00:00
Alan Agius
0c993378ff ci: use current branch as base for pull request (#61390)
Avoid creating new branches since peter-evans/create-pull-request uses the currently checked-out branch as the base.

PR Close #61390
2025-05-16 07:42:18 +00:00
Angular Robot
eb9806ab0e docs: update Angular CDK apis [main] (#61346)
Updated Angular CDK api files.

PR Close #61346
2025-05-16 07:38:42 +00:00
Andrew Seguin
25317dd958 docs: make drag and drop examples preview (#59737)
PR Close #59737
2025-05-16 07:38:03 +00:00
Miles Malerba
a31648d9aa docs: fix embedded preview (#59737)
update the embeddable examples glob to captrue the drag & drop examples,
and fix the current build issues in the drag & drop examples

PR Close #59737
2025-05-16 07:38:03 +00:00