27784 Commits

Author SHA1 Message Date
Thabo 2bfd28c396 docs: correct wording for Directive's decorator host property key description (#51977)
PR Close #51977
2023-10-10 11:22:19 -07:00
Phalgun Vaddepalli d3c9e436a9 docs(core): add an example of configuring APP_INITIALIZER token in context of standalone components (#52084)
docs(core): fix formatting

PR Close #52084
2023-10-10 11:18:37 -07:00
Angular Robot aeb7d0395e build: update io_bazel_rules_sass digest to 6725d86 (#51844)
See associated pull request for more information.

PR Close #51844
2023-10-09 13:26:42 -07:00
Angular Robot e63e3db80a build: update all non-major dependencies (#52024)
See associated pull request for more information.

PR Close #52024
2023-10-09 12:02:26 -07:00
Angular Robot 5f433f6b5b build: update github/codeql-action action to v2.21.9 (#51992)
See associated pull request for more information.

PR Close #51992
2023-10-05 14:07:22 -07:00
Joey Perrott 2a10050bea ci: migrate snapshot publishing from CircleCI to GHA (#51957)
Migrate the snapshot publishing from CircleCI to GHA

PR Close #51957
2023-10-05 10:53:23 -07:00
Joey Perrott 5122729c95 ci: migrate saucelabs bazel job to Github Actions (#51945)
Use Github Actions to run saucelabs bazel jobs

PR Close #51945
2023-10-05 09:18:35 -07:00
Alex Rickabaugh 481198af92 release: cut the v16.2.8 release 16.2.8 2023-10-04 13:55:28 -07:00
Angular Robot 1e4c91ca8e docs: update events (#51966)
Generated `events.json` with the latest events retrieved from the Firebase DB.

Closes #51955

PR Close #51966
2023-10-04 11:30:07 -07:00
Andrew Scott b732961fc3 fix(language-service): Retain correct language service when ts.Project reloads (#51912)
When the `ts.Project` creates the language service plugin (in this case,
the Angular Language Service), it sets the project's language service to
the new language service returned by the plugin create:
https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044

The project may be reloaded in response to various events, such as a
change to the tsconfig file, which then recreates the plugin. When this
happens, the language service that gets passed to the plugin `create`
function will not be the typescript language service, but rather the
previous instance of the new language service returned by the last call
to `create`.

This commit ensures that subsequent calls to `create` for the
`NgLanguageService` plugin for a project after the first call are able
to retrieve and hold on to the _TypeScript_ language service.

fixes https://github.com/angular/vscode-ng-language-service/issues/1923

PR Close #51912
2023-10-04 11:27:46 -07:00
Matthieu Riegler 966ce9790a fix(service-worker): throw a critical error when handleFetch fails (#51960)
#51885 patched a call site that threw an error but there were 2 others call that needed to be wrapped in the same way by a try/catch.

`initializeFully` is part of the calls in `responseWith(handleFetch)`.

Same #51885, throwing `SwCriticalError`allows the driver to fallback to `safeFetch` and ensure `responseWith` doesn't fail.

Fixes #50378

PR Close #51960
2023-10-04 08:51:07 -07:00
Andrew Scott 334fe60c17 refactor(core): Update view flags so only one number needs adjustment (#51839)
When adding a new view flag, you currently need to adjust the last number of the last
3 flags. All of these share the same number so the shifting ones can just use
the base-10 IndexWithinInitPhaseShift.

PR Close #51839
2023-10-04 07:29:16 -07:00
Angular Robot 5e6955a06f build: update dependency css-selector-parser to v3 (#51984)
See associated pull request for more information.

PR Close #51984
2023-10-04 07:27:15 -07:00
Joey Perrott 96141c6ad6 ci: add slack messages for failed aio deployments (#51956)
Send message to to slack when aio fails to deploy

PR Close #51956
2023-10-02 08:37:46 -07:00
Joey Perrott 781bb91f43 build: lock file maintenance (#51838)
Update the lock file.

PR Close #51838
2023-10-02 08:15:28 -07:00
Joey Perrott 82e8e5e043 ci: move permissions for google-internal-tests into job definition (#51847)
Move permissions into the job definition for security improvement.

PR Close #51847
2023-09-29 10:51:21 -07:00
Dylan Hunn a16e3b8fe1 release: cut the v16.2.7 release 16.2.7 2023-09-27 13:28:35 -07:00
Pawel Kozlowski 39a3e34e03 fix(core): allow toSignal calls in reactive context (#51831) (#51892)
This PR moves the Observable subscription of toSignal outside of the
reactive context. As the result the toSignal calls are allowed in the
computed, effect and all other reactive consumers.

This is based on the reasoning that we already allow signals creation
in a reactive context. Plus a similar change was done to the async pipe
in the https://github.com/angular/angular/pull/50522

Fixes #51027

PR Close #51892
2023-09-27 10:30:15 -07:00
Angular Robot aedd8de7dd build: update scorecard action dependencies (#51899)
See associated pull request for more information.

PR Close #51899
2023-09-27 09:24:20 -07:00
Andrew Kushnir 68648ee684 refactor(core): avoid an empty array allocation during hydration (#51917)
This commit updates hydration runtime code to avoid creating an empty array when we can avoid it. Instead, we just check whether the field is `null` directly (without using nullish coalescing).

PR Close #51917
2023-09-27 09:22:50 -07:00
Jeevan Mahesha b8f447e611 docs: updated the server configuration for apache2 (#51921)
PR Close #51921
2023-09-27 09:22:14 -07:00
Jithil P Ponnan 70d8c2f75a docs: minor update to modify the Bazel extension url (#51925)
PR Close #51925
2023-09-27 09:21:35 -07:00
Matthieu Riegler c3d901eacf fix(service-worker): throw a critical error when handleFetch fails (#51885)
On Safari, the cache might fail on methods like `match` with an `Internal error`. Critical errors allows to fallback to `safeFetch()` in the `Driver`.

fixes: #50378

PR Close #51885
2023-09-26 09:10:38 -07:00
Pawel Kozlowski cc99ba4744 build: improve results logging in perf script (#51902)
Add git references when printing perf comparison results.

PR Close #51902
2023-09-26 09:09:02 -07:00
Joey Perrott 3498efc0e1 ci: use pull request head sha instead of the sha provided in the github context (#51908)
Use the pull request head sha so that we don't test the code already committed.

PR Close #51908
2023-09-26 09:07:48 -07:00
Lars Gyrup Brink Nielsen 59074207a6 docs: merge versions with identical version ranges in pre-v9 compatibility version table (#51842)
PR Close #51842
2023-09-25 09:19:10 -07:00
Lars Gyrup Brink Nielsen 17cde6bd5b docs: correct pre-v9 TypeScript version ranges in version compatibiliy table (#51842)
For versions 5.x through 8.x, this is based on the `package.json` file of `@angular/compiler-cli`.

For versions 2.x through 4.x, this is based on Angular's changelog.

PR Close #51842
2023-09-25 09:19:10 -07:00
Lars Gyrup Brink Nielsen 996cb4bcd0 docs: normalize Angular version ranges in pre-v9 version compatibility table (#51842)
PR Close #51842
2023-09-25 09:19:10 -07:00
Paul Gschwendtner 663703946e fix(bazel): allow setting _enabledBlockTypes angular compiler option (#51862)
We control most flags via Starlark and therefore limit configuration
options via `tsconfig` to a minimum. We do not intend to support the
enabled block types option via Starlark, so this commit allows for
the option to be picked up.

(This is useful for benchmarking the new control flow blocks).

PR Close #51862
2023-09-22 09:51:26 -07:00
Pawel Kozlowski 6e6452d604 release: cut the v16.2.6 release 16.2.6 2023-09-20 19:51:02 +02:00
Andrew Scott 4ccd845081 refactor(router): Refactor loadChildren callback execution and privately export for SSR (#51818)
This commit refactors the loadChildren callback execution of the router config loader
into a function that can be used with SSR for the purposes of route extraction.

PR Close #51818
2023-09-20 18:34:13 +02:00
David LJ 6e4d8f65cf docs: remove ref to no longer existing test.ts (#51462)
The file was removed in Angular 15.0.0 https://github.com/angular/angular-cli/releases/tag/15.0.0
https://github.com/angular/angular-cli/commit/56a1e8f9f52658488afb9d36007e96c96d08a03b

Thanks to @atscott and @JeanMeche for the wording suggestion

PR Close #51462
2023-09-19 18:37:39 +02:00
Angular Robot 5810827de4 build: update scorecard action dependencies (#51817)
See associated pull request for more information.

PR Close #51817
2023-09-19 12:18:26 +02:00
Paul Gschwendtner 03127fc870 refactor(core): ensure reactive node constants are considered pure (#51809) (#51813)
Currently when ESBuild bundles an application importing from
`@angular/core`, the signals library will be discovered during
export analysis. ESBuild will come across the constants for the reactive
signal graph- and end up considering some of these as side-effects given
the pattern of using a spread assignment for extending from e.g.
`REACTIVE_NODE` (a similar issue may occur if we e.g. extend from the
computed reactive node).

See more details on the issue: https://github.com/evanw/esbuild/issues/3392

Even though, ESBuild preserves these constants now, and all of its
dependencies— Terser will consider these as side-effect free and
eliminate these constants. This may require multiple passes though, and
might not be sufficient, depending on the chain of reactive node
extensions. E.g. in the signals branch we noticed some constants
unnecessarily being preserved.

PR Close #51809

PR Close #51813
2023-09-18 15:37:13 +02:00
Kristiyan Kostadinov bf1f9a0897 test(compiler): attempt to deflake windows tests (#51804)
Another try at deflaking the tests on Windows. I'm trying a couple of fixes here:
1. I noticed that it's usually the indexer tests that fail during flaky runs. These tests also happen to be the only ones that don't pass in the `files` argument of `NgtscTestEnvironment.setup`. When `files` isn't passed in, we don't hit the file path that sets up the `MockFileSystem`. With these changes I make it so that we always initialize the mock file system.
2. The missing file system error usually comes from the `absoluteFrom` call that initializes the optional `workingDir` argument. My theory is that because it's a default value for an argument, it gets called too early before everything is initialized. These changes move the `absoluteFrom` call further down until it's needed.

PR Close #51804
2023-09-18 10:46:38 +02:00
Paul Gschwendtner 3b46066ff0 refactor: ensure top-level symbols are marked as side-effect free (#51776)
Terser does not treat `Symbol` as side-effect free- so if we end up with
a symbol export being loaded, it will result in the symbol being
retained.

We noticed this in the signals prototyping where symbols exported
from `computed` ended up appearing in symbol bundling tests.

PR Close #51776
2023-09-15 15:53:51 +02:00
Angular Robot b0b004e3ff build: update actions/cache digest to 704facf (#51787)
See associated pull request for more information.

PR Close #51787
2023-09-15 11:42:51 +02:00
Angular Robot ffd25fcfbe build: update io_bazel_rules_sass digest to 63d77ff (#51243)
See associated pull request for more information.

PR Close #51243
2023-09-15 09:04:10 +02:00
Joey Perrott a31dcb993f ci: use head_ref for concurrency group (#51784)
Use the head_ref value for the conncurency group on ci-priviledged rather than the ref, so that the
main ref is not used and cancelling across pull requests and the main branch

PR Close #51784
2023-09-15 09:02:04 +02:00
Rafael Leal 5b4a5eb0e9 docs: fix broken image links in tutorial (#51744)
This is to fix broken image links in the first-app tutorial documentation with functional links that match the working examples.

PR Close #51744
2023-09-14 16:02:42 +02:00
JoostK 7b40d74fb4 refactor(core): let reactive node prototypes conform to their type (#51722) (#51772)
This commit adds explicit type annotations to the reactive node prototype objects,
such that the prototypes are type-checked against the interface they are supposed
to (partially) implement. This also allows IDEs to better track usages of reactive
node properties, improving code navigation.

PR Close #51722

PR Close #51772
2023-09-14 12:51:30 +02:00
JoostK 82712f80df fix(core): ensure a consumer drops all its stale producers (#51722) (#51772)
When a producer is no longer used, the consumer has to update its internal data structure
that keeps track of all producers. There used to be an issue where only half of the stale
producers would actually be removed from this data structure, as the intended upper bound
of the number of producers to remove would decrease with each removed producer, therefore
not reaching all producers that should be removed from the data structure.

This commit fixes the issue by truncating the arrays directly, without going through
individual `pop` operations. An assertion that would catch the inconsistent state in
the internal data structures of the signal graph has been introduced.

PR Close #51722

PR Close #51772
2023-09-14 12:51:30 +02:00
Joey Perrott 65d69157cb ci: migrate legacy saucelabs job to Github Actions (#51695)
Migrate the legacy saucelabs job

PR Close #51695
2023-09-13 10:49:49 -07:00
Andrew Kushnir 684891a63e refactor(docs-infra): increase timeout for flaky tests (#51747)
This commit updates the `jasmine.DEFAULT_TIMEOUT_INTERVAL` value for some AIO tests from 10 -> 20 seconds to give more time to complete processing. This commit also refactors tests to use async/await pattern.

PR Close #51747
2023-09-13 10:47:54 -07:00
Andrew Kushnir cc57b24881 release: cut the v16.2.5 release 16.2.5 2023-09-13 10:33:40 -07:00
Chinmay Chandak f6f3783a3d docs: Fix misspelling in note of git commit --all (#51735)
In note of `git commit --all` command optional `-a` changed to `--all`
PR Close #51735
2023-09-12 12:25:43 -07:00
Shuaib hasan akib febbca5124 docs(docs-infra): replace twitter logo by new one (#51716)
PR Close #51716
2023-09-12 12:24:45 -07:00
Andrew Scott 38c6fa1cee fix(docs-infra): Ensure experimental tag shows up on docs (#51712)
The experimental tag is part of the stability tags along with "deprecated". This commit updates some code to pick up experimental as well.

PR Close #51712
2023-09-11 09:20:54 -07:00
Gerald Monaco c700418ab8 refactor(core): delegate afterRender errors to an ErrorHandler (#51711)
Improves the error handling story for after*Render by delegating errors to an ErrorHandler, so that one failure does not break every callback.

PR Close #51711
2023-09-08 14:21:06 -07:00
Gerald Monaco 867b380f64 refactor(core): make AfterRenderEventManager tree-shakable (#51711)
In preparation for adding support for phases to after*Render, which will increase the implementation size, this commit splits out the optional logic so that it can be tree-shaken and dynamically loaded.

PR Close #51711
2023-09-08 14:21:06 -07:00