Commit graph

29561 commits

Author SHA1 Message Date
Angular Robot
d0cbbb1681 build: update io_bazel_rules_sass digest to f89fc59 (#50802)
See associated pull request for more information.

PR Close #50802
2023-06-22 09:43:22 -07:00
Aristeidis Bampakos
a118e571b4 docs: fix typos in signals guide (#50789)
PR Close #50789
2023-06-22 09:42:46 -07:00
Aristeidis Bampakos
a500623246 docs: make review adjustments in the SSR guide (#50785)
PR Close #50785
2023-06-22 09:42:07 -07:00
alkavats1
1391a7e7e0 docs: updating the contribution guidline docs with the secure tag (#50618)
PR Close #50618
2023-06-22 09:41:26 -07:00
alkavats1
66824b7715 refactor: removed the unused declaration in the import statement (#50616)
ngmodule and httpclient modeule is removed from the provider.ts file from the import statement

PR Close #50616
2023-06-22 09:39:58 -07:00
aanchal
ba0ca42b8c docs: fix typos 2023-06-22 12:56:49 +02:00
Alan Agius
764c7fbd4e refactor(core): fix typo Destory -> Destroy (#50676)
Just a typo fix `Destory` -> `Destroy`

PR Close #50676
2023-06-21 11:53:35 -07:00
Payam Valadkhan
7d7fc48e58 refactor(core): tweak runtime deps tracker to accommodate JIT requirements. (#50606)
The previous API design for the runtime deps tracker was done with only local compilation in mind. Now if we want to use it for JIT as well then some new requirements come along which are addressed by this commit as follows:
  - JIT scopes need distinct sets for directive and pipes. Thus the ScopeData interface is modified to include these info.
  - JIT needs access to scopes for various operations. So methods `getNgModuleScope` and `getStandaloneComponentScope` are added to the tracker's public api.
  - Test bed needs to clear the scope cache for its override mechanism. So method `clearScopeCacheFor` is added to the tracker's public api for this reason.

PR Close #50606
2023-06-21 11:48:56 -07:00
Payam Valadkhan
bff1010a6f refactor(core): add runtime deps tracker public interface with an empty implementation (#50606)
The types and interfaces re;ated to the runtime deps tracker are added. Also an empty implementation is added to be completed in follow up PRs (after the interfaces are confirmed in this PR).

The added files are not used anywhere, so the change should not affect anything in anyway.

PR Close #50606
2023-06-21 11:48:56 -07:00
Aristeidis Bampakos
4596577461 docs: review hydration guide (#50788)
PR Close #50788
2023-06-21 11:48:09 -07:00
Pawel Kozlowski
60478d8420 test(core): remove microbenchmarks (#50786)
The existing microbenchmarks are not widely known
and are not used to drive design / coding decissions.
At the same time those test add to the maintanance cost:
- use hand-written instructions;
- plug into runtime internals and are fragile;
- require development of mocks for the runtime internals.

Those tests are removed since they are costly to maintain
and, at the same, don't provide enough value.

PR Close #50786
2023-06-21 11:47:25 -07:00
Angular Robot
e7b218c004 build: update io_bazel_rules_sass digest to e141d5a (#50784)
See associated pull request for more information.

PR Close #50784
2023-06-21 11:46:30 -07:00
aanchal
4568e933b1 docs: updating the docs with the http secure tag (#50696)
PR Close #50696
2023-06-21 11:45:51 -07:00
Angular Robot
bb617f580c build: update babel dependencies (#50509)
See associated pull request for more information.

PR Close #50509
2023-06-21 11:44:59 -07:00
Matthieu Riegler
5986ff54ec refactor(platform-browser): remove #9100 todos. (#49406)
This commit assigns the correct type instead of `any`.

PR Close #49406
2023-06-21 11:43:45 -07:00
Andrew Kushnir
5c3407507a release: cut the v16.2.0-next.0 release 2023-06-21 11:35:59 -07:00
Andrew Kushnir
a99b6ff141 docs: release notes for the v16.1.2 release 2023-06-21 11:29:15 -07:00
Heo Sangmin
a126cbcf22 fix(http): use serializeBody to support JSON payload in FetchBackend (#50776)
`HttpRequest.serializeBody` was used in HttpXhrBackend. `fetch` also needs to serialize request body.

Close #50775

PR Close #50776
2023-06-20 13:31:25 -07:00
Charles Lyding
64745a89b2 refactor(compiler-cli): remove unused HandlerFlags enum (#50604)
The `HandlerFlags` enum is a leftover remnant of ngcc and is no longer used.

PR Close #50604
2023-06-20 13:01:48 -07:00
Charles Lyding
47cc56858f refactor(compiler-cli): add internal compiler option to control class metadata emit (#50604)
An internal compiler option named `supportTestBed` is now available for use by the
Angular CLI. This option currently controls the extraction and emit of Angular class
metadata. This emitted information is only needed in AOT mode when using certain
TestBed APIs. However, AOT mode is currently not available for unit testing within
the Angular CLI. As a result, the metadata is not used within CLI generation applications
and in particular production applications. Without this option, the CLI needs to
manually perform a code transform to remove the metadata and also replicate TypeScript's
import eliding. This is can be a complicated operation and must be continually kept
up to date with any changes to both the Angular compiler and TypeScript. The introduction
of this new option alleviates these concerns.

PR Close #50604
2023-06-20 13:01:48 -07:00
Paul Gschwendtner
1221b37150 ci: update codeowners for benchpress (#50769)
Pawel and myself have investigated benchpress for quite some
time now, and I believe we have the most up-to-date understanding
in the team- so it would make sense to add us to the owners.

PR Close #50769
2023-06-20 13:00:36 -07:00
Paul Gschwendtner
4af49106aa build: speed up remote execution by allowing more concurrent jobs (#50734)
Bazel detects maximum number of jobs based on host resources.
Since we run remotely, we can increase this number significantly.

PR Close #50734
2023-06-20 18:05:24 +02:00
Paul Gschwendtner
f77bd0a2bd refactor: fix lint warning in compiler code by adding explicit override (#50772)
We have a lint rule configured that enforces that any abstract member
implementation uses an explicit `override` identifier. This ensures that
downstream classes will have errors if the parent abstract class
suddenly removes the abstract member.

The lint rule, living in the dev-infra repository, occasionally does
miss some places due to a temporary TS version mismatch that causes
syntax kind indices to be different. Looks like we are now matching
again and there is a new lint failure that got introduced recently. This
commit fixes that error.

PR Close #50772
2023-06-20 17:20:50 +02:00
Paul Gschwendtner
78791cea4d build: update browserslist db for integration tests (#50772)
Since we updated the devkit dependencies, we need to update
the browserslist DB versions in integration tests to avoid
browser mismatches causing errors like the following:

```
BrowserslistError: [BABEL] /tmp/ng-integration-test-91jP3g/test-sandbox/node_modules/zone.js/fesm2015/zone.js: Unknown version 114 of edge (While processing: "base$0$0")
```

PR Close #50772
2023-06-20 17:20:50 +02:00
Paul Gschwendtner
8cffdf36f7 build: update angular dev-infra and chromium (#50772)
Updates Angular dev-infra and Chromium. Fixed up version of
https://github.com/angular/angular/pull/50111

PR Close #50772
2023-06-20 17:20:49 +02:00
Pawel Kozlowski
a88ae41504 build: remove AngularJS benchmarks (#50730)
This change removes benchmark scenarios written in AngularJS
as the framework reached EOL and those numbers are no longer
relevant.

PR Close #50730
2023-06-20 14:57:06 +02:00
Angular Robot
7f4a7b4ea2 build: update github/codeql-action action to v2.20.0 (#50774)
See associated pull request for more information.

PR Close #50774
2023-06-20 14:55:36 +02:00
Matthieu Riegler
135167fe8e fix(http): Send query params on fetch request (#50740)
QueryParams were missing when using the `FetchBackend`.

Fixes #50728

PR Close #50740
2023-06-20 12:59:26 +02:00
aanchal
d381b7479c docs: included title attribute in the iframe tag (#50698)
PR Close #50698
2023-06-20 11:03:22 +02:00
Mladen Jakovljević
19913ccbb7 feat(docs-infra): add option to filter docs with developer preview status (#50142)
Add a feature to the ApiListComponent with which users can filter documents based on the "developer preview" status.

PR Close #50142
2023-06-20 11:01:32 +02:00
arturovt
076d4499af refactor(common): do not run CD when verifying image distortion (#50723)
This commit wraps the `assertNonZeroRenderedHeight` and `assertNoImageDistortion`
with `runOutsideAngular` to setup the `load` event listener outside of the Angular zone.
This was previously causing extra change detection cycles in development mode and
interfered debugging stuff.

PR Close #50723
2023-06-20 10:59:36 +02:00
Angular Robot
43a80ca8f8 build: update eslint dependencies to v5.60.0 (#50690)
See associated pull request for more information.

PR Close #50690
2023-06-20 10:57:37 +02:00
Paul Gschwendtner
254023a03c build: resolve benchmark compare ref from upstream if rev-parse fails
`rev-parse` returns the original ref name in stdout, even if it wasn't
able to resolve the reference. This was preventing the upstream
resolution from never happening- causing `main` to be never resolved
to the actual SHA.
2023-06-19 15:38:06 +02:00
Paul Gschwendtner
619c318dcb build: fix benchmark sha resolution breaking when compare ref is abbreviated (#50767)
When we fetch e.g. `main`, the branch name will not be available
locally, and `rev-parse` will fail later. We can make the logic
more safe by just using `FETCH_HEAD` then.

PR Close #50767
2023-06-19 13:04:02 +00:00
Paul Gschwendtner
17a95dac22 build: resolve benchmark compare SHA from PR branch or upstream remote (#50764)
If we try to resolve the benchmark compare ref (which may be just
`main`), we are just looking inside the PR branch- but that may
not include the `main` SHA. i.e. it's possible to run a comparison
where the PR is slightly behind of the `main` branch, or a comparison
commit from a different branch is used.

We fix this/ and simplify the logic by resolving the SHAs directly in
the TypeScript code, instead of relying on the rather brittle Bash.

Note that current solution still works, but we sometimes may not be able
to resolve to an actual SHA- causing issues as in 864bd72cb2

PR Close #50764
2023-06-19 12:54:54 +00:00
Paul Gschwendtner
864bd72cb2 build: resolve benchmark compare ref to improve results text
Currently the compare ref might be `main`. We will use that value
and put it into the GitHub results comment. This is non-ideal because
in the future `main` might be a different SHA and the results comment
would become invalid/confusing.

We fix this by resolving the actual SHA when the benchmark was
initiated.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
1b3202ca3b build: more concise markdown output for benchmark compare results
We only show the full sample results if someone clicks the markdown
details spoiler button. Most of the time only the stats summary is
relevant.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
9a01ac3f49 build: add documentation for running benchmarks
Adds documentation for running benchmarks.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
28961e805f build: pin action dependency for improved security
Pins the pull request comment branch action dependency
for improved security and deterministic behavior.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
ac13b65074 ci: fix benchmark compare to work with fork pull requests (#50758)
The checkout action always assumes the main repository, but
the branch name/SHA of the pull request will be from a fork.

We fix this by using an updated action that exposes the branch
repo owner and name, so that we can check out the actual PR
branch/SHA.

PR Close #50758
2023-06-19 10:40:30 +00:00
Paul Gschwendtner
d5736d7d50 build: create github action to run benchmark comparisons (#50745)
This commit creates a GitHub action that runs benchmark comparisons
for a single target whenever a command comment is created by trusted
Angular organization members:

```
/benchmark-compare <compare-ref> <benchmark-target>
```

The benchmark will be run locally in Github actions, using the same
machine to minimize number deviation. The results are then printed
to the GitHub PR using a comment.

At current time, no actual "green/red" state is computed, but rather
the raw results are printed. In the future, since we have all the
metric data from the benchpress JSON logs, we could implement something
more easy to understand- but that's a follow-up/needs more discussion.

PR Close #50745
2023-06-18 19:32:34 +00:00
Paul Gschwendtner
bb52edee31 build: create script to run benchmarks and perform comparisons (#50745)
This commit creates a new script that solves the following use-cases:

 - Running benchmarks. It's not trivial to figure out the benchmark
   target names, and it's also easy to mess up the right Bazel flags.

 - Performing comparisons. When e.g. working on a runtime senstive
   change, it should be trivial to run benchmarks between the current
   working stage, and a base revision (e.g. `main`).

The script takes care of both these use-cases and comes with a
prompt-based command line tool experience.

The script will also be used by a future GitHub action that can run
comparisons triggered via GitHub PR comment (by trusted team members).

PR Close #50745
2023-06-18 19:32:34 +00:00
Paul Gschwendtner
a2e44d9773 refactor(benchpress): include text representation of results in json report (#50745)
This commit updates benchpress to include the text representation of
results in the JSON report. This is useful when results of multiple
tests are read from the Bazel testlogs and then printed together in
e.g. a GitHub comment, or at the end of a script (not in the middle
of the surroundings of the Bazel executions).

The text representation could have been built directly based on the
JSON raw metrics, but it would be unnecessary work and duplication
to get a similar output as with the console reporter- so we can
just include this information in the report.

PR Close #50745
2023-06-18 19:32:34 +00:00
Joey Perrott
9588b11e5b build: update angular dev-infra packages (#50732)
Update the @angular/ng-dev and @angular/build-tooling packages

PR Close #50732
2023-06-16 10:51:10 +02:00
Joey Perrott
6e65a8e7ff build: update yarn (#50732)
update yarn to the latest version

PR Close #50732
2023-06-16 10:51:09 +02:00
Alan Agius
4550fe42f7 refactor: use queueMicrotask to schedule micro tasks instead of various helpers (#50485)
`queueMicrotask` is an API which is supported by all browser and Node.js versions.

PR Close #50485
2023-06-15 16:38:21 +02:00
Paul Gschwendtner
cec5cd6eb5 test: mark ngtsc test target as flaky (#50718)
A larger investigation on why this is flaky is needed. Currently the
test is flaky with around 77% sucess rate and negatively impacts team
productivity. Subjectively, as reported by team members this it's much
more flaky than a success rate of 77%.

PR Close #50718
2023-06-15 15:34:43 +02:00
Angular Robot
55f3e41872 build: update io_bazel_rules_sass digest to 13ff55c (#50717)
See associated pull request for more information.

PR Close #50717
2023-06-15 10:25:47 +02:00
Paul Gschwendtner
65845c925e ci: enable colors for bazel in CircleCi (#50720)
Enables colors for Bazel in CircleCI. Bazel does not seem to
detect color support properly, but CircleCI does support such.

Colors make debugging a little easier with larger Bazel logs.

PR Close #50720
2023-06-15 10:19:27 +02:00
Pawel Kozlowski
903a546bb5 docs: release notes for the v16.1.1 release 2023-06-14 18:44:35 +02:00