30796 Commits

Author SHA1 Message Date
Andrew Scott 3a415719b7 docs: release notes for the v18.1.1 release 2024-07-17 13:11:52 -07:00
Andrew Scott 59fc4defd3 docs: release notes for the v17.3.12 release (#57023) 2024-07-17 12:28:26 -07:00
Alan Agius 982f1b1251 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:51 -07:00
Matthieu Riegler 2c4613a002 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 e5e1f49a22 docs: Expose $localize in the @angular/localize/init entry. (#55345)
fixes #54388

PR Close #55345
2024-07-16 08:43:52 -07:00
homerlsy 80b52021a4 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 e504ad97d4 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 f8f3baa7a1 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
Paul Gschwendtner 7663debce1 perf(language-service): quick exit if no code fixes can exist (#57000)
This is a performance optimization that would exit early when
code actions are requested, but we know Angular cannot provide fixes
based on the error codes.

Previously, we would unnecessarily compute and analyze the application
for semantic diagnostics.

This will be helpful for: https://github.com/angular/vscode-ng-language-service/pull/2050

PR Close #57000
2024-07-16 08:41:03 -07:00
Kristiyan Kostadinov 9167fc815c 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 2a71f056b8 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:43 -07:00
Angular Robot ac9d9db4e6 build: update dependency inquirer to v10 (#56883)
See associated pull request for more information.

PR Close #56883
2024-07-15 11:49:26 -07:00
Matthieu Riegler e958fa8a3c 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:21 -07:00
Ben Hong 7a5384cab8 docs: add quick installation page (#56816)
PR Close #56816
2024-07-15 11:37:57 -07:00
Paul Gschwendtner 4bb558ab0c feat(language-service): support writing code refactorings (#56895)
In addition to quick fixes, this commit adds the ability to write
code refactoring actions that can be applied by users.

For example, we may implement a migration as a code refactoring action.
Notably the quick fix support, existing already, is insufficient as it
only allows for edits to be applied based on diagnostics shwon in e.g.
VSCode.

PR Close #56895
2024-07-15 11:35:40 -07:00
Angular Robot 9173e9b0d6 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:34:59 -07:00
Angular Robot 4448b85a27 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:25 -07:00
Matthieu Riegler ea01ce4403 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:39 -07:00
Kristiyan Kostadinov f0d6d0688d 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
Jessica Janiuk 0ea6a4a361 fix(migrations): fix common module removal (#56968)
This fixes the case that common module is removed on a second run of the migration. We were not looking at block parameters for common module usage.

PR Close #56968
2024-07-15 11:17:46 -07:00
Matthieu Riegler 38b93201c5 refactor(compiler-cli): Extract call signatures from interfaces. (#56973)
This commit adds support for extracting call signals from interfaces.

fixes #56969

PR Close #56973
2024-07-15 11:07:57 -07:00
Matthieu Riegler 8f08d04916 ci: add an entry for aio in the pullapprove config (#56952)
This would allow me & ben to review some of the changes on the 17.3 branch, for example the redirections.

PR Close #56952
2024-07-11 17:03:26 -07:00
Matthieu Riegler 0953d655b7 docs(docs-infra): focus api search filter on non-touch devices (#56294)
PR Close #56294
2024-07-11 12:05:33 -07:00
Paul Gschwendtner e5f11dd31e build: fix rate limits when deploying angular.dev site (#56929)
This commit fixes that the angular.dev deployment is subject
to GitHub API rate limiting due to lack of an access token.

This commit fixes this, similar to how we fixed it in
`angular/components`. The token is pure read-only.

PR Close #56929
2024-07-11 08:54:50 -07:00
Tomer953 107173c14d fix(compiler): use strict equality for 'code' comparison (#56944)
Replace loose equality (==) with strict equality (===) for the 'code' variable.
This change ensures type safety and prevents unintended type coercion.
PR Close #56944
2024-07-11 08:52:58 -07:00
Matthieu Riegler be689df4ad build: update deps (#56946)
Updating `build-tooling` and `docs`.

PR Close #56946
2024-07-11 08:52:28 -07:00
Andrew Kushnir dd6e548373 docs: fixing links to guides on the Performance Overview page (#56942)
PR Close #56942
2024-07-10 17:06:07 -07:00
Tom Wilkinson d011c9f7ba refactor(core): Refactor EarlyEventContract to prepare for using it as a container. (#56900)
This is the first step towards combining `EarlyEventContract` and `EventContract`. It contains a few refactors, such as making names more consistent.

The goal of this refactor is to remove the `EarlyEventContract` class altogether, as well as `EventContract`.

To install the early event contract with the default events in early script tag, users will call:

`bootstrapGlobalEarlyEventContract()`

And for boostraping:

`registerGlobalDispatcher(dispatcher)`

PR Close #56900
2024-07-10 13:53:03 -07:00
Michael van der Luit 78c44ec5ec docs: move public folder to workspace configuration section (#56931)
move the public folder entry from the application project files section to the workspace configuration files section

PR Close #56931
2024-07-10 13:52:06 -07:00
Ben Hong 8df13e1cae docs: add overview page for performance section (#56828)
PR Close #56828
2024-07-10 18:17:04 +02:00
Paul Gschwendtner 7f550ea0c8 refactor(compiler-cli): move JIT transforms into ngtsc (#56892)
This commit moves the JIT transforms into the ngtsc folder. They existed
outside of ngtsc mostly as an historic artifact— and now with compiler
relying on them even more deeply, it makes sense to move them into
`ngtsc/transform`.

PR Close #56892
2024-07-10 17:29:20 +02:00
Paul Gschwendtner 98ed5b609e feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892)
Currently when compiling code with the Angular compiler, all classes
with Angular decorators are compiled with AOT. This includes type
checking, scope collection etc.

This may not be desirable for all components, e.g. dynamic components,
or test components w/ `TestBed.configureTestingModule` (if compiled with ngtsc).

Those components can opt out of AOT on a per component-basis via `jit:
true`. This is helpful as it allows incremental migrations/refactorings
to AOT. Whether we want to keep this capability long-term is something
to be discussed separately.

For now though, we should fix that components compiled with `jit: true`
actually work as expected. Currently this **not the case** as soon as
the new initializer APIs are used— as those do no longer declare class
metadata with decorators.

This commit runs the JIT transform on JIT-opted classes.

Related: https://docs.google.com/document/d/1ox4atCJldWWDXlaYgwM-hU8BNsTpKNW7gx8OfZ0HtRY/edit?resourcekey=0-G1haTNYtD-dN0vNRkQ8_OQ&tab=t.0

PR Close #56892
2024-07-10 17:29:19 +02:00
Angular Robot c0ef7de28e build: update actions/upload-artifact action to v4.3.4 (#56906)
See associated pull request for more information.

PR Close #56906
2024-07-10 17:28:33 +02:00
Angular Robot 4d448ff817 build: update io_bazel_rules_sass digest to ea6b195 (#56917)
See associated pull request for more information.

PR Close #56917
2024-07-10 17:24:58 +02:00
Tom Wilkinson 6271a16755 refactor(core): Remove unused A11Y_CLICK_SUPPORT define. (#56901)
This behavior was moved to be configured by a runtime boolean, rather
than a define.

PR Close #56901
2024-07-10 15:50:39 +02:00
Matthieu Riegler bafafb25c9 docs(docs-infra): fix z-index issue on mobile (#56874)
fixes #56871

PR Close #56874
2024-07-10 15:48:42 +02:00
Pawel Kozlowski b6fb5b7fa9 release: cut the v18.2.0-next.0 release 18.2.0-next.0 2024-07-10 15:41:47 +02:00
Matthieu Riegler 8fc26058fb docs: fix testing angular url (#56847)
PR Close #56847
2024-07-10 15:18:12 +02:00
Pawel Kozlowski 85d1d22ade docs: release notes for the v18.1.0 release 2024-07-10 15:05:20 +02:00
Pawel Kozlowski 543f6363e7 docs: release notes for the v18.0.7 release 2024-07-10 14:54:00 +02:00
Harish Krishnan 9d941773a2 docs: Update components-scenarios.md (#56921)
Fix grammatical issues

PR Close #56921
2024-07-10 11:29:17 +02:00
Matthieu Riegler aa8a47911f docs: update version table for 18.1 (#56920)
PR Close #56920
2024-07-10 09:34:47 +02:00
Andrew Scott 9fd2ef915e docs: Update component testing scenarios (#56388)
This update goes through half of the component-scenarios guide and makes
relevant updates to examples.

Updates include:

* Use signals in examples
* Advise and use `await fixture.whenStable` more frequently than
  `detectChanges`
* Use and advise mocks and spies more sparingly
* Remove `waitForAsync` and jasmine `done` guidance - The ecosystem has evolved
  and these aren't needed
* Remove marble testing for rxjs - this belongs in rxjs documentation,
  not in Angular
* Remove class-only component testing. This approach is not advisable
  for components.

related to #48510

PR Close #56388
2024-07-10 09:11:20 +02:00
Marcos Paulo dos Santos 846657253a docs: update compat table with 13.4.x (#56915)
PR Close #56915
2024-07-10 09:10:29 +02:00
Andrew Scott 5d75b1db2b fix(core): toSignal equal option should be passed to inner computed (#56903)
The user-defined equality function needs to be passed to the inner
computed it will still use `Object.is` and prevent notifications.

PR Close #56903
2024-07-09 19:52:17 +02:00
Jessica Janiuk 5179ce3473 fix(migrations): Fix cf migration let condition semicolon order (#56913)
In rare cases people may put let statements before else statements and omit semicolons, causing migration issues.

PR Close #56913
2024-07-09 18:17:51 +02:00
Matthieu Riegler 260531d56b refactor(compiler-cli): escape missing decorators. (#56794)
Escaping decorators is required as else they are considered as new JSDocs tags.

fixes #56569

PR Close #56794
2024-07-09 13:13:52 +02:00
Ofer Segev fe52d8fa62 docs: update dependency-injection-context.md (#56736)
HeroService is not part of this example, and is only introduced in the next example. Use type Service1 for this.service1, as its type
PR Close #56736
2024-07-09 13:05:56 +02:00
Matthieu Riegler 31b235b94b refactor(platform-server): Add private profiler. (#56274)
The commit adds a private profiler to investigate SSR performance.

PR Close #56274
2024-07-09 12:47:45 +02:00
Kristiyan Kostadinov 0beba0d749 docs: fix wrong link in template overview (#56911)
One of the links added in #56886 was incomplete.

PR Close #56911
2024-07-09 12:13:11 +02:00