30718 Commits

Author SHA1 Message Date
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
Daniel Puckowski 387e1cbf89 fix(compiler): fix CSS animation rule scope (#56800)
It is valid CSS to list keyframe names in an animation declaration only
separating the names with a comma and no whitespace. This is typical of
production builds. Updated a couple of regexes and added a couple of
tests to account for this scenario.

Fixes #53038

PR Close #56800
2024-07-09 09:44:50 +02:00
Kristiyan Kostadinov 02a31c5e4b docs: add documentation page for let declarations (#56886)
Adds a docs page for the new `@let` syntax in Angular 18.1.

PR Close #56886
2024-07-09 09:38:22 +02:00
Matthieu Riegler 5f8cf02256 docs: add a FAQ on how to find the LCP image (#56779)
PR Close #56779
2024-07-09 09:37:19 +02:00
Andrew Kushnir c1e3262119 test(core): simplify @defer-based test to make CI more stable (#56904)
This commit updates one of the `@defer`-based test to use the `on immediate` trigger to make a test mor
e stable without the need to add mocks for the `on idle` (default) condition.

PR Close #56904
2024-07-09 09:36:11 +02:00
cexbrayat 5dcdbfcba9 fix(core): rename the equality function option in toSignal (#56769)
The option introduced in 5df3e78c99 has been named `equals` whereas the existing option in `signal` is named `equal`.
This commit renames the new option to `equal` as well to keep the naming coherent across these APIs.

PR Close #56769
2024-07-08 09:34:07 -07:00
vladboisa d5ce3237f1 docs(docs-infra): add missing context with link (#56896)
Added missing link documenting ng global features.

Fixes #56488

PR Close #56896
2024-07-08 18:03:59 +02:00
Paul Gschwendtner f370f643f7 refactor(compiler-cli): do not truncate/reduce types in API docs (#56572)
Fixes that e.g. signal input APIs docs were removing `undefined` from
the shorthand `input<T>()` documentation.

PR Close #56572
2024-07-08 16:26:39 +02:00
Matthieu Riegler 176b26fd7b docs: remove private symbol from docs (#56851)
fixes #56850

PR Close #56851
2024-07-08 09:54:13 +02:00
Charles Lyding bd0f333502 refactor(localize): reduce deep imports in ng add schematic (#56839)
The `@angular/schematic` package has a `utility` export path which can be
used to access common utility rules and helpers. The previous deep imports
into the `@angular/schematic` package have been switched to the actual
export path where possible. This lowers the potential for breakage from
internal package changes.

PR Close #56839
2024-07-08 09:51:53 +02:00
Sasidharan SD 02da71c35c docs: fix previous configuration link (#56880)
PR Close #56880
2024-07-08 09:47:57 +02:00
cexbrayat 229dd8355e fix(common): typo in warning for NgOptimizedDirective (#56817)
The warning message for the `PLACEHOLDER_DIMENSION_LIMIT_EXCEEDED` check has a repetition of `of`.

PR Close #56817
2024-07-05 13:03:56 +02:00
Kristiyan Kostadinov d7ab5c3a7b fix(compiler-cli): used before declared diagnostic not firing for control flow blocks (#56843)
When we process `@if` and `@for` blocks, we create a scope around their expressions in order to encapsulate the aliases to them. The problem is that this doesn't represent the actual structure since the expression is part of the outer scope. This surfaces by not raising the "used before declared" diagnostic for `@let` declarations.

These changes resolve the issue by processing the expression as a part of the parent scope.

Fixes #56842.

PR Close #56843
2024-07-05 13:02:58 +02:00
Kristiyan Kostadinov 4bcec1ca95 fix(compiler-cli): avoid duplicate diagnostics for let declarations read before definition (#56843)
Fixes that in some cases `@let` declarations that are read before they're defined were producing multiple diagnostics.

PR Close #56843
2024-07-05 13:02:58 +02:00
Dan Nisenson e7da8c2b02 docs: fix broken link (#56848)
fix link @ /guide/forms/reactive-forms#reactive-forms-api-summary
prev: /api/forms
current: /api#forms

PR Close #56848
2024-07-05 12:27:34 +02:00
Corbin Crutchley 97d718dc2f docs: add window title to reference pages (#56840)
PR Close #56840
2024-07-04 14:29:28 +02:00
Alan Agius 6e1f78fd55 perf(http): execute fetch outside of Angular zone (#56820)
In this update, the fetch backend now executes fetch operations outside of the Angular zone. This adjustment primarily aims to decrease Continuous Delivery (CD) cycles on Node.js. The decision was influenced by Undici, the Node.js fetch implementation, which relies on `setTimeouts` to manage response timeouts.

PR Close #56820
2024-07-04 12:10:34 +02:00
Michael van der Luit 34e236abc4 docs: update app-shell docs to reflect v17 (#56836)
Fixes the build commands as previously mentioned here: https://github.com/angular/angular/pull/52294

PR Close #56836
2024-07-04 11:32:13 +02:00
Harish Krishnan a2d93dc4bb docs: Update image-optimization.md (#56819)
Fix the mistyped attribute rel
PR Close #56819
2024-07-04 09:56:17 +02:00
Jessica Janiuk 4e36bf8e90 docs: release notes for the v18.0.6 release 2024-07-03 12:38:31 -07:00
Enea Jahollari c8e2885136 feat(compiler): Add extended diagnostic to warn when there are uncalled functions in event bindings (#56295) (#56295)
The diagnostic will catch issues like:

```html
<button (click)="increment"></button>
<button (click)="increment; decrement"></button>
<button (click)="true ? increment : decrement"></button>
<button (click)="nested.nested1.nested2.increment"></button>
```

PR Close #56295

(cherry picked from commit fd6cd0422d)

PR Close #56295
2024-07-03 15:36:39 +00:00
Matthieu Riegler d9fe17a3df refactor(common): Fire priority check on stable. (#56776)
To support routing on app init, the directive will now fire the priority check when the apps become stable.

fixes #56757

PR Close #56776
2024-07-03 14:40:47 +00:00
Andrew Kushnir 00d9cd240d fix(core): establish proper defer injector hierarchy for components attached to ApplicationRef (#56763)
This commit updates the logic that create an injector for defer blocks (when it's needed) to account for a situation when a component is instantiated without a connection to the current component tree. This can happen if a component is created using its factory function or via `createComponent()` call.

Resolves #56372.

PR Close #56763
2024-07-03 14:08:43 +00:00
Krishna Sahu 838c15e9fe docs: add toSignal import inside the demo example (#56804)
PR Close #56804
2024-07-03 14:07:51 +00:00
komura-c a1f6ff310e docs: fix missing image and baseUrl in tutorials/first-app (#56766)
PR Close #56766
2024-07-02 20:21:40 +00:00
Andrew Kushnir 3089dfae0d docs: add Event Replay section to the Hydration guide (#56770)
PR Close #56770
2024-07-02 20:19:52 +00:00
Matthieu Riegler 331b30ebeb fix(core): support injection of object with null constructor. (#56553)
This is debug only code, it shouldn't have any consequences on prod build.

fixes #56552

PR Close #56553
2024-07-02 17:33:31 +00:00
Andrew Scott 4343cd2ceb fix(router): routes should not get stale providers (#56798)
This fixes a bug with RouterOutlet and its context where it would reuse
providers from a previously activated route.

fixes #56774

PR Close #56798
2024-07-02 17:10:51 +00:00
Angular Robot 1d30296d9c build: update github/codeql-action action to v3.25.11 (#56803)
See associated pull request for more information.

PR Close #56803
2024-07-02 13:04:26 -04:00