33397 Commits

Author SHA1 Message Date
Alan Agius 7034b74fe3 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 b9b74b692c 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:02 +00:00
Angular Robot f699476c86 build: update dependency node to v22.15.1 (#61358)
See associated pull request for more information.

PR Close #61358
2025-05-15 10:25:43 -07:00
Pawel Kozlowski ca6295e90b 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:33 -07:00
Alan Agius 432bf4a148 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:48 -07:00
Doug Parker 78773bd335 release: bump Angular DevTools version to 1.0.31 (#61355)
PR Close #61355
2025-05-15 10:10:58 -07:00
Matthieu Riegler 2eba8762b4 docs: add llms.txt (#61285)
PR Close #61285
2025-05-15 10:09:16 -07:00
Alan Agius 99ec39ec56 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:32 -07:00
Matthieu Riegler bc2cab747f 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:16 -07:00
Charles Lyding 7a3a41f33f 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:09 -07:00
Doug Parker 40610ee527 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:58 -07:00
Alex Rickabaugh 571871cecb release: cut the v20.0.0-rc.1 release 20.0.0-rc.1 2025-05-15 09:38:53 -07:00
Paul Gschwendtner a21de80c0e 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:14 +00:00
Alan Agius 7cb903f651 build: remove resolution for @angular/core (#61361)
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 #61361
2025-05-15 09:16:23 +02:00
Joey Perrott 1055354672 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:28 -07:00
Angular Robot 65032ab42e build: update all non-major dependencies (#61179)
See associated pull request for more information.

PR Close #61179
2025-05-14 10:37:48 -07:00
arturovt 4fe34f4cfe fix(core): enable stashing only when withEventReplay() is invoked (#61077)
This commit brings the necessary event replay code code in tree-shakable manner.

PR Close #61077
2025-05-14 10:35:58 -07:00
Joey Perrott 592a754038 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:31 -07:00
Matthieu Riegler da59776d17 refactor(devtools): fix button styling on the profiler frame selector (#61309)
Missing standalone import.

PR Close #61309
2025-05-14 09:27:17 -07:00
Olexandr88 42cd7980fe docs: delete discord badge from README file (#61308)
PR Close #61308
2025-05-14 09:24:41 -07:00
Charles Lyding f7bfdc75dc refactor(router): add return types to exported functions (#61310)
Return types for exported functions from the router package have now been
added. This provides preparation for the inclusion of additional linting
rules which will eventually enforce the presence of return types for
functions. It also improves readability and type correctness within the
code.

PR Close #61310
2025-05-14 08:57:35 -07:00
Joey Perrott e01af75afe 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:42 -07:00
Joey Perrott 8f94101c24 build: rename devtools ts_library to ts_project (#61317)
Rename ts_library to ts_project throughout devtools

PR Close #61317
2025-05-14 08:51:21 -07:00
Joey Perrott 52bc729618 build: migrate devtools to use ng-project (#61317)
Migrate devtools to use ng-project

PR Close #61317
2025-05-14 08:51:21 -07:00
Hakeem 558ff67a64 docs(docs-infra): fix update page styles to adhere to the new layout (#61256)
PR Close #61256
2025-05-14 08:47:33 -07:00
Hakeem b0915c86b3 docs(docs-infra): fixating the position of the docs content whether TOC exists or not (#61256)
PR Close #61256
2025-05-14 08:47:32 -07:00
Hakeem cd6a286821 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:32 -07:00
Andrew Scott d8d7c44278 refactor(docs-infra): remove component suffix from democomponent (#61254)
this removes the component suffix from the DemoComponent in tutorials

PR Close #61254
2025-05-14 08:46:30 -07:00
Andrew Scott d192b0cf91 refactor(docs-infra): remove component suffix from first-app tutorial (#61254)
this removes the component suffix from the first-app tutorial steps

PR Close #61254
2025-05-14 08:46:30 -07:00
Andrew Scott d77c482afa refactor(docs-infra): remove component suffix from learn-angular tutorial (#61254)
this removes the component suffix from the learn-angular tutorials

PR Close #61254
2025-05-14 08:46:30 -07:00
Andrew Scott a5e34fb64b refactor(docs-infra): remove component suffix from playground (#61254)
this removes the component suffix from playground components

PR Close #61254
2025-05-14 08:46:30 -07:00
Andrew Scott c890bf2450 refactor(docs-infra): Remove component suffix from deferrable views tutorial (#61254)
This commit removes the component suffix from the deferrable views tutorial

PR Close #61254
2025-05-14 08:46:30 -07:00
Andrew Scott 23b807d3a4 refactor(docs-infra): Remove 'component' suffix from App[Component] in tutorials (#61254)
This commit refactors the tutorials to drop the Component suffix from
AppComponent, both from the TS file and the CSS.

PR Close #61254
2025-05-14 08:46:29 -07:00
Paul Gschwendtner d7dbabeb5a build: add script to diff packages and ensure no unexpected changes (#61335)
Adds a script to diff snapshot packages to allow for easy verification
that no unexpected changes were made.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 7a3039c093 build: add modified version of tsec that can work with interop (#61335)
As we roll out more PRs that migrate to `ts_project`, we need to make
sure that we don't break existing `tsec` targets. This PR copies the
original `tsec` Starlark code and adjusts it to work with the interop.

Note that we don't patch as this would unnecessarily complicate this
file that only exists during migration. Long-term, after migration, we
either need to consider switching to the new ESLint plugin that is being
worked on (I'm in contact with the team), or we send a CL to update the
Tsec Starlark code to keep our changes minimal and avoid scope increase.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 116550f680 build: fix ts_project interop to properly create linker mappings (#61335)
This commit fixes that the interop targets weren't properly creating
linker mappings in some cases. This could break spec bundling.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 063c3ad281 refactor: update packages/core:{core,src} to ts_project (#61335)
Updates `packages/core:core` and `packages/core/src/...` to `ts_project`
of `rules_js`.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 5c1d2eb262 build: support new ng_project rule (#61335)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61335
2025-05-14 08:35:14 -07:00
Jan Martin c028918196 docs: document the use of this in template expression syntax (#61250)
As of Angular 19, `this` should consistently reference the given
class property.

See: https://github.com/angular/angular/pull/55183
Co-authored-by: Jeremy Elbourn <jelbourn@google.com>
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #61250
2025-05-14 06:35:57 -07:00
Alan Agius 48dc810a7a build: update dependency @rollup/plugin-node-resolve to v16 (#61327)
See associated pull request for more information.

(cherry picked from commit 2ad527e6d187400f815c2e5aa8026d94f608a883)

PR Close #61327
2025-05-14 11:25:01 +00:00
Paul Gschwendtner d7a1c19a5e 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:56 +02:00
Paul Gschwendtner ef87a56c99 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:56 +02:00
cexbrayat 12afed8611 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:16 +02:00
Angular Robot d4cb444fb6 build: update cross-repo angular dependencies (#61287)
See associated pull request for more information.

PR Close #61287
2025-05-13 17:16:22 -07:00
Miles Malerba 41db6505e1 docs: update references to the cdk/testing apis (#60853)
PR Close #60853
2025-05-13 16:32:38 -07:00
Miles Malerba fb1204b7fa 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:38 -07:00
Kristiyan Kostadinov e0d378d20e 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 768239a89c 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 1b4b44e476 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:19 +00:00
Matthieu Riegler c1b9d3ed71 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