Commit graph

36863 commits

Author SHA1 Message Date
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
Andrew Seguin
086d2f70cf docs: add preview to an example to test (#59737)
PR Close #59737
2025-05-16 07:38:03 +00:00
Miles Malerba
59ad8edf24 ci: fix build (#59737)
Deletes the BUILD.bazel in examples/drag-drop so the files can be
collected in examples/BUILD.bazel instead

PR Close #59737
2025-05-16 07:38:03 +00:00
Amy Sorto
4f387126e6 docs: add code examples for drag and drop guide (#59737)
# Conflicts:
#	adev/src/content/guide/BUILD.bazel

PR Close #59737
2025-05-16 07:38:03 +00:00
Amy Sorto
4afb2eea42 docs: add drag and drop guide (#59737)
PR Close #59737
2025-05-16 07:38:02 +00:00
Will 保哥
dee2dde793 docs: update Traditional Chinese footer link (#61280)
update Traditional Chinese footer link from angular.tw to dev.angular.tw to direct users to the new Traditional Chinese dev site.

PR Close #61280
2025-05-16 07:36:19 +00:00
Angular Robot
ee0d9bd1cd build: update dependency diff to v8 (#61386)
See associated pull request for more information.

PR Close #61386
2025-05-16 07:30:47 +00:00
Alan Agius
1ffe37df33 ci: replace usage of create-pr-for-changes with create-pull-request (#61388)
This changes remove the usage of the custom of github action to create PRs instead it uses `peter-evans/create-pull-request`.

PR Close #61388
2025-05-16 07:14:36 +00:00
Alan Agius
cd9b1b7b72 ci: ensure uncommitted changes are cleaned up before creating a branch (#61387)
This ensures that all uncommitted changes are cleaned up before creating a new branch.

PR Close #61387
2025-05-16 07:14:01 +00:00
Angular Robot
2699dd6555 build: update dependency node to v22.15.1 (#61357)
See associated pull request for more information.

PR Close #61357
2025-05-15 10:17:46 -07:00
Pawel Kozlowski
d9d9e42c23 fix(core): handle different DI token types in Chrome DevTools integration (#61333)
This small refactor makes the DI events reporting code more resiliant
with respect to finding names for different token types.

PR Close #61333
2025-05-15 10:15:32 -07:00
Alan Agius
56c0ef8eb7 refactor: replace port 4206 usage with 4209 (#61362)
Port `4206` is used by other tests which causes this test to be flakey example https://github.com/angular/angular/actions/runs/15038891642/job/42265813534

PR Close #61362
2025-05-15 10:12:44 -07:00
Doug Parker
d4ef72d378 release: bump Angular DevTools version to 1.0.31 (#61355)
PR Close #61355
2025-05-15 10:10:52 -07:00
Matthieu Riegler
55a9921b58 docs: add llms.txt (#61285)
PR Close #61285
2025-05-15 10:09:10 -07:00
Alan Agius
38f251da40 ci: streamline adev CDK APIs and CLI help workflows (#61253)
This commit implements several enhancements to the adev docs update workflow pipeline:

-   **Unify actions:** Merge the workflows into a single one.
-   **Optimize Git cloning:** Clone the repo with `--depth=0` only once per push instead of 2 times.
-   **Prevent concurrent runs:** Implement concurrency control to automatically cancel in-progress workflow runs for the same branch, ensuring only the latest commit is processed.

PR Close #61253
2025-05-15 10:05:30 -07:00
Matthieu Riegler
a4e2139620 refactor(platform-browser): Deprecate the platform-browser-dynamic package (#61043)
All entries of the `@angular/platform-browser-dynamic` package are now deprecated.
We now recommend using the `@angular/platform-browser` package instead.
In case a JIT application/testing environment is complaining about missing the compiler also add `import '@angular/compiler'`

DEPRECATED: All entries of the `@angular/platform-browser-dynamic`

PR Close #61043
2025-05-15 09:48:15 -07:00
Charles Lyding
c0cd3c2ed3 fix(compiler-cli): avoid ECMAScript private field metadata emit (#61227)
The Angular class metadata emit structure does not support the use of
private fields. If the class metadata emit is enabled and an ECMAScript
private (i.e., `#` prefixed) member contains a decorator, the member will
now be excluded from the emitting `setClassMetadata` call. This prevents
runtime errors due to invalid syntax.

PR Close #61227
2025-05-15 09:45:01 -07:00
Doug Parker
35b944dbec refactor(devtools): remove release process overview and add step to check for release (#60892)
The release process overview is out of date and does not accurately reflect section headers. It's not worth the maintenance effort of keeping it in sync with the rest of the doc.

Added a step 0 to check if there's actually anything to release, reusing the command from later in the doc.

Also makes a few random small corrections to reflect the new release process.

PR Close #60892
2025-05-15 09:42:51 -07:00
Alex Rickabaugh
0957e074c4 docs: release notes for the v20.0.0-rc.1 release 2025-05-15 09:42:01 -07:00
Alex Rickabaugh
b2a74aa157 docs: release notes for the v19.2.11 release 2025-05-15 08:28:10 -07:00
Paul Gschwendtner
ff62ff1793 refactor: explicitly ensure ngDevMode types are available (#61365)
This commit adds an import to the `ng_dev_mode.ts` file that augments
`global` to have types for `ngDevMode`.

Notably this change is currently not needed because the file is loaded
by `ts_library` through `tsconfig#files`— but in a separate PR we are
switching the target to `ts_project` which no longer loads all Bazel
dependency files via `tsconfig#files`; resulting in the ambient types no
longer magically being available.

PR Close #61365
2025-05-15 12:45:12 +00:00
Alan Agius
31abc9dbb0 build: remove resolution for @angular/core (#61360)
This causes running `pnpm import` directly to fail

```
Scope: all 4 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
.                                        |  WARN  deprecated @babel/plugin-proposal-async-generator-functions@7.20.7
.                                        |  WARN  deprecated gulp-conventional-changelog@5.0.0
.                                        |  WARN  deprecated angular@1.5.11
.                                        |  WARN  deprecated angular@1.6.10
.                                        |  WARN  deprecated angular@1.7.9
.                                        |  WARN  deprecated angular@1.8.3
.                                        |  WARN  deprecated protractor@7.0.0
.                                        |  WARN  deprecated tslint@6.1.3
Progress: resolved 177, reused 1, downloaded 0, added 0
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /tmp/renovate/cache/others/pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 323, reused 2, downloaded 1, added 0
Progress: resolved 833, reused 2, downloaded 1, added 0
Progress: resolved 1565, reused 2, downloaded 1, added 0
Progress: resolved 2264, reused 2, downloaded 1, added 0
 ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @angular/compiler@0.0.0-PLACEHOLDER

This error happened while installing a direct dependency of /tmp/renovate/repos/github/angular/angular

The latest release of @angular/compiler is "19.2.10".

Other releases are:
  * v4-lts: 4.4.7
  * v5-lts: 5.2.11
  * v6-lts: 6.1.10
  * v7-lts: 7.2.15
  * v8-lts: 8.2.14
  * v9-lts: 9.1.13
  * v10-lts: 10.2.5
  * v11-lts: 11.2.14
  * v12-lts: 12.2.17
  * v14-lts: 14.3.0
  * v13-lts: 13.4.0
  * v15-lts: 15.2.10
  * v16-lts: 16.2.12
  * v17-lts: 17.3.12
  * v18-lts: 18.2.13
  * next: 20.0.0-rc.0

If you need the full list of all 906 published versions run "$ pnpm view @angular/compiler versions".

```

PR Close #61360
2025-05-15 09:11:54 +02:00
Jonathan Meier
e62fb359d6 feat(compiler-cli): add experimental support for fast type declaration emission (#61334)
In declaration-only emission mode, the compiler extracts the type
declarations (.d.ts) files without full type-checking, which is possible
with sufficient type annotations on exports that can be ensured by the
`isolatedDeclarations` TS compiler option.

This allows us to decouple type declaration emission from the actual
full compilation doing the type-checking, thereby removing the
edge between dependent TS files in the build action graph. In other
words, the compilation of a TS file no longer indirectly depends on the
compilation of all the TS files it imports through its dependency on
their type declarations, because the type declarations themselves no
longer depend on the compilation of their associated TS file.

Without the coupling between type declaration emission and compilation,
compilation time of a TS project is no longer bound dependent on the
depth of the TS dependency tree as we can now build the entire project
with just two entirely parallel phases: 1) emit the type declarations of
all TS files in parallel and 2) compile all TS files in parallel.

Since the Angular compiler adds static metadata fields to components,
directives, modules, pipes and services based on their respective class
annotations, it needs to actively partake in the type declaration
emission in order to provide the types for these static fields in the
declaration.

In this change, we add experimental support for a declaration-only
emission mode based on the local compilation mode, which already
operates without type-checking and access to external type information,
i.e. the same environment as is required for declaration-only emisssion.

Apart from the same restrictions applied in local compilation mode,
there are a few more restrictions imposed on code being compatible with
this initial and experimental implementation:

* No support for `@NgModule`s using external references.
* No support for `hostDirectives` in `@Component`s and `@Directive`s
  using external references
* No support for `@Input` annotations with `transform`.

PR Close #61334
2025-05-14 14:07:37 -07:00