Commit graph

33131 commits

Author SHA1 Message Date
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
Joey Perrott
68d774f49d 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:25 -07:00
arturovt
a5db6c41d0 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:57 -07:00
Joey Perrott
d835a44318 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:28 -07:00
Matthieu Riegler
5af8afee4b refactor(devtools): fix button styling on the profiler frame selector (#61309)
Missing standalone import.

PR Close #61309
2025-05-14 09:27:13 -07:00
Olexandr88
989c65ee9e docs: delete discord badge from README file (#61308)
PR Close #61308
2025-05-14 09:24:38 -07:00
Charles Lyding
a07413abed 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
cexbrayat
3e1baa5a95 fix(compiler-cli): typo in NG2026 message (#61325)
The newly introduced NG2026 error for selectorless components had a typo in its message.

PR Close #61325
2025-05-14 08:56:09 -07:00
Angular Robot
895b67146e build: update dependency @bazel/runfiles to v6 (#61322)
See associated pull request for more information.

PR Close #61322
2025-05-14 08:55:25 -07:00
Joey Perrott
c8abc7faff 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:39 -07:00
Joey Perrott
ae0ad878eb 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
31efc4bd24 build: migrate devtools to use ng-project (#61317)
Migrate devtools to use ng-project

PR Close #61317
2025-05-14 08:51:20 -07:00
Hakeem
4db2166419 docs(docs-infra): fix update page styles to adhere to the new layout (#61256)
PR Close #61256
2025-05-14 08:47:29 -07:00
Hakeem
395d3bc4cb docs(docs-infra): fixating the position of the docs content whether TOC exists or not (#61256)
PR Close #61256
2025-05-14 08:47:29 -07:00
Hakeem
abef774485 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:29 -07:00
Andrew Scott
9e5bcc04f7 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:28 -07:00
Andrew Scott
989e3f0a88 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:28 -07:00
Andrew Scott
03ae3860c2 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:28 -07:00
Andrew Scott
b8a0e6b7ea 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:28 -07:00
Andrew Scott
19da174ce1 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:28 -07:00
Andrew Scott
29f873b5f2 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:28 -07:00
Jan Martin
4108efaee6 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:55 -07:00
Paul Gschwendtner
8e78b4e438 build: add script to diff packages and ensure no unexpected changes (#61275)
Adds a script to diff snapshot packages to allow for easy verification
that no unexpected changes were made.

PR Close #61275
2025-05-14 12:01:52 +00:00
Paul Gschwendtner
925b923e85 build: add modified version of tsec that can work with interop (#61275)
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 #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
c123125ca1 build: fix ts_project interop to properly create linker mappings (#61275)
This commit fixes that the interop targets weren't properly creating
linker mappings in some cases. This could break spec bundling.

PR Close #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
b71c35a6b5 refactor: update packages/core:{core,src} to ts_project (#61275)
Updates `packages/core:core` and `packages/core/src/...` to `ts_project`
of `rules_js`.

PR Close #61275
2025-05-14 12:01:51 +00:00
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