Commit graph

13547 commits

Author SHA1 Message Date
Andrew Scott
449c540015 release: bump version of in memory web api (#61731)
PR Close #61731
2025-05-28 10:53:17 -07:00
Andrew Scott
d5ac3805f8 build: bump peer deps for angular-in-memory-web-api (#61729)
bumps peer deps to v20 for in memory web api

PR Close #61729
2025-05-28 10:29:44 -07:00
Matthieu Riegler
fe03aa09ad Revert "fix(core): call DestroyRef on destroy callback if view is destroyed (#58008)" (#61625)
This reverts commit 5f7f04634f.

PR Close #61625
2025-05-27 15:21:20 -07:00
Kristiyan Kostadinov
c11527fc68 refactor(compiler): remove unused code (#61668)
Removes the following unused code from the compiler:
* The ICU expander appears to be some really old code converting ICUs into legacy-style control flow directives. It's annoying to keep this one since we need to update it any time the AST changes.
* The `PipeCollector` class wasn't used anywhere.
* The `partitionArray` function wasn't used anywhere.
* The `newArray` function was used only in one test and it can be easily replaced with `new Array().fill`.

PR Close #61668
2025-05-26 12:21:09 +00:00
Angular Robot
ca26b23007 build: lock file maintenance (#61679)
See associated pull request for more information.

PR Close #61679
2025-05-26 11:55:36 +00:00
arturovt
9a9511ace8 refactor(platform-browser): replace isPlatformServer with ngServerMode (#59496)
In this commit, we switch from using the `isPlatformServer` runtime call to the `ngServerMode`.

Note: constructors haven't been touched in order to prevent any breaking changes for the public API.

PR Close #59496
2025-05-26 11:14:27 +00:00
Angular Robot
99bcd34b7f build: update all non-major dependencies (#61666)
See associated pull request for more information.

PR Close #61666
2025-05-26 11:12:51 +00:00
Joey Perrott
47660b7684 build: migrate examples to use rules_js (#61650)
Migrate examples to use ng_project and ts_project for building

PR Close #61650
2025-05-26 11:00:59 +00:00
Kristiyan Kostadinov
04656d0b6e fix(migrations): preserve comments when removing unused imports (#61674)
Updates the unused imports schematic to preserve comments inside the array. THis is necessary for some internal use cases.

PR Close #61674
2025-05-26 10:26:20 +00:00
Matthieu Riegler
3e102f0b84 fix(compiler): lexer support for template literals in object literals (#61601)
This commit fixes a shortcoming of the lexer with template literals

fixes #61572

PR Close #61601
2025-05-26 10:24:16 +00:00
Joey Perrott
26f126a049 build: update common's locales to use rules_js (#61629)
Use ts_project to build the common locales

PR Close #61629
2025-05-26 10:18:14 +00:00
Kristiyan Kostadinov
289ae50c56 refactor(core): replace propertyInterpolateX with property (#61639)
Replaces the `propertyInterpolateX` instructions with calls to `property` and the `interpolate` helper. This allows us to drop the dedicated interpolation instructions and simplify the runtime for future work.

PR Close #61639
2025-05-26 09:21:23 +00:00
Kristiyan Kostadinov
b0425ead3f refactor(core): simplify single interpolations (#61639)
Updates the `ɵɵinterpolate` instruction so it doesn't call into `interpolation1` under the hood since it requires a prefix/suffix and we know there isn't one.

PR Close #61639
2025-05-26 09:21:23 +00:00
Kristiyan Kostadinov
e412fda709 refactor(core): replace classMapInterpolateX with classMap (#61639)
Replaces the `classMapInterpolateX` instructions with `classMap` plus a call to `interpolate` in order to simplify the runtime. The only difference between `classMapInterpolateX` and `classMap` was that the former passes `keyValueArraySet` into `checkStylingMap` while the latter passes `classKeyValueArraySet`. This doesn't appear to matter, because the interpolation instructions always have a string value which means that the function is never called.

PR Close #61639
2025-05-26 09:21:23 +00:00
Kristiyan Kostadinov
73c81391d6 refactor(core): replace styleMapInterpolateX with styleMap (#61639)
Replaces the `styleMapInterpolateX` instructions with the existing `styleMap` and a passed-in interpolated value in order to simplify the runtime.

PR Close #61639
2025-05-26 09:21:23 +00:00
Kristiyan Kostadinov
2aaea80bfe refactor(core): replace stylePropInterpolateX with styleProp (#61639)
Replaces all of the `stylePropInterpolateX` instructions with the existing `styleProp` with an interpolated value.

PR Close #61639
2025-05-26 09:21:23 +00:00
Jonathan Meier
f3dfad38b4 refactor(compiler-cli): remove hardcoded config for unused standalone imports rule enablement (#61622)
The hardcoded config was introduced because suppressing the diagnostic
via `extendedDiagnostics` in the TS config was unreliable in google3.
This has since been fixed and the workaround is no longer needed.

PR Close #61622
2025-05-26 09:20:25 +00:00
Angular Robot
b6a63014a7 build: update dependency google-closure-compiler to v20250520 (#61672)
See associated pull request for more information.

PR Close #61672
2025-05-26 09:12:33 +00:00
Alan Agius
67a0576598 build: exclude esbuild metadata files from distributable packages (#61636)
Prevents esbuild generated metadata files from being included in build artifacts. This reduces package size and avoids shipping unnecessary internal build data.

PR Close #61636
2025-05-26 08:57:41 +00:00
Joey Perrott
b478a43804 build: migrate localize package to use rules_js (#61613)
Use ts_project to build localize package

PR Close #61613
2025-05-26 08:53:55 +00:00
Alan Agius
e9fcbb8af1 fix(compiler): remove TypeScript from linker (#61618)
This commit removes the direct dependency on TypeScript within the linker, addressing a performance overhead that was adding between 500ms to 1s to compilation times for applications.

The primary cause of this overhead was the linker's direct reliance on TypeScript's which was caused by importing from barrel files. While convenient, barrel files are detrimental to code splitting and code motion. They force the bundling of all exported modules, even if only a subset is actually used.

By removing the usage of this barrel file and restructuring the imports to be more granular, we can avoid unnecessary TypeScript imports.
 Furthermore, TypeScript has now been changed to an optional peer dependency as using only the linker does not require TypeScript.

PR Close #61618
2025-05-26 08:46:00 +00:00
Rafal Slawik
82327f2092 feat(common): accept undefined inputs in NgTemplateOutlet (#61404)
Extend types of inputs to include `undefined` to avoid `?? null` when using singals (e.g. `viewChild`).

Fixes #51225

PR Close #61404
2025-05-25 14:26:42 -07:00
Joey Perrott
4c72ce408e build: migrate platform-browser and platform-browser-dynamic package to use rules_js (#61623)
Use ts_project and ng_project to build platform-browser and platform-browser-dynamic package

PR Close #61623
2025-05-23 15:14:00 -07:00
Andrew Scott
abcb865474 fix(common): avoid injecting ApplicationRef in FetchBackend (#61649)
fixes a circular dependency caused by injecting applicationRef

fixes #61644

PR Close #61649
2025-05-23 10:04:08 -07:00
Andrew Scott
4356e85456 fix(core): fakeAsync should not depend on module import order (#61375)
`fakeAsync` does not work if the zone-testing polyfill is included after
@angular/core/testing is loaded. This allows fakeAsync to work
even if the zone-testing is included later.

PR Close #61375
2025-05-23 09:45:41 -07:00
Andrew Scott
e33444e236 release: cut the zone.js-0.15.1 release (#61632)
PR Close #61632
2025-05-22 14:53:15 -07:00
Andrew Scott
1ea39e050c refactor(zone.js): Add a withProxyZone helper that might be used for unpatched test frameworks (#61626)
As an alternative to monkey patching vitest, this change adds a method that could be used
for manually running functions inside a shared proxy zone. If used inocrrectly,
this would mean that
the `fakeAsync` closure may not capture all timers and microtasks if it
invokes things created in a zone that was already forked (e.g. creating
a component in a beforeEach:
2699dd6555/packages/zone.js/lib/jasmine/jasmine.ts (L363-L371))

PR Close #61626
2025-05-22 13:39:30 -07:00
Jonathan Meier
768e71511e refactor(compiler-cli): remove unused transform methods from DtsTransform (#61610)
All usages of the `DtsTransform` interface leave these two methods
`undefined`, so we can remove them, as well as all code invoking them.

PR Close #61610
2025-05-22 13:25:20 -07:00
Alan Agius
6899b27762 build: update all esbuild target to node20 (#61606)
This is the min supported node.js version

PR Close #61606
2025-05-22 13:02:03 -07:00
Milo
396b5433b9 feat(devtools): update get signal graph (#61541)
add a function that we can inspect to jump to the source of a signal, and give every signal a unique id
that devtools can use to match signals across calls to getSignalGraph

PR Close #61541
2025-05-22 12:14:53 -07:00
Alan Agius
229cdde4d0 fix(core): mark zone.js as an optional peer dependency (#61616)
`zone.js` is no longer mandatory.

PR Close #61616
2025-05-22 12:14:06 -07:00
Joey Perrott
687e01865f build: migrate platform-server to rules_js (#61589)
Migrate platform-server to use ts_project and ng_project.

PR Close #61589
2025-05-22 11:35:55 -07:00
arturovt
ce916fe08c fix(service-worker): do not register service worker if app is destroyed before it is ready to register (#61101)
In this commit, we check whether the application is destroyed before calling `serviceWorker.register(...)`. We should not register the worker because other resources will not be available.

PR Close #61101
2025-05-22 10:02:39 -07:00
Andrew Scott
ad8931cb49 fix(zone.js): classes that extend Error should retain cause property (#61599)
ZoneAwareError previously did not copy the cause property over to the
`this` object when an error extends the native error class.

PR Close #61599
2025-05-21 20:43:09 -07:00
Maciej Sawicki
905194fa57 fix(core): reading resource value after reload in the error state (#61441)
When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error.
This change prevents `Resource.hasValue()` from throwing an error in such a case.

PR Close #61441
2025-05-21 12:06:40 -07:00
Maciej Sawicki
b35396345c fix(core): getting resource value throws an error instead of returning undefined (#61441)
When there is an underlying error state it would not be possible to swallow the error with:
`computed(() => res.value()?.inner);`

PR Close #61441
2025-05-21 12:06:40 -07:00
Maciej Sawicki
05eb028c7a fix(core): narrow error type for resources API (#61441)
`Resource.error` used to return `unknown`. Now it's `Error | undefined`.
For non-`Error` types they are encapsulated with the `Error` type.

PR Close #61441
2025-05-21 12:06:40 -07:00
Maciej Sawicki
07811ddd7d fix(core): move reload method from Resource to WritableResource (#61441)
Now only mutable resources can be reloaded.

PR Close #61441
2025-05-21 12:06:40 -07:00
Maciej Sawicki
5762c23a77 build: use es2022 lib (#61441)
It was set to es2022 for build tsconfig in https://github.com/angular/angular/pull/60066/files#diff-7ec658aedc62a693cc513accc8f360938d90bcbdb09aa79c1401e56fe84f5fd3, but was missed for the main one.

PR Close #61441
2025-05-21 12:06:40 -07:00
Steven Nguyendoan
d7753988bd refactor(migrations): update references for dom_trigger functions onInteract, onHover, onViewport to point to new location in core/primitives/defer (#61342)
Moves the onInteract, onHover, onViewport dom_trigger functions to /packages/core/primitives/defer to be used as a shared library

PR Close #61342
2025-05-21 17:30:10 +00:00
Steven Nguyendoan
74cf9cb010 refactor(migrations): moved onInteraction, onHover (#61342)
, onViewport to core/primitives

PR Close #61342
2025-05-21 17:30:10 +00:00
Joey Perrott
4554c096fe build: add comment explaining path maps (#61584)
Add a commend explaning why the path mappings are in place.

PR Close #61584
2025-05-21 17:27:18 +00:00
Bouguima, Walid
610bebfce9 fix(forms): Allow ControlState as reset arguments for FormGroup/FormRecord (#55860)
This change also decorelate the `reset` type argument from `TValue` by adding a 3rd generic parameter to `AbstractControl`.
This improves the typings overall.

PR Close #55860
2025-05-21 17:26:23 +00:00
Joey Perrott
b37fd9753f build: migrate language service to use rules_js (#61568)
Migrate language service to build using ts_project

PR Close #61568
2025-05-21 17:05:14 +00:00
cexbrayat
f68001d424 docs: fix descendants default explanation for contentChild (#61580)
See #61534

PR Close #61580
2025-05-21 16:15:07 +00:00
arturovt
93e8565f0e fix(core): cleanup rxResource abort listener (#58306)
The observable terminates immediately when `error` is called, and no further emissions or completion notifications occur. Thus, we have to remove the `abort` listener in both the `error` and `complete` notifications.

PR Close #58306
2025-05-21 15:17:22 +00:00
Kristiyan Kostadinov
1650a8572a refactor(core): handle NO_CHANGE in bindingUpdated (#61557)
Updates the `bindingUpdated` function to handle `NO_CHANGE` instead of throwing. This will allow us to reuse instructions across more cases.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
02bd5f8d76 refactor(core): remove attribute interpolation instructions (#61557)
The attribute interpolation instructions aren't used anymore so we can remove them.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
32ae421526 refactor(compiler): replace attribute interpolation instructions (#61557)
Replaces the attribute interpolation instructions with `attribute` plus the new `interpolateX` instruction. This allows to reduce our overall instruction footprint.

PR Close #61557
2025-05-21 15:13:47 +00:00
Kristiyan Kostadinov
a7be5069dd refactor(core): add instructions for interpolating values (#61557)
Adds the new `interpolate*` instructions that can be passed into other instructions and used to replace our existing flavors of interpolations.

PR Close #61557
2025-05-21 15:13:46 +00:00