Commit graph

32725 commits

Author SHA1 Message Date
Joey Perrott
7f26df1608 build: migrate animations to use rules_js based toolchain (#61479)
Migrate animations to use `ts_project` and `ng_project`

PR Close #61479
2025-05-20 08:46:35 +00:00
Joey Perrott
40534d7de1 build: migrate benchpress to use rules_js (#61486)
Use ts_project to build targets in benchpress package

PR Close #61486
2025-05-20 08:44:55 +00:00
Miles Malerba
1360e4b584 docs: point cdk drag-drop doc links to adev api pages (#61437)
Now that the drag and drop API pages are on adev we can link to those
instead of external linking to material.angular.io

PR Close #61437
2025-05-19 16:04:08 +00:00
Paul Gschwendtner
0a25abaa90 build: --config=debug should not disable sandbox for all actions (#61468)
Instead of disabling sandbox/workers for every action; which also could
slow-down development turnaround significantly, the flag should only
disable sandboxing for the test actions; allowing for e.g. DevTools to
connect to them, even if they are inside the sandbox.

Arguably, this strategy isn't seemingly necessary in all environments,
but given that we enable network sandboxing in this repo, it seems
reasonable. Ideally we'd also expose `_debug` targets for e.g. Node
tests that have the proper no-sandbox, or requires-network tag.

PR Close #61468
2025-05-19 12:36:45 +00:00
Paul Gschwendtner
bd2b454faf refactor(migrations): gracefully proceed if reference cannot be resolved (#61426)
A runtime error can surface when TypeScript internally fails to resolve
a reference that is named similar to an input, but no `.d.ts` is
available for it.

See example error:
https://github.com/microsoft/TypeScript/issues/61473#issuecomment-2746537781.

PR Close #61426
2025-05-19 11:04:54 +00:00
arturovt
9aedd30983 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:57 +00:00
Pawel Kozlowski
c856f43b5f 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:47 +00:00
Pawel Kozlowski
1a3351c4f5 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:47 +00:00
Matthieu Riegler
7d0db3d247 docs(docs-infra): only show clear button of textfield when there is a text (#61427)
PR Close #61427
2025-05-16 15:57:36 +00:00
Paul Gschwendtner
185b7801ee build: migrate packages/core/schematics to ts_project (#61420)
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 #61420
2025-05-16 15:53:27 +00:00
Paul Gschwendtner
f07ef545a7 build: update legacy ESM interop rules to support explicit .js entrypoints (#61420)
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 #61420
2025-05-16 15:53:27 +00:00
Paul Gschwendtner
e056fa13df build: migrate more targets of @angular/core to ts_project (#61420)
Migrates more targets of `@angular/core` to `ts_project`. Remaining are:

 - tests
 - schematics

PR Close #61420
2025-05-16 15:53:27 +00:00
Matthieu Riegler
74e39ea96a 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:04 +00:00
Matthieu Riegler
aa4293871d docs: fix textfield CVA (#61411)
patch backport of #61300

PR Close #61411
2025-05-16 14:35:55 +00:00
Kristiyan Kostadinov
fd29dab218 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:11 +00:00
Kristiyan Kostadinov
af6c652464 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:11 +00:00
Paul Gschwendtner
2da8e42e8b build: update dev-infra for latest RBE changes (#61413)
Updates dev-infra for the latest RBE changes.

PR Close #61413
2025-05-16 13:56:57 +00:00
Vlad Boisa
b2ade23282 docs: fix typos (#61257)
Change grammar and fix typos in docs

Fixes #61244

PR Close #61257
2025-05-16 10:20:36 +00:00
Matthieu Riegler
db815e98ac docs: fix note formatting about optionam chaining (#61251)
PR Close #61251
2025-05-16 10:09:36 +00:00
Vlad Boisa
57df36127e docs: fix incomplete sentence (#61391)
Fix insufficient sentence.


Fixes #61350
PR Close #61391
2025-05-16 09:35:45 +00:00
Matthieu Riegler
85e0baf081 docs: fix Routed components example (#61278)
fixes #61277

PR Close #61278
2025-05-16 09:14:40 +00:00
Kristiyan Kostadinov
8edafd0559 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:39 +00:00
Alan Agius
11589d4849 ci: streamline adev CDK APIs and CLI help workflows (#61396)
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 #61396
2025-05-16 08:44:01 +00:00
Andrew Scott
94f5a4b4d6 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:41 +00:00
Jan Martin
f1b51cef5f 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:11 +00:00
Angular Robot
bd2a5b9729 docs: update Angular CDK apis [19.2.x] (#61347)
Updated Angular CDK api files.

PR Close #61347
2025-05-16 07:40:11 +00:00
Andrew Seguin
30fcd46b30 docs: make drag and drop examples preview (#59737)
PR Close #59737
2025-05-16 07:38:05 +00:00
Miles Malerba
fdb86983c5 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:04 +00:00
Andrew Seguin
eaf2c6eb8e docs: add preview to an example to test (#59737)
PR Close #59737
2025-05-16 07:38:04 +00:00
Miles Malerba
27c55fe30c 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:04 +00:00
Amy Sorto
740885f560 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:04 +00:00
Amy Sorto
f7c1da7616 docs: add drag and drop guide (#59737)
PR Close #59737
2025-05-16 07:38:04 +00:00
Will 保哥
2d3e1d3b12 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:20 +00:00
Alan Agius
82e5449953 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:46 -07:00
Doug Parker
e2b36c023b release: bump Angular DevTools version to 1.0.31 (#61355)
PR Close #61355
2025-05-15 10:10:55 -07:00
arturovt
eb53bda470 fix(core): enable stashing only when withEventReplay() is invoked (#61352)
Patch version of https://github.com/angular/angular/pull/61077.

PR Close #61352
2025-05-15 10:10:04 -07:00
Matthieu Riegler
dfed15fa49 docs: add llms.txt (#61285)
PR Close #61285
2025-05-15 10:09:14 -07:00
Charles Lyding
1191e62d70 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:06 -07:00
Doug Parker
378ba12cbc 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:55 -07:00
Alex Rickabaugh
ae503b7282 release: cut the v19.2.11 release 2025-05-15 08:26:28 -07:00
Paul Gschwendtner
f2d6e59857 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:13 +00:00
Joey Perrott
dfd068da9f build: use common macro to define tsconfig for service worker (#61341)
Define the tsconfig for service worker instead of manually including the tsconfig on each target

PR Close #61341
2025-05-14 10:43:26 -07:00
Joey Perrott
a4e3c12965 build: migrate upgrade to use ng_project instead of ng_module (#61320)
Use ng_project instead of ng_module in @angular/upgrade

PR Close #61320
2025-05-14 09:34:29 -07:00
Matthieu Riegler
43dec766a1 refactor(devtools): fix button styling on the profiler frame selector (#61309)
Missing standalone import.

PR Close #61309
2025-05-14 09:27:15 -07:00
Olexandr88
91e06a90ca docs: delete discord badge from README file (#61308)
PR Close #61308
2025-05-14 09:24:40 -07:00
Joey Perrott
064acf6314 build: migrate service-worker to ng_project (#61318)
Migrate service worker to use ng_project instead of ng_module

PR Close #61318
2025-05-14 08:54:40 -07:00
Hakeem
75e267da1d docs(docs-infra): fix update page styles to adhere to the new layout (#61256)
PR Close #61256
2025-05-14 08:47:31 -07:00
Hakeem
bf8d52b497 docs(docs-infra): fixating the position of the docs content whether TOC exists or not (#61256)
PR Close #61256
2025-05-14 08:47:31 -07:00
Hakeem
4325243224 docs(docs-infra): integrate the new layout with the new changes (#61256)
fix new global layout issues, and make other pages adhere to the new centered layout like cli ref page, cli ref details, api ref details pages

PR Close #61256
2025-05-14 08:47:31 -07:00
Paul Gschwendtner
3047638814 build: add script to diff packages and ensure no unexpected changes (#61336)
Adds a script to diff snapshot packages to allow for easy verification
that no unexpected changes were made.

PR Close #61336
2025-05-14 08:31:34 -07:00