30370 Commits

Author SHA1 Message Date
arturovt 6e02e50fa1 fix(zone.js): add missing APIs to Node.js fs patch (#54396)
This commit updates the list of Node.js `fs` APIs to be patched because
they haven't been updated for a long time. It adds `opendir,lutimes,writev`.
For example, the `opendir` method was added to Node.js in version 12.12.0 in
2019, causing some of the APIs to potentially be always called within the
`<root>` context.

**Note:** There are missing unit tests for these changes because in unit tests,
`fs` is patched by Bazel's Node.js rules and its `node_patches.cjs`. However,
the APIs are successfully patched in the real production code and are called
with the correct context.

PR Close #54396
2024-05-03 08:03:25 -07:00
Doug Parker eb91efa80a refactor(devtools): set key in manifest.chrome.json (#55639)
This key comes from the release build of the Chrome extension. Setting it here configures the extension ID of a local build to match the extension ID of the public release. This makes Chrome recognize that local builds are the same extension leading to more intuitive behavior. It's also useful for allowlists of extension IDs to keep the local ID consistent.

PR Close #55639
2024-05-02 14:46:32 -07:00
Andrew Scott b8c0084c50 refactor(core): Update coalescing to just use patched timers in root zone (#55366)
Rather than attempting to use the native timing functions, this commit
simplifies the logic significantly by using the global timer functions
as they are, either patched or unpatched. When Zone is defined, we run
the timers in the root zone. This has more predictable behavior and
timing than (a) using both patched and unpatched versions of timers in
different places (b) trying to get an unpatched timer and failing due to
environment specifics and patches that aren't ZoneJS.

PR Close #55366
2024-05-02 14:43:10 -07:00
Andrew Kushnir 93dc65a674 refactor(core): mark @defer APIs as stable (#55625)
This commit removes the `@developerPreview` annotation from the `@defer` APIs, effectively promoting them (and the entire feature!) to stable.

PR Close #55625
2024-05-02 14:42:00 -07:00
Doug Parker 73de8b6f8d release: bump Angular DevTools to 1.0.15 (#55643)
PR Close #55643
2024-05-02 13:37:42 -07:00
Rahat Ahmed 662bca47f6 refactor(core): Turn off JSNAMESPACE_SUPPORT by default (#55598)
All usages in google3 have been deleted so this should be a no-op. Next I'll clean up all the configurations turning this off and then delete the option entirely.

PR Close #55598
2024-05-02 12:34:24 -07:00
twerske 8dbeafea47 docs: style the nav based on version type (#55628)
PR Close #55628
2024-05-02 12:33:27 -07:00
Kristiyan Kostadinov 91b007e58f fix(compiler): add math elements to schema (#55631)
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags.

Fixes #55608.

PR Close #55631
2024-05-02 11:12:15 -07:00
cexbrayat da5ef5213a docs: typos in NG0956 (#55630)
PR Close #55630
2024-05-02 11:10:59 -07:00
Angular Robot 4a45910904 build: update io_bazel_rules_sass digest to 9f8be59 (#55602)
See associated pull request for more information.

PR Close #55602
2024-05-02 11:06:56 -07:00
iteriani 8432d75b9a refactor(core): Remove jsaction from element after handling the event. (#55549)
This also adds a test to make sure that the event contract is still listening to other events, especially in the case where we may want partial hydration in the future.

PR Close #55549
2024-05-02 11:04:59 -07:00
Andrew Scott 243f573797 Revert "fix(core): render hooks should not specifically run outside the Angular zone (#55399)" (#55624)
This reverts commit 7e89753eef.

Running render hooks inside the zone is specifically problematic for
`afterRender` hooks. If the callback has async task, it would cause an
infinite change detection. In addition, updating state in render hooks
is generally discourages and certainly should update state in a way that
notifies Angular of the change (either via signal or with `markForCheck`) rather
than relying on ZoneJS to pick it up (which would only work if the
change is done inside an async task).

PR Close #55624
2024-05-02 11:00:39 -07:00
Andrew Scott d5edfde6ee fix(core): afterRender hooks registered outside change detection can mark views dirty (#55623)
This commit fixes an error in the looping logic of `ApplicationRef.tick`
when the tick skips straight to render hooks. In this case, if a render
hook makes a state update that requires a view refresh, we would never
actually refresh the view and just loop until we hit the loop limit.

PR Close #55623
2024-05-02 10:58:29 -07:00
Kristiyan Kostadinov 36130b2e72 fix(core): don't schedule timer triggers on the server (#55605)
Fixes that even though we weren't rendering the deferred block the server, we were still triggering the timeout which can delay the response.

Fixes #55475.

PR Close #55605
2024-05-01 15:10:32 -07:00
Emma Twersky ce672c6829 docs: update press kit to reduce confusion (#55611)
PR Close #55611
2024-05-01 15:09:39 -07:00
Matthieu Riegler 9aa47c1983 docs: fix missing example (#55584)
preview is hidding was responsible for hidding the content.

fixes #55583

PR Close #55584
2024-05-01 15:07:58 -07:00
Angular Robot ccc0902dd2 build: update actions/checkout digest to 0ad4b8f (#55537)
See associated pull request for more information.

PR Close #55537
2024-05-01 15:07:24 -07:00
Tom Wilkinson 4837621df8 refactor(core): Move action resolution into a standalone class. (#55523) (#55621)
This refactor will enable moving this functionality into the dispatcher.

PR Close #55523

PR Close #55621
2024-05-01 15:02:22 -07:00
Tom Wilkinson 7dce62bb05 refactor(core): Remove STOP_PROPAGATION define. (#55582) (#55621)
This define has been removed at head, and now legacy stop propagation
behavior can be opted into at the LegacyDispatcher level, if necessary.

PR Close #55582

PR Close #55621
2024-05-01 15:02:22 -07:00
Tom Wilkinson d1721c3d51 refactor(core): Add a boostrapCustomEvent method. (#55603) (#55621)
This can replace CUSTOM_EVENT_SUPPORT by allowing users to bootstrap
custom event support separately from the `EventContract`.

PR Close #55603

PR Close #55621
2024-05-01 15:02:22 -07:00
Rahat Ahmed e58ff4a6dd docs(core): Add event-dispatch README.md (#55521)
PR Close #55521
2024-05-01 11:53:26 -07:00
Andrew Kushnir 92a1e59529 release: cut the v18.0.0-rc.0 release 18.0.0-rc.0 2024-05-01 11:47:42 -07:00
Doug Parker 78e4af0f0a release: bump DevTools to 1.0.14 (#55545)
PR Close #55545
2024-04-30 17:02:00 -07:00
Andrew Scott 122478c202 refactor(core): Ensure animations are flushed before running render hooks (#55564)
This commit ensures we flush animations by calling renderFactory
begin/end in cases where the ApplicationRef._tick happens in a mode that
skips straight to the render hooks.

PR Close #55564
2024-04-30 15:39:57 -07:00
Ben Hong 354cd9cd57 docs: add README for adev site (#55578)
PR Close #55578
2024-04-30 14:04:56 -07:00
Angular Robot 43b604bedf build: lock file maintenance (#55575)
See associated pull request for more information.

PR Close #55575
2024-04-30 14:04:00 -07:00
Andrew Scott e7225dd06d docs: Reference page anchor scroll consistency (#55566)
The docs-viewer loads asynchronously and can happen after the scroll
event has happened and the Router has attempted to scroll to the
requested position/anchor. This commit saves the scroll event and
handles it again if the cards are loaded after scrolling happens.

PR Close #55566
2024-04-30 14:03:08 -07:00
twerske 76fd874039 docs: fix formatting for signal inputs guide (#55275)
PR Close #55275
2024-04-30 14:02:14 -07:00
Serge K Lebedev 0c82c10e59 docs(changelog): remove duplicate mutate removal entry in 17.0.0 (#53471)
PR Close #53471
2024-04-30 14:00:43 -07:00
Paul Gschwendtner 8226327799 build: improve incremental rebuilds of compliance tests (#55594)
Currently whenever a compliance test case TS file is modified, all
compliance tests in repository are rebuilt in partial compilation mode.
This is inefficient and also slows down local development where one may
use a wildcard to run all test targets inside `/test/compliance/...`.

This commit fixes this.

PR Close #55594
2024-04-30 09:22:46 -07:00
Pawel Kozlowski 8f99946d1d docs(core): add documentation for errors NG0955 and NG0956 (#55591)
This commit adds detailed description for the errors NG0955 and NG0956.
Those errors correspond to the check introduced in the built-in for loop.

PR Close #55591
2024-04-30 09:21:34 -07:00
Angular Robot 09613c194a build: update scorecard action dependencies (#55589)
See associated pull request for more information.

PR Close #55589
2024-04-30 09:20:13 -07:00
Andrew Scott aefee87074 fix(router): Scroller should scroll as soon as change detection completes (#55105)
Using `setTimeout` to delay scrolling can result in scrolling in the
next frame and cause noticeable flicker. This commit scrolls as soon as
the next render happens (or in `setTimeout` if a render does not happen
before then).

fixes #53985

PR Close #55105
2024-04-30 09:19:14 -07:00
Joey Perrott f7ba9d26cf ci: complete migration to prettier formatting (#55580)
Format the remaining unformatted files in the repository

PR Close #55580
2024-04-29 14:00:17 -07:00
Mikal Callahan 3113d8414c docs(docs-infra): allow file renaming in code editor (#54989)
Any filename but the main.ts is now editable.

PR Close #54989
2024-04-29 13:42:27 -07:00
Matthieu Riegler 1595c9dbc2 docs: add mention of the HTTP client for interceptors (#55551)
fixes #53911

PR Close #55551
2024-04-29 13:41:12 -07:00
Matthieu Riegler 3eadaf0f2a docs: fix broken link to error doc (#55547)
PR Close #55547
2024-04-29 13:40:03 -07:00
ahmadhakeem18 3c46d3f518 docs: update NgClass example description to match the example's behavior (#55209)
Co-authored-by: Sonu Kapoor <sonukapoor@users.noreply.github.com>

PR Close #55209
2024-04-29 13:39:19 -07:00
ahmadhakeem18 d3dce326d7 docs: show the difference between pseudo classes angular uses and native ones in runtime (#53819)
PR Close #53819
2024-04-29 13:35:34 -07:00
Doug Parker 0dcae69aaf refactor(compiler): add handler attribute to XMB output (#54865)
This allows tracking of which tools generated which XMB files and helps attribute Angular usage.

PR Close #54865
2024-04-29 11:56:32 -07:00
Joey Perrott 89dfb24b3a refactor: migrate compiler-cli to prettier formatting (#55485)
Migrate formatting to prettier for compiler-cli from clang-format

PR Close #55485
2024-04-29 10:25:45 -07:00
Joey Perrott 9d898982ad refactor: migrate zone.js to prettier formatting (#55427)
Migrate formatting to prettier for zone.js from clang-format

PR Close #55427
2024-04-29 09:52:07 -07:00
Joey Perrott 26ad8dd9f4 refactor: migrate core to prettier formatting (#55488)
Migrate formatting to prettier for core from clang-format

PR Close #55488
2024-04-29 09:49:21 -07:00
Andrew Scott b5ec30a929 refactor(core): Permit disabling autoDetect for zoneless fixture (#55494)
The caveat here is that this needs to be done before creating the
fixture. There are some technical issues to overcome with disabling it
after it was already enabled, related to detaching from `ApplicationRef`
without other side effects.

PR Close #55494
2024-04-26 09:42:16 -07:00
Kristiyan Kostadinov f93e5180be fix(migrations): resolve multiple structural issues with HttpClient migration (#55557)
Fixes several issues with the `HttpClient` migration that showed up after I tried updating the Material docs site to the latest v18 release. Includes:
* The migration was assuming that all Angular decorators have at least one argument. This led to a null pointer error that broke the v18 update process when I was testing it.
* The migration incorrectly reimplemented the detection of classes with Angular decorators. This can cause code to be migrated incorrectly and doesn't handle cases like import aliases. I've switched it to use the existing tooling for detecting decorated classes.
* The migration was trying to migrate directives, even though they don't support the `imports` field.
* The migration was detecting `TestBed.configureTestingModule` calls using a raw string match which is very fragile and can be broken by the user's formatting.
* There were syntax errors in the unit tests.
* There were type checking errors in the unit tests, for example none of them were importing the Angular decorators that they were migrating.

There's more room for improvement, but this should resolve the most glaring issues without having to rewrite too much.

PR Close #55557
2024-04-26 09:32:31 -07:00
Matthieu Riegler 21532f8eb8 docs: update ChangeDetectionStrategy links (#55553)
fixes #54227
fixes #50943

PR Close #55553
2024-04-26 09:31:48 -07:00
Matthieu Riegler 1e87b7b8c0 docs: remove mention of style sanitization. (#55553)
fixes #49566

PR Close #55553
2024-04-26 09:31:47 -07:00
Matthieu Riegler 0c7fd4ac91 docs: remove image (#55553)
The image was replaced by the following mermaid chart.

PR Close #55553
2024-04-26 09:31:47 -07:00
Matthieu Riegler 890cccfd49 docs: update app-shell to reflect actual content (#55550)
fixes #55507

PR Close #55550
2024-04-26 09:29:37 -07:00
iteriani 7a976784c0 refactor(platform-server): Update event_replay_spec to more match production code. (#55517)
Notably, do evals where in SSR we evaluate a contract binary and evaluate scripts.

PR Close #55517
2024-04-25 14:58:12 -07:00