31002 Commits

Author SHA1 Message Date
Andrew Kushnir fae3c837e2 release: cut the v18.2.9 release 18.2.9 2024-10-23 13:11:42 -07:00
Jessica Janiuk 47270d551b ci: clean up pullapprove list (#58325)
This removes no longer active users from the shared primitives list of reviewers.

PR Close #58325
2024-10-23 07:59:51 -07:00
Jessica Janiuk 2fb88a56dd ci: temporarily disable adev tests (#58309)
This disables adev tests until the next release. This is due to #54858.

PR Close #58309
2024-10-22 11:30:38 -07:00
Angular Robot 713a14fadd build: update actions/cache digest to 6849a64 (#58305)
See associated pull request for more information.

PR Close #58305
2024-10-22 09:44:22 -07:00
Matthieu Riegler 7e933d8486 docs(docs-infra): fix CLI commands (#58294)
With this commit the CLI doc will display the correct arguments for the subcommands

fixes #58279

PR Close #58294
2024-10-22 07:42:22 -07:00
Angular Robot 45c24e4aaf build: update io_bazel_rules_sass digest to 6e23fb1 (#58270)
See associated pull request for more information.

PR Close #58270
2024-10-19 17:44:59 +02:00
Todd Palmer ac6e977663 docs: fix typo in tutorial - change style.css to styles.css to correct style sheet file name (#58269)
PR Close #58269
2024-10-19 17:43:20 +02:00
Daniel Kimmich b63c2edd76 docs: update default asset paths (#58246)
PR Close #58246
2024-10-18 14:35:31 +00:00
TupiC d1cfbb1f92 docs: removed typos of withHttpTransferCacheOptions description (#58244)
Removed two typos in the withHttpTransferCacheOptions function description.

- Corrected spelling of "whether"
- Changed spelling from "a an" to "an"
PR Close #58244
2024-10-18 10:14:10 +00:00
Angular Robot b169eb11db build: update io_bazel_rules_sass digest to 43a9cda (#58253)
See associated pull request for more information.

PR Close #58253
2024-10-18 10:04:45 +00:00
Kristiyan Kostadinov b0ab653965 fix(compiler-cli): report when NgModule imports or exports itself (#58231)
Reports a diagnostic if an NgModule refers to itself in its `imports` or `exports`. Previously the compiler would go into an infinite loop.

Fixes #58224.

PR Close #58231
2024-10-18 09:26:45 +00:00
wlotherington 98c9ac8f92 docs(docs-infra): fix playground terminal/console (#58257)
xterm was not resizing correctly when terminal/console component was resized.
- Load fitAddon for each terminal instance to enable resize.
- Use `ResizeObserver` to detect changes to the component size changes (window resize does not catch `as-split` events).
- Move padding from `.xterm-screen` to `.xterm` ancestor to fix text alignment.

Fixes #52645

PR Close #58257
2024-10-18 09:25:36 +00:00
cexbrayat 37b921dcde refactor(core): test EventEmitter completion on destroy with outputToObservable (#58239)
A unit test has been added to check that `EventEmitter` properly completes upon component/directive destrouction when used with `outputToObservable`.
It explains why `destroyRef` has to be injected in `EventEmitter` in the first place.

PR Close #58239
2024-10-17 11:37:58 +00:00
Angular Robot d330f94e48 build: update io_bazel_rules_sass digest to 9fa2d50 (#58235)
See associated pull request for more information.

PR Close #58235
2024-10-17 10:13:58 +00:00
wlotherington e60d016f46 docs(docs-infra): change mermaid diagram colors (#58223)
Change diagram colors to:

- Better match the overall site theme.
- Improve dark theme.
- Make the diagram easier to understand. "Unchecked" nodes have no color and "Checked" nodes match the color of the "Event" node that triggered the change detection.

Fixes #56314

PR Close #58223
2024-10-16 16:46:17 +00:00
Dzhavat Ushev 532bd11f41 docs(language-service): fix link URLs (#58143)
PR Close #58143
2024-10-16 14:48:13 +00:00
Matthieu Riegler 608a1511ca refactor(compiler-cli): Don't extract abstract overload multiple times (#57707)
Prior to this commit, each abstract method that was overloaded was extracted. With this commit it will be extracted only once. Every overload was and still will be supported by the signatures.

fixes #57693

PR Close #57707
2024-10-16 07:31:48 +00:00
Alan Agius 06f45c3d59 docs: update browserslist config to include last 2 Android major versions (#58186)
See: https://github.com/angular/angular-cli/pull/28620 for more context.

PR Close #58186
2024-10-15 16:48:59 +00:00
Angular Robot 4049d7797d build: update scorecard action dependencies (#58202)
See associated pull request for more information.

PR Close #58202
2024-10-15 06:38:07 +00:00
Daniel Kimmich c1f4a47457 docs: remove word repetition (#58187)
PR Close #58187
2024-10-14 13:19:42 +00:00
Paul Gschwendtner 6cd2028d81 ci: disable bazel-saucelabs job (#58162)
Disables the `bazel-saucelabs` job in `main`, and re-uses the PR legacy
saucelabs job to run on `main` instead (which is much more stable and
reliable).

PR Close #58162
2024-10-11 14:07:35 +00:00
Angular Robot d9bb74f950 build: update io_bazel_rules_sass digest to 583fc8c (#58155)
See associated pull request for more information.

PR Close #58155
2024-10-11 10:37:57 +00:00
vladboisa 47467949d8 docs: move JSDoc below constructor (#57187)
Move the JSDoc above transform signature for correct view

Fixes #56349

refactor: format file

PR Close #57187
2024-10-10 12:37:36 +00:00
Steven Tucker 00de13c909 docs: Updated event-listeners.md doc to use correct term, even -> every (#57964)
event time -> every time

PR Close #57964
2024-10-10 12:36:41 +00:00
arturovt 79a89f7742 refactor(docs-infra): allow table of contents to be GCed (#58034)
This commit updates the table of contents functionality to clean up correctly whenever the user
navigates to other pages and nodes are removed from the DOM.

Currently, calling `renderComponent` with the `TableOfContents` keeps creating a new table of contents
component without removing the previous one, as they are created manually.

This leads to memory leaks because the components cannot be collected properly, even if the user
navigates to the home page where there is no TOC component.

PR Close #58034
2024-10-10 12:33:51 +00:00
Matthieu Riegler a9e440d96b refactor(core): drop the Mutable utility type. (#58124)
The complexity of this type isn't necessary, `Writable` is well suited where it was used.

PR Close #58124
2024-10-10 10:47:51 +00:00
reosablo da0e6b1eee docs(core): fix description about signal value equality (#56472)
PR Close #56472
2024-10-10 10:24:33 +00:00
Jaime González Fábregas 45a788b0b7 docs(docs-infra): substitute string interpolation on json data with actual value (#57626)
substitute "${this.baseUrl}" with "https://angular.dev/assets/images/tutorials/common" in the photo url on the json data provided on the hands on tutorial in the webpage "https://angular.dev/tutorials/first-app/14-http". The previous json content caused the images to fail loading.

PR Close #57626
2024-10-10 10:22:34 +00:00
Paul Gschwendtner 2532ffa35e release: cut the v18.2.8 release 18.2.8 2024-10-10 11:59:47 +02:00
Georgy Serga 21be258be6 fix(compiler): scope :host-context inside pseudo selectors, do not decrease specificity (#57796)
parse constructions like `:where(:host-context(.foo))` correctly
revert logic which lead to decreased specificity if `:where` was applied
to another selector, for example `div` is transformed to `div[contenta]`
with specificity of (0,1,1) so `div:where(.foo)` should not decrease it
leading to `div[contenta]:where(.foo)` with the same specificity (0,1,1)
instead of `div:where(.foo[contenta])` with specificity equal to (0,0,1)

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga d325f9b55f fix(compiler): fix parsing of the :host-context with pseudo selectors (#57796)
fix regexp which is used to test for host inside pseudo selectors

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga aea747ab3b fix(compiler): preserve attributes attached to :host selector (#57796)
keep attributes used to scope :host selectors

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 11692c8dab fix(compiler): add multiple :host and nested selectors support (#57796)
add support for nested and deeply nested (up to three levels) selectors,
parse multiple :host selectors, scope selectors within pseudo functions

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 48a1437e77 fix(compiler): fix comment typo (#57796)
fix spelling in the comment

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 66dcc691f5 fix(compiler): allow combinators inside pseudo selectors (#57796)
allow css combinators within pseudo selector functions, parsing those
correctly. Similarly to previous version, don't break selectors
into part if combinators are within parenthesis, for example
`:where(.one > .two)`

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 7a6fd427d5 fix(compiler): transform pseudo selectors correctly for the encapsulated view (#57796)
fix scoping and transforming logic of the `shimCssText` for the
components with encapsulated view:
- add support for pseudo selector functions
- apply content scoping for inner selectors of `:is()` and `:where()`
- allow multiple comma separated selectors inside pseudo selectors

Fixes #45686

PR Close #57796
2024-10-10 08:13:22 +00:00
cexbrayat 31fb9d0d52 docs: mention autoDetectChanges parameter default value (#58092)
It was unclear whether the parameter was necessary, as its default value was not mentioned in the jdsoc.

PR Close #58092
2024-10-09 13:50:32 +00:00
Krzysztof Platis b40875a2cc fix(platform-server): destroy PlatformRef when error happens during the bootstrap() phase (#58112) (#58135)
The `bootstrap()` phase might fail e.g. due to an rejected promise in some `APP_INIIALIZER`.
If `PlatformRef` is not destroyed, then the main app's injector is not destroyed and therefore `ngOnDestroy` hooks of singleton services is not called on the end (failure) of SSR.

This could lead to possible memory leaks in custom SSR apps, if their singleton services' `ngOnDestroy` hooks contained an important teardown logic (e.g. unsubscribing from RxJS observable).

Note: I needed to fix by the way another thing too: now we destroy `moduleRef` when `platformInjector` is destroyed - by setting a `PLATFORM_DESTROY_LISTENER`

Patch port of #58112

PR Close #58135
2024-10-09 13:50:02 +00:00
Angular Robot 59394ee830 build: update actions/cache digest to 3624ceb (#58125)
See associated pull request for more information.

PR Close #58125
2024-10-08 13:27:59 -07:00
Kristiyan Kostadinov 46bafb0b0a fix(core): clean up afterRender after it is executed (#58119)
We stop tracking `afterRender` hooks as soon as they execute, but their on destroy callbacks stay registered until either the injector is destroyed or the user calls `destroy` manually. This was leading to memory leaks in the `@defer` triggers based on top of `afterRender` when placed inside long-lived views, because the callback would execute, but its destroy logic was waiting for the view to be destroyed.

These changes resolve the issue by destroying the `AfterRenderRef` once it is executed.

PR Close #58119
2024-10-08 13:27:07 -07:00
Matthieu Riegler 9ca9db4f74 refactor(core): drop ViewRefTracker in favor of ApplicationRef. (#58096)
We can leverage an `import type` to prevent the circular import.

PR Close #58096
2024-10-08 13:25:24 -07:00
ColinJolivet 9f2726bb43 refactor(docs-infra): add tooltip to the download button in playground (#58065)
Add a material tooltip to the download button in the playground in order to clarify what this button does

PR Close #58065
2024-10-08 09:28:37 -07:00
Lang 490786af10 docs: complete the example in use InjectionToken section (#57839)
PR Close #57839
2024-10-08 09:27:23 -07:00
Angular Robot 7b13d34a24 build: update scorecard action dependencies (#58116)
See associated pull request for more information.

PR Close #58116
2024-10-08 06:18:16 +00:00
Angular Robot 99b5417d28 build: update actions/cache digest to 2cdf405 (#58107)
See associated pull request for more information.

PR Close #58107
2024-10-08 06:17:36 +00:00
Angular Robot bf83801b8c build: update actions/checkout digest to eef6144 (#58108)
See associated pull request for more information.

PR Close #58108
2024-10-07 13:26:53 -07:00
arturovt 02de7fc731 fix(zone.js): remove abort listener once fetch is settled (#57882)
This commit updates the `fetch` patch for zone.js. Currently, we're attaching an
`abort` event listener on the signal (when it's provided) and never removing it.
We should be good citizens and remove event listeners whenever objects need to be
properly collected. In Firefox, when saving a heap snapshot and running it through
`fxsnapshot`, querying `AbortSignal` will print a so-called "CaptureMap" with a list
of "lambdas," indicating that the signal is not garbage collected because of the event
listener lambda function.

PR Close #57882
2024-10-07 08:27:54 -07:00
Kristiyan Kostadinov f187c3abf8 fix(compiler-cli): defer symbols only used in types (#58104)
Currently we don't defer any symbols that have references outside of the `import` statement and the `imports` array. This is a bit too aggressive, because it's possible that the symbol is only used for types (e.g. `viewChild<SomeCmp>('ref')`) which will be stripped when emitting to JS.

These changes expand the logic so that references inside type nodes aren't considered.

**Note:** one special case is when the symbol used in constructor-based DI (e.g. `constructor(someCmp: SomeCmp)`, because these constructors will be compiled to `directiveInject` calls. We don't need to worry about them, because the compiler introduces an addition `import * as i1 from './some-cmp';` import that it uses to refer to the symbol.

Fixes #55991.

PR Close #58104
2024-10-07 08:26:07 -07:00
Luan Gong 7eb264a017 docs: use correct heading in templates guide (#58101)
PR Close #58101
2024-10-07 08:22:46 -07:00
Matthieu Riegler b35e7f8bb3 docs: add info on AbstractControl.source type. (#58094)
The source can be of any type and can't be inferred from `T`

fixes #58076

PR Close #58094
2024-10-07 08:21:56 -07:00