30568 Commits

Author SHA1 Message Date
Andrew Scott 58ee039d5e release: cut the v18.1.2 release 18.1.2 2024-07-24 10:53:25 -07:00
Matthieu Riegler 3d0ee73892 docs(docs-infra): Use shiki for code highlighting (#57059)
PR Close #57059
2024-07-24 10:24:52 -07:00
Matthieu Riegler 8bb5937e71 docs(docs-infra): disable experimental decorators (#56257)
Also enable useDefineForClassFields and disable downlevelIteration

PR Close #56257
2024-07-24 10:18:22 -07:00
Andrew Scott c969422da0 Revert "fix(router): Scroller should scroll as soon as change detection completes (#55105)" (#57115)
This reverts commit 66ffeca2de.

It looks like nuxt encountered the same issue with scrolling when
waiting for Vue's `nextTick`, which is a microtask. This would have
similar timing to ZoneJS's rendering in the microtask queue. This
reverts to a `setTimeout` alone, though recreates the problem in #53985.
This was also mentioned in one of the comments in the Nuxt issue and the
solution would be `rAF`.

In order to address #53985, we'd likely want to use the `race(rAF, setTimeout)`
that we use in the zoneless and coalescing schedulers. This would have effectively the same timing as
the `afterNextRender` implementation here with zoneless, but quite
different timing to `afterNextRender` with ZoneJS.

fixes #57109

PR Close #57115
2024-07-24 10:04:38 -07:00
Tom Wilkinson 1a606b0bfc refactor(core): Switch to using concat rather than spread operator for events. (#57103)
Internally, the JSCompiler does not dead code eliminate this code when its using spread.

PR Close #57103
2024-07-23 15:54:23 -07:00
Andrew Scott 288a4fac01 test(docs-infra): fix test with slight adjustment to error handling (#57104)
The test was broken because multiple errors happen and the last error would be the displayed message.
However, in this case, those errors happen because the initial one already terminated the container
so the follow-up errors are a result of the service being in an unexpected state

PR Close #57104
2024-07-23 15:45:55 -07:00
Andrew Scott 889a02b1c3 test(docs-infra): update adev tests to be zoneless (#57100)
Updates adev tests to use zoneless and remove
fakeAsync/waitForAsync/tick

PR Close #57100
2024-07-23 14:50:32 -07:00
Angular Robot 23fa43d044 build: update all non-major dependencies (#57092)
See associated pull request for more information.

PR Close #57092
2024-07-23 12:18:34 -07:00
Angular Robot c979dfd462 build: update github/codeql-action action to v3.25.13 (#57091)
See associated pull request for more information.

PR Close #57091
2024-07-23 10:29:17 -07:00
Andrew Scott 915b0e0b16 Revert "fix(compiler-cli): add warning for unused let declarations (#57033)" (#57088)
This reverts commit c76b440ac0.

PR Close #57088
2024-07-22 15:28:04 -07:00
JoostK 463945003d fix(compiler): limit the number of chained instructions (#57069)
Some Angular template instructions that follow each other may be chained
together in a single expressions statement, containing a deeply nested
AST of call expressions. The number of chained instructions wasn't previously
limited, so this could result in very deep ASTs that cause stack overflow
errors during TypeScript emit.

This commit introduces a limit to the number of chained instructions to
avoid these problems.

Closes #57066

PR Close #57069
2024-07-22 11:50:12 -07:00
Rushikesh Kavar 06ae22680e docs: Update packages/router/src/router.ts (#57053)
Co-authored-by: Andrew Scott <atscott01@gmail.com>
PR Close #57053
2024-07-22 10:52:36 -07:00
Rushikesh Kavar f917b6e4d0 docs: Update packages/router/src/router.ts (#57053)
Co-authored-by: Andrew Scott <atscott01@gmail.com>
PR Close #57053
2024-07-22 10:52:36 -07:00
Rushikesh Kavar 87d042ba8a docs: adding reference to RouterModule.forroot method in Router service for better understanding for beginner (#57053)
PR Close #57053
2024-07-22 10:52:36 -07:00
Rushikesh Kavar 4b561f8f35 docs: Adding Router service hierarchical injection level (#57053)
PR Close #57053
2024-07-22 10:52:36 -07:00
Kristiyan Kostadinov b9fb98c67c fix(core): tree shake dev mode error message (#57035)
Adds an `ngDevMode` check before a runtime error message.

Fixes #57034.

PR Close #57035
2024-07-22 10:49:18 -07:00
xpl0siv 8a005eada5 docs: fix push-notifications.md (#57065)
Added missing comma at actions notifications example.
SyntaxError:
Expected ',' or ']' after array element in JSON at position 255

PR Close #57065
2024-07-22 10:46:56 -07:00
Salanoid ae15dd94ef docs: fixing dead link (#57077)
Fixing guide dead link for issue #57067.

PR Close #57077
2024-07-22 09:58:42 -07:00
Angular Robot 7792aad8da build: update babel dependencies (#57045)
See associated pull request for more information.

Closes #56996 as a pr takeover

PR Close #57045
2024-07-19 13:46:00 -07:00
Thomas Nguyen 142c2dffb0 refactor(core): Allow manual renderer listens to contribute to event delegation as well. (#56799)
There are existing usages that inject the renderer to manualy listen (often for event
delegation purposes). These should contribute as well.

PR Close #56799
2024-07-19 13:42:26 -07:00
Ashish Deshpande 56f0fc1f9f docs: update broken link to version updates in versionEvent (#56870) (#56870)
PR Close #56870
2024-07-19 13:41:54 -07:00
Matthieu Riegler 9e52c1c840 fix(core): afterNextRender hooks return that callback value. (#57031)
`afterRender` was working fine but `afterNextRender` wasn't

PR Close #57031
2024-07-19 13:41:00 -07:00
Kristiyan Kostadinov e904f34020 fix(compiler-cli): add warning for unused let declarations (#57033)
Adds a new extended diagnostic that will flag `@let` declarations that aren't used within the template. The diagnostic can be turned off through the `extendedDiagnostics` compiler option.

PR Close #57033
2024-07-19 11:50:32 -07:00
Matthieu Riegler be16d7fcc3 docs: fix filtering on API reference (#57057)
With the input binding, the `type` can become `undefined`

PR Close #57057
2024-07-19 11:49:05 -07:00
Matthieu Riegler 04c504ab40 docs: fix pipes link (#52979)
fixes #52968

PR Close #52979
2024-07-18 18:05:07 -07:00
Matthieu Riegler 91483ab5b3 docs(docs-infra): filter types (#52979)
PR Close #52979
2024-07-18 18:05:07 -07:00
Matthieu Riegler e088c80854 docs(docs-infra): update tutorial deps to 18.1 (#57024)
lockfile were still loading 18.0 but TS was already at 5.5 which 18.0 doesn't support

PR Close #57024
2024-07-18 15:27:24 -07:00
Sheik Althaf 14d442a6c3 refactor(devtools): use signal api in property view (#56995)
Refactor the property view components to use signal apis, in future we
can make the components onPush and zoneless

PR Close #56995
2024-07-18 15:23:32 -07:00
Matthieu Riegler 1999e31851 docs: Add @let block entry to the API (#57027)
PR Close #57027
2024-07-18 15:22:42 -07:00
qshurick f1349e1d0f docs: Update service code snippet (#57036)
Snippet was missing import for the function and failed when copied to the test
project

PR Close #57036
2024-07-18 15:21:32 -07:00
Tom Wilkinson f3014c5392 refactor(core): Move logic into early event contract files. (#56994)
Also remove some dead a11y code, now that a11y is in `ActionResolver`.

PR Close #56994
2024-07-18 12:05:18 -07:00
Fred Sauer bbabf5451a docs: fix headings and code font in @for docs (#57007)
- Fix "Syntax" and "Description" h2 headings
- Fix code font in h3 headings

PR Close #57007
2024-07-18 11:07:43 -07:00
Tomek Sułkowski edbb403171 docs(docs-infra): add open in StackBlitz button to code editor (#57018)
PR Close #57018
2024-07-18 08:41:35 -07:00
Matthieu Riegler d3e14b35d3 docs(docs-infra): no prefix for the current major (#56882)
To allow navigation back from next.angular.dev, the current major uses no prefix.

fixes #56868

PR Close #56882
2024-07-18 08:40:09 -07:00
Andrew Scott 4bfe707ac2 release: cut the v18.1.1 release 18.1.1 2024-07-17 13:05:52 -07:00
Alan Agius 4f11d6eee2 fix(zone.js): support Timeout.refresh in Node.js (#56852)
The `Timeout` object in Node.js has a `refresh` method, used to restart `setTimeout`/`setInterval` timers. Before this commit, `Timeout.refresh` was not handled, leading to memory leaks when using `fetch` in Node.js. This issue arose because `undici` (the Node.js fetch implementation) uses a refreshed `setTimeout` for cleanup operations.

For reference, see: https://github.com/nodejs/undici/blob/1dff4fd9b1b2cee97c5f8cf44041521a62d3f133/lib/util/timers.js#L45

Fixes: #56586

PR Close #56852
2024-07-16 12:46:52 -07:00
Matthieu Riegler a1cb9dfc0d fix(common): Don't run preconnect assertion on the server. (#56213)
The `window` global is patched by domino on the server but the value of `window.location.href` isn't a valid base.

Before this change `getUrl()` would throw when running in devmode on the server.

Fixes #56207

PR Close #56213
2024-07-16 09:53:33 -07:00
Matthieu Riegler f02f351cda docs: Expose $localize in the @angular/localize/init entry. (#55345)
fixes #54388

PR Close #55345
2024-07-16 08:43:53 -07:00
homerlsy e9837c94d0 docs: update structural-directives.md select to [select] (#56955)
this custom directive's selector should be [select]
PR Close #56955
2024-07-16 08:42:59 -07:00
Kristiyan Kostadinov 5682527d94 fix(core): not all callbacks running when registered at the same time (#56981)
Fixes that only the first callback was firing when multiple are registered in the same call to `afterNextRender`, e.g. `afterNextRender({earlyRead: fn, read: fn});`

Fixes #56979.

PR Close #56981
2024-07-16 08:42:26 -07:00
Angular Robot 4c1f3cf843 build: update github/codeql-action action to v3.25.12 (#56997)
See associated pull request for more information.

PR Close #56997
2024-07-16 08:41:58 -07:00
Kristiyan Kostadinov daf0317bdc fix(compiler): JIT mode incorrectly interpreting host directive configuration in partial compilation (#57002)
Fixes that the runtime implementation of `ɵɵngDeclareDirective` was interpreting the `hostDirectives` mapping incorrectly. Instead of treating the inputs/outputs as `['binding', 'alias']` arrays, it was parsing them as `['binding: alias']`. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes #54096.

PR Close #57002
2024-07-16 08:37:26 -07:00
sihyunjojo 6cfc4d8c85 docs: change code formatting for better readability (#56974)
This change improves the consistency and visibility of the documentation by using backticks for code formatting in the instructions.

PR Close #56974
2024-07-15 12:05:44 -07:00
Angular Robot da9149ea10 build: update dependency inquirer to v10 (#56883)
See associated pull request for more information.

PR Close #56883
2024-07-15 11:49:27 -07:00
Matthieu Riegler bbe655ff14 refactor(compiler): include public constructor paramters to class properties. (#56315)
Public properties declared in the constructor are part of the public API and we should extract them.

Fixes #56310

PR Close #56315
2024-07-15 11:39:22 -07:00
Ben Hong 7c0a7a02c0 docs: add quick installation page (#56816)
PR Close #56816
2024-07-15 11:37:57 -07:00
Angular Robot 35b2728994 build: update actions/upload-artifact action to v4.3.4 (#56905)
See associated pull request for more information.

PR Close #56905
2024-07-15 11:35:00 -07:00
Angular Robot 653e898f78 build: update io_bazel_rules_sass digest to 83022b9 (#56954)
See associated pull request for more information.

PR Close #56954
2024-07-15 11:34:26 -07:00
Matthieu Riegler c0855f0e25 build: update material / cdk (#56960)
Material 18.1 includes a fix we were waiting for adev.

Fixes #56786

PR Close #56960
2024-07-15 11:23:40 -07:00
Kristiyan Kostadinov c94a897248 fix(compiler-cli): avoid emitting references to typecheck files in TS 5.4 (#56961)
In #56358 we removed most of the places that untag the references to typecheck files, because it was causing the compiler to throw error when it produces diagnostics. This appears to have caused a regression in TS 5.4 which now emits the synthetic references.

These changes add tagging right before the program emits.

Fixes #56945.

PR Close #56961
2024-07-15 11:22:00 -07:00