30232 Commits

Author SHA1 Message Date
Pawel Kozlowski 1726b0308d release: cut the v18.0.1 release 18.0.1 2024-05-29 18:05:21 +02:00
naaajii ba85d08158 fix(migrations): handle empty ngSwitchCase (#56105)
empty ngSwitchCase generate `case ()` which isn't valid syntax therefore adding quotes will help prevent us migrate empty case if no condition was provided

fix angular#56030

PR Close #56105
2024-05-29 15:38:39 +02:00
Thomas Nguyen 4fdc93bcd5 refactor(core): Use event_dispatcher in event_replay code. (#56036)
This makes events bubble! This change also contains changes to
dispatcher and event_dispatcher to make replay synchronous,
so that we avoid odd timing issues. This can be split out though.

Lastly, we have one cleanup change to move the mapping from
event type to functions on the element itself.

PR Close #56036
2024-05-29 12:59:23 +02:00
Neil Runcie 3b1a25c433 docs: update links in guide for migrating v14 apps to v15 at angular.dev (#56116)
Fixes an issue in the update guide found at https://angular.dev/update-guide?v=14.0-15.0&l=3 which has links that redirect to v17 documentation. This is because the links were missing the v15 reference within the a tag links.

Fixes #56101

PR Close #56116
2024-05-29 12:52:22 +02:00
TJ Kohli f8726052d9 docs: compress favicons (#56133)
Run favicons through a few lossless image optimization algorithms to decrease size and improve loading speed

PR Close #56133
2024-05-29 12:51:08 +02:00
Char2s fd61a4628b docs: correct browserslist compatibility docs (#56027)
PR Close #56027
2024-05-29 12:46:12 +02:00
Angular Robot dd7e837f17 docs: update Angular CLI help [18.0.x] (#56093)
Updated Angular CLI help contents.

PR Close #56093
2024-05-29 12:45:04 +02:00
Sasidharan SD 37b0bad470 docs: fix links in aot compiler page (#56132)
PR Close #56132
2024-05-29 12:40:16 +02:00
Alan Agius fa4bcf3621 test: add back control_flow_migration tests (#56130)
These were incorrectly removed via https://github.com/angular/angular/pull/55391#issuecomment-2135352758

PR Close #56130
2024-05-28 16:48:08 +02:00
Kristiyan Kostadinov 0b6018b755 build: update to latest dev infra code (#56128)
Updates the repo to the latest dev infra code which involves updating a patch and renaming all the golden files to end with `.api.md`.

PR Close #56128
2024-05-28 14:42:31 +02:00
Harshal 35148426f6 docs: change link from #components-overide to #override-component-providers (#56111)
PR Close #56111
2024-05-28 09:32:38 +02:00
Matthieu Riegler c790e77146 docs: fix some errors docs (#55706)
PR Close #55706
2024-05-27 14:52:20 +02:00
Andrew Kushnir 4e6ea0e19c fix(core): handle elements with local refs in event replay serialization logic (#56076)
Previously, the event replay serialization logic was located before we verify that a `TNode` exists. `TNode`s may not exist in `tView.data` array in several cases, including cases when there is a local ref used on an element: in this case an extra slot in `LView` contains a reference to the same element and `TNode` is not needed. This commit moves the event replay serialization logic a bit lower, after we check for TNode presence.

Resolves #56073.

PR Close #56076
2024-05-27 13:50:10 +02:00
Aristeidis Bampakos 3edd07fa11 docs: update CLI reference (#56060)
PR Close #56060
2024-05-27 11:42:32 +02:00
Sasidharan SD e5948905d2 docs: fix schematics cli broken link (#56070)
PR Close #56070
2024-05-27 11:40:41 +02:00
Charles Lyding ce76408a86 docs: update tutorials to use v18 (#56043)
All documentation tutorials will now use the recently released version 18
of Angular. Additionaly, the tutorials have been migrated to use the new
`@angular/build` package which does not contain the Webpack related dependencies.
The `first-app` tutorial was not moved to `@angular/build` due to it having
karma related dependencies present which currently requires the Webpack-based
build system during test execution.

PR Close #56043
2024-05-27 11:39:26 +02:00
Ben Halbach 823ae417f5 docs: change count to this.count in example (#56080)
PR Close #56080
2024-05-27 11:37:46 +02:00
Matthieu Riegler e19849e707 docs: add update material to v18 step (#56044)
PR Close #56044
2024-05-27 11:30:46 +02:00
Matthieu Riegler 3e02e8fe95 docs: add search favicon for seo (#56016)
PR Close #56016
2024-05-27 11:29:17 +02:00
Aristeidis Bampakos 57bd5b5480 docs: use customized YouTube channel link (#56051)
PR Close #56051
2024-05-27 11:28:26 +02:00
Ben Halbach 7fdd0d773e docs: remove extra template string termination (#56081)
PR Close #56081
2024-05-27 11:06:24 +02:00
Andrew Scott 47b7ba0d5e refactor(core): Remove hybrid mode flag and move scheduler provider location (#55722)
The flag is not used anymore and, as a result, is easier to move the
scheduler provider.

PR Close #55722
2024-05-23 18:15:53 +02:00
Angular Robot 6ddd1e41be build: update io_bazel_rules_sass digest to 2907a45 (#55841)
See associated pull request for more information.

PR Close #55841
2024-05-23 18:12:25 +02:00
Thomas Nguyen 89e48aac4e refactor(core): Create event types that are able to be serialized, captured, or are mouse events. (#55799)
Use these constants across jsaction and Angular.

PR Close #55799
2024-05-23 16:10:47 +02:00
Thomas Nguyen 01a19f33b5 refactor(core): Make sure not to do anymore jsaction work once everything is replayed. (#55799)
Without this, I think subsequent renders will populate data structures.

PR Close #55799
2024-05-23 16:10:47 +02:00
cexbrayat 4c7efc005a fix(compiler-cli): interpolatedSignalNotInvoked diagnostic for class, style, attribute and animation bindings (#55969)
This extends the diagnostic to catch issues like:

```html
<div [class.green]="mySignal"></div>
<div [style.width]="mySignal"></div>
<div [attr.role]="mySignal"></div>
<div [@triggerName]="mySignal"></div>
```

PR Close #55969
2024-05-23 15:05:02 +02:00
Pawel Kozlowski ef81cf8400 refactor: use built-in control flow in js-web-frameworks benchmark (#55988)
Migrate the js-web-frameworks benchmark to use the built-in control flow
instead of the ngFor loop.

PR Close #55988
2024-05-23 14:09:38 +02:00
Kristiyan Kostadinov 419ffa2026 fix(compiler): optimize track function that only passes $index (#55872)
Currently we optimize methods that pass both `$index` and the item into a method. We can take this a step further by also optimizing calls that only pass `$index` into the first parameter.

PR Close #55872
2024-05-23 14:02:31 +02:00
Joey Perrott 17d4b61905 build: bump in-memory-web-api to v18 (#56018)
This commit updates the in-memory-web-api package versions from v17 -> v18.

PR Close #56018
2024-05-23 12:00:29 +02:00
Matthieu Riegler d73a0175cb fix(core): link errors to ADEV (#55554)
Console error links will now point to adev.

PR Close #55554
2024-05-23 11:58:54 +02:00
Aristeidis Bampakos d57257514d docs: update blog link in new Angular Docs (#56022)
PR Close #56022
2024-05-23 11:41:08 +02:00
Jens Kuehlers cc12be47ed docs: change robots.txt to allow crawling (#56023)
PR Close #56023
2024-05-23 11:34:25 +02:00
Jens Kuehlers 45d6865c22 docs: update robots.txt to allow crawlers (#56023)
PR Close #56023
2024-05-23 11:34:25 +02:00
mgechev c122f07149 docs: update the roadmap to reflect latest work (#55979)
PR Close #55979
2024-05-23 11:24:33 +02:00
arturovt a27600c463 fix(zone.js): do not mutate event listener options (may be readonly) (#55796)
Prior to this commit, event listener options were mutated directly, for example,
`options.signal = undefined` or `options.once = false`.

This issue arises in apps using third-party libraries where the responsibility lies
with the library provider. Some libraries, like WalletConnect, pass an abort controller
as `addEventListener` options. Because the abort controller has the `signal` property,
this is a valid case. Thus, mutating options would throw an error since `signal`
is a readonly property.

Even though zone.js is being deprecated as Angular moves towards zoneless change detection,
this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change
detection because they rely on third-party libraries and are not responsible for the code
used in them.

Closes #54142

PR Close #55796
2024-05-22 16:20:34 -07:00
Matthieu Riegler b960aad863 refactor(core): remove unused preventDefault on listener (#55879)
`wrapListener` was only invoked with `wrapWithPreventDefault` set to `false`.

PR Close #55879
2024-05-22 16:08:40 -07:00
Emma Twersky ed5065e958 docs: add the v18 blog post link to the changelog (#56015)
PR Close #56015
2024-05-22 16:06:51 -07:00
Tom Wilkinson 9f63df9d1b refactor(core): Add a new EventDispatcher class. (#55837)
`EventDispatcher` emulates the browser's event dispatch (mostly).
It supports:
 - Bubbling and `stopPropagation`/`stopImmediatePropagation`.
 - `currentTarget` during dispatch.
 - Throwing errors for `preventDefault` if the event is being dispatched
   in replay.
 - Throwing errors for `composedPath()` if event is being dispatched in
   replay.

PR Close #55837
2024-05-22 15:24:01 -07:00
cexbrayat 985a215b10 fix(core): typo in zoneless warning (#55974)
The warning introduced in ae0baa25 mispelled `applications`.

PR Close #55974
2024-05-22 15:22:19 -07:00
Joey Perrott 774b4239ac ci: don't add redirect from next.angular.dev to vX sites (#56012)
Don't redirect from vX.angular.dev version to the next.angular.dev instance

PR Close #56012
2024-05-22 15:11:22 -07:00
Emma Twersky e67cb09404 docs: update robots.txt (#56010)
PR Close #56010
2024-05-22 15:09:38 -07:00
twerske 5d64589e4c docs: add angular.dev release banners (#56014)
PR Close #56014
2024-05-22 15:09:10 -07:00
Dylan Hunn d6391eed23 release: cut the v18.0.0 release 18.0.0 2024-05-22 10:54:42 -07:00
Paweł Kubiak e3aa2b59ba fix(docs-infra): calculate list of Angular Docs versions based on VERSION (#56002)
fix(docs-infra): calculate the list of Angular Docs versions based on VERSION, append --config=release to docs build and serve the script. Support displaying the right color of navigation for the deprecated state.
fix(docs-infra): add scrollbar to version picker
fix(docs-infra): set initial adev docs version to 18
fix(docs-infra): remove --config=release from scripts for local development, write unit tests
fix(docs-infra): update CI tests step
fix(docs-infra): remove rc from the list
fix(docs-infra): update unit test to check count of versions

PR Close #56002
2024-05-22 17:27:05 +00:00
Andrew Scott a6eedbc2e8 docs: Add experimental and zoneless to nav (#55834)
PR Close #55834
2024-05-22 10:18:54 -07:00
Kristiyan Kostadinov b7f2fd4739 fix(language-service): use type-only import in plugin factory (#55996)
Fixes that the plugin factory was causing TypeScript to be bundled into the language service.

PR Close #55996
2024-05-22 09:52:33 -07:00
Matthieu Riegler f8a2ad6e99 docs: Add v18 to update guide (#55993)
PR Close #55993
2024-05-22 16:03:02 +00:00
Joey Perrott 3ac0511aad fix(docs-infra): use separate templates for the from and to selectors in update guide (#55992)
Use separate template names for the from and to selector dropdowns, otherwise we are only able to change the from value.

PR Close #55992
2024-05-22 15:59:33 +00:00
Dylan Hunn ef96158899 release: cut the v18.0.0-rc.3 release 18.0.0-rc.3 2024-05-21 14:37:26 -07:00
arturovt e598634c10 fix(service-worker): remove controllerchange listener when app is destroyed (#55365)
This commit updates the `ngswAppInitializer` implementation and removes the `controllerchange`
listener upon the destruction of the `ApplicationRef`. This adjustment aims to prevent memory
leaks. In a zone.js environment, neglecting to do so could lead to the perpetual creation of
a zone task, which captures the zone and obstructs proper garbage collection.

PR Close #55365
2024-05-21 14:04:22 -07:00