Commit graph

36863 commits

Author SHA1 Message Date
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
Paul Gschwendtner
3d0ecb2273 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:55 +02:00
cexbrayat
4058f8d202 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:14 +02:00
Angular Robot
c34efccef0 build: lock file maintenance (#61266)
See associated pull request for more information.

PR Close #61266
2025-05-13 16:35:32 -07:00
Miles Malerba
612e3970de docs: update references to the cdk/testing apis (#60853)
PR Close #60853
2025-05-13 16:32:35 -07:00
Miles Malerba
cf57c3a073 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:35 -07:00
Kristiyan Kostadinov
8f2874e86d 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
a6b7b9b8c5 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
810b0a7e5c 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:18 +00:00
Matthieu Riegler
dd25f3d20f 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
Alan Agius
b4c383b274 build: do not auto install peer dependencies (#61294)
Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue to rely on peer dependency placeholders substituted via Bazel.

PR Close #61294
2025-05-13 08:55:42 +00:00
Alan Agius
9085134474 ci: disable updates for @angular/build-tooling (#61294)
This package requires some work to be updated.

PR Close #61294
2025-05-13 08:55:42 +00:00
Alan Agius
cda963600f ci: refactor renovate config to use dev-infra preset (#61268)
This change uses the dev-infra preset.

PR Close #61268
2025-05-12 15:36:32 -07:00
Kristiyan Kostadinov
4dc7136c49 refactor(migrations): remove unused code (#61260)
The `waitForAsync` rule has been disabled internally which allows us to delete its code, as well as some unused adjacent code.

PR Close #61260
2025-05-12 15:34:07 -07:00
Andrew Scott
1755e09d0a refactor(docs-infra): Clean up embedded editor code (#61242)
This commit cleans up the embedded editor code quite a bit by making
better use of current signal APIs

PR Close #61242
2025-05-12 15:32:25 -07:00
Kristiyan Kostadinov
fa27b76339 refactor(language-service): initial reference and rename implementation for selectorless (#61240)
Adds an initial implementation for finding references and renaming to selectorless components/directives.

Finding references should work everywhere, whereas renaming only currently works when initiated from the template.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
f074c30616 refactor(language-service): support quick info selectorless symbols (#61240)
Updates the language service to produce quick info for selectorless components and directives.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
cec512fdfd refactor(language-service): support definitions for selectorless (#61240)
Updates the language service to handle producing definition information for selectorless components and directives.

PR Close #61240
2025-05-12 15:31:45 -07:00
Kristiyan Kostadinov
c69dda61c2 refactor(language-service): set up template targets for selectorless (#61240)
Adds the logic to resolve the template targets for the selectorless component and directive nodes. This is a prerequisite for other functionality.

PR Close #61240
2025-05-12 15:31:45 -07:00