30635 Commits

Author SHA1 Message Date
Andrew Kushnir ecb44d3d65 release: cut the v18.1.5 release 18.1.5 2024-08-14 09:29:57 -07:00
Andrew Kushnir bf3235cdce Revert "docs(docs-infra): fix markdown link rendering (#57377)" (#57380)
This reverts commit 95af661400.

Reason for revert: failign CI on 18.1.x branch.

PR Close #57380
2024-08-13 18:23:08 -07:00
Matthieu Riegler 95af661400 docs(docs-infra): fix markdown link rendering (#57377)
fixes #57376

PR Close #57377
2024-08-13 15:53:56 -07:00
Thomas Nguyen f99bb20a10 refactor(core): Add experimental support to have one event contract when there are multiple apps on the page. (#57355)
This may be removed if this turns out not to work out so well...

PR Close #57355
2024-08-13 12:10:35 -07:00
Thomas Nguyen 97e5dcb421 refactor(core): Call stopPropagation and preventDefault unconditionally within the patched methods. (#57354)
This fixes a few tests in g3 and is a bug fix for the event dispatcher. Otherwise, bubbling might
continue.

PR Close #57354
2024-08-13 12:09:56 -07:00
Thomas Nguyen db65bc25ca fix(core): Account for addEventListener to be passed a Window or Document. (#57354)
This happened to work for other event listeners since both had a
addEventListener method.

PR Close #57354
2024-08-13 12:09:56 -07:00
Andrew Scott 37cf37e3c3 refactor(docs-infra): Update search results to display content when it is matched (#57298)
This commit updates the search results to query for the content as well
as a snippet of the content for display when it's the content that
matches the query rather than any of the headers.

PR Close #57298
2024-08-13 12:07:49 -07:00
Andrew Kushnir 822db64b93 fix(core): skip hydration for i18n nodes that were not projected (#57356)
This commit fixes an issue that happens when an i18n block is defined as a projectable content, but a parent component doesn't project it. With an extra check added in this commit, the code will be taking a regular "creation" pass instead of attempting hydration.

Resolves #57301.

PR Close #57356
2024-08-13 09:42:42 -07:00
Angular Robot 9814e9bd80 build: update scorecard action dependencies (#57358)
See associated pull request for more information.

PR Close #57358
2024-08-13 09:30:16 -07:00
Angular Robot 93991b4ce2 build: update dependency @babel/core to v7.25.2 (#57191)
See associated pull request for more information.

PR Close #57191
2024-08-13 09:29:35 -07:00
Andrew Kushnir 810f76f574 fix(core): take skip hydration flag into account while hydrating i18n blocks (#57299)
This commit updates serialization and hydration i18n logic to take into account situations when i18n blocks are located within "skip hydration" blocks.

Resolves #57105.

PR Close #57299
2024-08-09 08:07:48 -07:00
Andrew Kushnir 0e024ecc27 fix(core): complete post-hydration cleanup in components that use ViewContainerRef (#57300)
Previously, if a component injects a `ViewContainerRef`, the post-hydration cleanup process doesn't visit inner views to cleanup dehydrated views in nested LContainers. This commit updates the logic to recognize this situation and enter host LView to complete cleanup.

Resolves #56989.

PR Close #57300
2024-08-09 08:07:12 -07:00
Angular Robot cf245ea0af build: update dependency marked to v14 (#57320)
See associated pull request for more information.

Closes #57283 as a pr takeover

PR Close #57320
2024-08-09 08:04:37 -07:00
Thomas Nguyen e39b22a932 fix(core): Account for addEventListener to be passed a Window or Document. (#57282)
This happened to work for other event listeners since both had a
addEventListener method.

PR Close #57282
2024-08-08 08:32:11 -07:00
Kristiyan Kostadinov 5401332b0e fix(compiler-cli): generate valid TS 5.6 type checking code (#57303)
Currently in some scenarios the compiler generates code like `null as any ? foo : bar` which will be invalid with [an upcoming TypeScript change](https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-beta/#disallowed-nullish-and-truthy-checks). These changes switch to generating `0 as any` which is exempt from the change.

**Note:** I'm not starting the work to fully get us on TS 5.6 until the 18.2 release comes out, but this change is necessary to unblock an internal team.

PR Close #57303
2024-08-08 08:30:12 -07:00
Jessica Janiuk bdf8450b7a release: cut the v18.1.4 release 18.1.4 2024-08-07 11:52:09 -07:00
Matthieu Riegler 69540d32ef fix(zone.js): Add support for addition jest functions. (#57280)
This commit add support for `test.failing` and `it.failing`.

Fixes #57277

PR Close #57280
2024-08-07 18:13:52 +00:00
Kristiyan Kostadinov 6a99f83659 fix(compiler): reduce chance of conflicts between generated factory and local variables (#57181)
Currently we use some short variable names like `t` and `r` in the generated factory functions. They can conflict with local symbols with the same names, if they're used for DI.

These changes rename the parameters to reduce the change for conflicts.

Fixes #57168.

PR Close #57181
2024-08-07 17:25:06 +00:00
JoostK bae54a1621 perf(compiler-cli): improve performance of interpolatedSignalNotInvoked extended diagnostic (#57291)
This commit addresses a performance bottleneck in the `interpolatedSignalNotInvoked` extended
diagnostic by querying directive metadata instead of consulting the type-checker to determine if
a property binding corresponds with an input.

Fixes #57287

PR Close #57291
2024-08-07 16:47:24 +00:00
Kristiyan Kostadinov e366473109 refactor(core): replace usages of removeChild (#57203)
These changes replace most usages of `removeChild` with `remove`. The latter has the advantage of not having to look up the `parentNode` and ensure that the child being removed actually belongs to the specific parent.

The refactor should be fairly safe since all the browsers we cover support `remove`. [Something similar was done in Components](https://github.com/angular/components/pull/23592) some time ago and there haven't been any bug reports as a result.

PR Close #57203
2024-08-07 16:46:09 +00:00
David LJ 0c12d8e733 docs(router): update initial navigation SSR note (#57245)
With rephrasing by @AndrewKushnir

PR Close #57245
2024-08-07 16:45:30 +00:00
Angular Robot 8c029c6402 build: update actions/upload-artifact action to v4.3.5 (#57271)
See associated pull request for more information.

PR Close #57271
2024-08-06 13:50:53 +00:00
Angular Robot 4cbb2793c2 build: update actions/upload-artifact action to v4.3.5 (#57270)
See associated pull request for more information.

PR Close #57270
2024-08-06 13:50:12 +00:00
Andrew Scott 596c25157c refactor(docs-infra): Use new APIs in search dialog (#57269)
This reverts commit 9109f31cb7.

PR Close #57269
2024-08-06 13:49:41 +00:00
Andrew Scott 6b2a4c083b Revert "refactor(docs-infra): Use new APIs in search dialog (#57215)" (#57268)
This reverts commit f5960d0f94.

PR Close #57268
2024-08-05 21:12:00 +00:00
Joey Perrott 6eac1b3f22 refactor(docs-infra): migrate api-gen from dev-infra into the repo (#57241)
Move the api-gen pipeline into the shared-docs directory.

PR Close #57241
2024-08-05 17:06:30 +00:00
Paul Gschwendtner afb05ff1cb fix(compiler-cli): support JIT transforms before other transforms modifying classes (#57262)
Similar to a previous fix that intended to make the JIT transforms
compatible with pre-transforms like e.g. Tsickle, we need to solve
an additional issue where the class properties are synthetic and result
in an `getSourceFile() => undefined` invocation that breaks the import
insertion, causing errors like:

```
TypeError: Cannot read properties of undefined (reading 'fileName')
```

PR Close #57262
2024-08-05 14:45:19 +00:00
Angular Robot 183715aedd build: lock file maintenance (#57256)
See associated pull request for more information.

PR Close #57256
2024-08-05 14:42:25 +00:00
Doug Parker 523f639b76 release: bump Angular DevTools to 1.0.17 (#57221)
PR Close #57221
2024-08-02 16:53:14 +00:00
Doug Parker 168eed23b4 docs(devtools): remove duplicate text at end of release.md doc (#57222)
Somehow the last few lines got duplicated at the end of this doc. Definitely not needed.

PR Close #57222
2024-08-02 16:52:41 +00:00
Charles Lyding 6ac209c24f fix(language-service): avoid generating TS suggestion diagnostics for templates (#56241)
Angular's template files are not valid TypeScript. Attempting to get suggestion
diagnostics from the underlying TypeScript language service will result in
a large amount of false positives. Only actual TypeScript files should
be analyzed by the underlying TypeScript language service for suggestions.

PR Close #56241
2024-08-02 15:51:35 +00:00
Thomas Nguyen 0c729765a1 refactor(core): Remove clickmod support from Angular. (#57201)
This was an old feature that mapped shift + click (et al) to "clickmod". This doesn't really make sense to add to Angular, so let's remove it.

PR Close #57201
2024-08-02 14:20:54 +00:00
Jessica Janiuk ad29621d30 Revert "fix(compiler): reduce chance of conflicts between generated factory and local variables (#57181)" (#57230)
This reverts commit 67e09404db.

PR Close #57230
2024-08-01 19:33:05 +00:00
Joey Perrott e8794dd1f0 fix(docs-infra): replace the uses of replaceAll with replace using regex with g flag (#57232)
Use the g flag in replace to perform a replaceAll

PR Close #57232
2024-08-01 19:17:25 +00:00
Andrew Scott de7f5ac9f1 refactor(docs-infra): Use new APIs in search dialog (#57215)
This updates the search dialog component to use signal APIs

PR Close #57215
2024-07-31 18:56:31 +00:00
Dylan Hunn be6c246115 release: cut the v18.1.3 release 18.1.3 2024-07-31 10:17:09 -07:00
Andres Olivares 69b5a317ec refactor(devtools): Use Chrome DevTools Performance extension API (#55805)
This change is a proof of concept of how the new Chrome DevTools
Performance extension API (https://bit.ly/rpp-e11y) can be used to
surface Angular runtime data directly in the Chrome DevTools Performance
panel.

Specifically, it implements the following changes:

1. Use the profiling status notification API to toggle the Timing API:
The notification API is implemented under the
chrome.devtools.performance extension namespace and consits of two
events: ProfilingStarted and ProfilingStopped, dispatched when the
Performance panel has started and stopped recording, respectively. This
API is used to enable the Timings API when the recording has started in
the Performance panel and disable it when recording has stopped.

2. Use the User Timings `detail` field format specification of the
Performance extension API
(https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing)
to inject data collected by the Angular Profiler into the
Performance panel timeline. Angular Profiler uses several hooks to
measure framework tasks like change detection. With this change, this
measurements are visible in the same context as the runtime data
collected by the browser in the Performance Panel timeline.

Note: to enable the user timings to be collected in the first place, one
needs to open the Angular DevTools panel so that the related artifacts
are loaded in the page. This shortcoming can be fixed in a follow up so
that the extra step isn't necessary.

PR Close #55805
2024-07-31 16:04:53 +00:00
Paul Gschwendtner 7459d09a23 ci: update license checking to latest version (#57211)
This may help with detecting the license of google-protobuf- which
is a transitive dependency of `@bazel/worker`

PR Close #57211
2024-07-31 16:04:13 +00:00
Paul Gschwendtner 2ece9509a0 test: update symbol golden after lock file maintenance (#57211)
Lock file maintenance updated Terser, which impacts the bundle
optimizations being tested via the symbol golden tests.

There was a small noticable change in the symbol golden where
`withDomHydration` is now preserved, and the underlying function
that was previously detected is gone. Seemingly Terser now inlines
this function and had to preserve `withDomHydration` as the entry point.

PR Close #57211
2024-07-31 16:04:13 +00:00
Paul Gschwendtner 722a4669b9 build: lock file maintenance (#57211)
See associated pull request for more information.

PR Close #57211
2024-07-31 16:04:13 +00:00
Paul Gschwendtner b3cc9e9c3b build: replace deprecated inquirer with new npm package (#57211)
The new package comes with types by default, and also has a nicer
API.

The old package had broken types and couldn't be used anymore; and
it's deprecated/unmaintained. We did a similar switch in
angular/dev-infra.

PR Close #57211
2024-07-31 16:04:13 +00:00
Matthieu Riegler 103a4dccdc docs(docs-infra): extract captured group from heading custom id regexp (#57206)
Backport of angular/dev-infra#2202

PR Close #57206
2024-07-31 16:03:28 +00:00
Angular Robot eadfa39767 build: update scorecard action dependencies (#57150)
See associated pull request for more information.

PR Close #57150
2024-07-31 14:00:40 +00:00
Jeremy Elbourn ec4bac0a3a docs: add docs authoring guide (#56505)
This new contributor guide includes information for authoring Angular
documentation.

PR Close #56505
2024-07-31 13:58:53 +00:00
Badshah d16071a5a0 docs: fix appRoutes constant was not passed correctly to provideRouter (#57070)
PR Close #57070
2024-07-31 13:58:21 +00:00
Kristiyan Kostadinov 1f9e090910 fix(compiler-cli): emitting references to ngtypecheck files (#57138) (#57202)
Follow-up to #56961 which doesn't appear to have caught all the cases. This change moves the pre-emit untagging to `NgCompiler.prepareEmit` which seems to cover a bit more comared to `NgtscProgram.emit`.

Fixes #57135.

PR Close #57138

PR Close #57202
2024-07-31 13:57:37 +00:00
Andrew Scott 62ade76cf8 refactor(core): Update callback schedulers to cancel pending timers (#57186)
Rather than leaving the timers around as no-ops, this commit updates the
logic to also attempt to clear or cancel the timers. This is helpful for
the eventual goal of running the scheduler in the `fakeAsync` zone (if
the test is running in `fakeAsync`) rather than scheduling in the root
zone and making it impossible to flush.

PR Close #57186
2024-07-30 18:05:09 +00:00
Andrew Scott 0def76f3b3 refactor(core): Private option to rethrow ApplicationRef.tick errors in tests (#57153)
This creates a private option that can be used internally while we
migrate this to the default and only behavior. ~200 tests in TGP have errors
that are being swallowed (console.log) and not causing the test to fail.
We can first explicitly opt those out, flip the default internally, then
"fix" them by adding expect...toThrow.

PR Close #57153
2024-07-30 18:04:27 +00:00
Bouguima, Walid 0fbcd6ed28 docs: broken HammerLoader reference fix (#55836)
*Fixing broken documentation reference to HammerLoader in HammerLoaderInjectionToken page

PR Close #55836
2024-07-30 16:56:34 +00:00
David LJ 0016849ca1 docs: update app shell model link (#57162)
PR Close #57162
2024-07-30 16:55:43 +00:00