19622 Commits

Author SHA1 Message Date
George Kalpakas
eba185edc8 test(docs-infra): reduce ambiguity in deploy-to-firebase.js test descriptions ()
Previously, test descriptions used `latest` to refer to the most
recent/highest version. This was ambiguous, because `latest` can also
refer to the stable version of a package (e.g. see `@latest` npm tag).

This commit replaces `latest` with `highest` (or `highest for major`) to
reduce ambiguity.

Discussed in:
https://github.com/angular/angular/pull/39853#discussion_r531730317

PR Close 
2020-12-02 12:51:39 -08:00
George Kalpakas
cf1f5a1e37 fix(docs-infra): fix redirecting rc.angular.io to angular.io when no active RC ()
Currently there is an issue with redirecting `rc.angular.io` to
`angular.io` when there is no active RC. If a user has visited
`rc.angular.io` before and has a ServiceWorker registered for that
subdomain, they will never "see" the redirect to `angular.io`.

This commit fixes the problem by doing an additional deployment from the
stable branch to the `rc-angular-io-site` Firebase site when there is no
active RC. This additional deployment will ensure that:
1. Users will be temporarily redirected from `rc.angular.io` to
   `angular.io`.
2. Users with a registered ServiceWorker (who don't see the redirect)
   will have their ServiceWorker unregistered on the next visit.
3. The content on both sites is identical.

See  for more details on the problem and the solution.

NOTE:
As mentioned in , for this fix to take affect, we need to remove
the redirect from `rc.angular.io` to `angular.io` in the Firebase
console for site `rc-angular-io-site`.

Fixes 

PR Close 
2020-12-02 12:51:38 -08:00
George Kalpakas
1e39e493fb fix(docs-infra): do not deploy as archive when major is not lower than stable ()
Previously, a branch would be deployed as `archive` even if it had a
major version that was equal/higher than that of the stable branch (as
long as it was not the RC branch - i.e. not the most recent minor
branch). For example, with `11.0.x` as the stable branch  and `12.0.x`
as the RC branch, `11.1.x` would be deployed as archive.

Theoretically, we should never find ourselves in such a situation.
Typically, there will only be at most one minor branch most recent than
the stable one (and that branch will be the RC branch). However, it
is possible under unusual circumstances.

This commit adds additional checks to guard against this problem. It
also refactors the code in preparation of fixing an issue with
`rc.angular.io` redirects in the presence of a ServiceWorker, which will
require identifying whether there is an active RC version or not.
See  for more details.

PR Close 
2020-12-02 12:51:37 -08:00
George Kalpakas
ab4e9e1d52 test(docs-infra): avoid unnecessary re-computations in deploy-to-firebase.spec.js ()
Previously, the latest commit for branch may be computed multiple times
in the `deploy-to-firebase.js` tests.

This commit avoids the unnecessary re-computations by computing the
latest commits for the necessary branches at the beginning and using the
computed values throughout the tests.

PR Close 
2020-12-02 12:51:36 -08:00
George Kalpakas
53bd832c77 refactor(docs-infra): support multiple deployments per run ()
Previously, the `deploy-to-firebase.js` script would only perform one
deployment operation on each run.

This commit adds support for performing multiple deployment operations.

NOTE:
In a subsequent commit, this will be leveraged fix an issue with
`rc.angular.io` redirects in the presence of a ServiceWorker by
deploying the same artifacts to multiple Firebase projects/sites.
See  for more details.

PR Close 
2020-12-02 12:51:35 -08:00
George Kalpakas
6e6eee6d5b refactor(docs-infra): decouple deploying from other operations in deploy-to-firebase.js ()
Previously, the `deploy()` function in `deploy-to-firebase.js` would
also perform other operations (beyond deploying), such as building the
app, checking the generated payload size, testing the PWA score of the
deployed app.

This commit decouples these operations, so that deploying can be
performed independently.

NOTE:
In a subsequent commit, this will be leveraged fix an issue with
`rc.angular.io` redirects in the presence of a ServiceWorker by
deploying the same artifacts to multiple Firebase projects/sites.
See  for more details.

PR Close 
2020-12-02 12:51:34 -08:00
Wes Grimes
c923aaf64b docs: add wes grimes to GDE resources ()
PR Close 
2020-12-02 12:40:21 -08:00
George Kalpakas
b596366c67 feat(docs-infra): add maskable PWA icon ()
This commit adds a [maskable PWA icon][1] to ensure it looks good on
different devices/platforms. It also improves the PWA Lighthouse score
(from 96 to 100) by passing the [maskable icon audit][2].

For reference, the maskable icon can be previewed [here][3].

[1]: https://web.dev/maskable-icon/
[2]: https://web.dev/maskable-icon-audit
[3]:
https://maskable.app/?demo=https://user-images.githubusercontent.com/8604205/100861028-f16c9d80-3499-11eb-9341-beba69988cfa.png

PR Close 
2020-12-02 11:17:53 -08:00
George Kalpakas
d5fc51cc22 build(docs-infra): update lighthouse to 6.5.0 ()
This commit updates the `lighthouse` package to version 6.5.0 to take
advantage of the latest fixes and audits.

PR Close 
2020-12-02 11:17:52 -08:00
Nicholas Papadopoulos
7851a254d8 docs(common): fix typo in HttpClient docs ()
PR Close 
2020-12-02 11:16:43 -08:00
Kapunahele Wong
943ae37f99 docs: archive svg-in-templates.md ()
PR Close 
2020-12-02 11:15:32 -08:00
Иванов Дмитрий
215e9069e3 docs(forms): fix example 'Reset the form group values and disabled status' ()
PR Close 
2020-12-02 11:14:25 -08:00
Jessica Janiuk
784667ca12 release: cut the v11.1.0-next.1 release ()
PR Close 
2020-12-02 10:40:10 -08:00
Kristiyan Kostadinov
eac85b4e23 test(compiler-cli): migrate view compliance tests ()
Migrates the `r3_view_compiler` tests to the new format.

PR Close 
2020-12-01 15:12:40 -08:00
George Kalpakas
7695671cd6 build(docs-infra): upgrade cli command docs sources to 548c6ed3e ()
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](70150e3f0...548c6ed3e):

**Modified**
- help/build.json

PR Close 
2020-12-01 14:59:04 -08:00
Kristiyan Kostadinov
50962c1b0b test(compiler-cli): migrate template compliance tests ()
Migrates the `r3_view_compiler_template` tests to the new format.
Also introduces a new matcher for unique function names.

PR Close 
2020-12-01 14:58:11 -08:00
Kristiyan Kostadinov
40b127c7a3 test(compiler-cli): migrate listener compliance tests ()
Migrates the `r3_view_compiler_listener` compliance tests to the new format.

PR Close 
2020-12-01 14:56:59 -08:00
Kristiyan Kostadinov
97ea2c7bfd test(compiler-cli): migrate input/output compliance tests ()
Migrates the `r3_view_compiler_input_outputs` compliance tests to the new format.

PR Close 
2020-12-01 14:56:59 -08:00
Fabian Wiles
7a5bc95614 refactor(http): inline HttpObserve ()
Inline `HttpObserve` for better type safety.

Fix 

PR Close 
2020-12-01 12:13:04 -08:00
Kapunahele Wong
b40aa0a5d3 docs: edit binding-syntax doc ()
PR Close 
2020-12-01 12:05:53 -08:00
George Kalpakas
00d56e4ead ci: enable the Selenium Promise Manager in AIO e2e tests to avoid flakiness on CI ()
Since we turned off the Selenium Promise Manager in , the AIO e2e
tests have started flaking on CI. After trying out several things, the
only change that seems to eliminate the flakiness is turning the
Selenium Promise Manager back on (see  for more details).

This commit turns the Selenium Project Manager on to get rid of the
flakiness.

Fixes 

PR Close 
2020-12-01 11:39:49 -08:00
George Kalpakas
07fa97c831 ci: remove unnecessary retry for docs examples tests ()
In , an option was introduced to retry failed docs examples tests
a second time. This was done to work around some then recently
introduced flakiness. After inspecting ~50 recent CI docs examples jobs,
all tests passed on the first try.

This commit gets rid of the retry attempt. This will avoid covering up
any new flakiness introduces in the future.

PR Close 
2020-12-01 11:39:49 -08:00
Kapunahele Wong
0b5b24abd7 docs: edit interpolation doc ()
This commit edits the copy on the interpolation page.
Tightens language, clarifies headers, and streamlines text.
There are no content or code changes.

PR Close 
2020-12-01 10:15:00 -08:00
Kristiyan Kostadinov
11cd37fae3 fix(core): not invoking object's toString when rendering to the DOM ()
Currently we convert objects to strings using `'' + value` which is quickest,
but it stringifies the value using its `valueOf`, rather than `toString`. These
changes switch to using `String(value)` which has identical performance
and calls the `toString` method as expected. Note that another option
was calling `toString` directly, but benchmarking showed it to be slower.

I've included the benchmark I used to verify the performance so we have it
for future reference and we can reuse it when making changes to `renderStringify`
in the future.

Also for reference, here are the results of the benchmark:

```
Benchmark: renderStringify
 concat: 2.006 ns(0%)
 concat with toString: 2.201 ns(-10%)
 toString: 237.494 ns(-11741%)
 toString with toString: 121.072 ns(-5937%)
 constructor: 2.201 ns(-10%)
 constructor with toString: 2.201 ns(-10%)
 toString mono: 14.536 ns(-625%)
 toString with toString mono: 9.757 ns(-386%)
```

Fixes .

PR Close 
2020-11-30 15:49:57 -08:00
Kapunahele Wong
1de59d2818 docs: edit step 2 of getting started start-routing.md ()
PR Close 
2020-11-30 15:00:38 -08:00
Jaime Oliveira
dd3ed3cb2b docs: fix builder section of generated angular.json file for libs ()
Closes 

PR Close 
2020-11-30 12:10:12 -08:00
Kristiyan Kostadinov
71a5314335 test(compiler-cli): migrate providers compliance tests ()
Migrates the `r3_view_compiler_providers` compliance tests to the new format.

PR Close 
2020-11-30 12:07:02 -08:00
Tzimpoulas Nikos
1539c64fb0 docs(common): change HTTPResponse to HttpResponse ()
PR Close 
2020-11-30 12:04:34 -08:00
JoostK
c5619ca56e test(compiler-cli): convert styling compliance tests ()
This commit converts the DI compliance tests taken from
`r3_view_compiler_styling_spec.ts` to the new test runner.

PR Close 
2020-11-30 11:23:30 -08:00
JoostK
c622b17b0d test(compiler-cli): convert di compliance tests ()
This commit converts the DI compliance tests taken from
`r3_view_compiler_di_spec.ts` to the new test runner.

PR Close 
2020-11-30 11:21:23 -08:00
JoostK
157d690704 test(compiler-cli): expand logging when extra compliance check fails ()
Previously this would have just printed that `false` was not equal to
`true`, which, although true, is not very helpful. This commit adds
details about which special check failed together with the generated
code, for easier debugging.

PR Close 
2020-11-30 11:21:23 -08:00
bluemyria
e2040af412 docs: fix typo in two-way-binding guide ()
PR Close 
2020-11-30 11:15:02 -08:00
christos-P
df97fbc077 docs: added a missing ` in inputs-outputs.md ()
PR Close 
2020-11-30 11:14:01 -08:00
Kapunahele Wong
9a2f83b826 docs: edit Getting Started start/index.md copy and headers ()
PR Close 
2020-11-30 11:06:11 -08:00
Kapunahele Wong
93d689ffa8 docs: edit dependency-injection.md ()
PR Close 
2020-11-30 11:03:59 -08:00
Andrew Scott
68d4a74411 fix(core): Ensure OnPush ancestors are marked dirty when events occur ()
We currently only wrap the event listener in the function which ensures
ancestors are marked for check when the listener is placed on an element
that has a native method for listening to an event. We actually need to do
this wrapping in all cases so that events that are attached to non-rendered
template items (`ng-template` and `ng-container`) also mark ancestors for check
when they receive the event.

fixes 

PR Close 
2020-11-25 14:39:19 -08:00
Ryan Russell
e148382bd0 docs(forms): Deprecate legacy options for FormBuilder.group ()
DEPRECATION:

Mark the {[key: string]: any} type for the options property of the FormBuilder.group method as deprecated.
Using AbstractControlOptions gives the same functionality and is type-safe.

PR Close 
2020-11-25 14:28:11 -08:00
JiaLiPassion
c43267b912 build: update peerDependencies of zone.js to 0.10~0.11 ()
`@angular/core` support zone.js `^0.10.2 and ^0.11.3`, so this PR updates the
peerDependencies to `^0.10.2 || ^ 0.11.3`, so the app will not show warning about
peer denepdency not consistent when using zone.js 0.10.x version.

PR Close 
2020-11-25 14:25:48 -08:00
Manfred Steyer
ba6945bfa9 docs(docs-infra): display angulararchitects.io in trainings ()
This adds angulararchitects.io to the tranings section in the
resources.json file for angular.io. It also adds a description
for angulararchitects.io.

PR Close 
2020-11-25 12:33:08 -08:00
Adrien Crivelli
07f2e0c34e docs: integrate webserver configuration ()
The article previously referred was out of date. Most of the article content
was already duplicated here, or described how to generate multiple bundles. But
creating multiple bundles manually is now obsolete and the parameter `--localize`
should be preferred instead, because it is much faster.

This commit integrate the only interesting part left, relating to webserver configuration.

Co-authored-by: David Shevitz <dshevitz@google.com>

PR Close 
2020-11-25 12:30:08 -08:00
Charles Lyding
4def19f39f test(compiler-cli): add TypeScript 4.1 typings integration test ()
This change adds a typings test identical to the TypeScript 4.0 test but using TypeScript 4.1 instead.

PR Close 
2020-11-25 11:10:01 -08:00
Charles Lyding
318255a5f8 build: support building with TypeScript 4.1 ()
TypeScript 4.1 is now used to build and test within the repository.

PR Close 
2020-11-25 11:10:01 -08:00
Charles Lyding
a7e7c211b5 feat(compiler-cli): add support for using TypeScript 4.1 ()
This change enables projects to be built with TypeScript 4.1.  Support for TypeScript 4.0 is also retained.

PR Close 
2020-11-25 11:10:00 -08:00
Pete Bacon Darwin
2786292780 test(compiler-cli): migrate i18n compliance tests ()
This commit provides the machinery for the new file-based compliance test
approach for i18n tests, and migrates the i18n tests to this new format.

PR Close 
2020-11-25 11:08:39 -08:00
Pete Bacon Darwin
63dcfb2913 test(compiler-cli): update new compliance test partial rules ()
There is now a dedicated rule for debugging generation of partial
golden files. The README has been updated accordingly.

PR Close 
2020-11-25 11:08:39 -08:00
rugk
6653028863 docs: make MDN link locale-indepenent ()
`en-US` makes it link to the English (US) version.
This patch removes this and let's MDN auto-redirect to the user's preferred/selected language/website locale.
PR Close 
2020-11-25 11:05:04 -08:00
George Kalpakas
bf12f51b49 build(docs-infra): upgrade cli command docs sources to 70150e3f0 ()
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](0defb1136...70150e3f0):

**Modified**
- help/build.json
- help/deploy.json
- help/e2e.json
- help/extract-i18n.json
- help/run.json
- help/serve.json
- help/test.json

PR Close 
2020-11-25 11:03:46 -08:00
Basheer Ahmed
bfa197f564 fix(animations): replace copy of query selector node-list from "spread" to "for" ()
For element queries that return sufficiently large NodeList
objects, using spread syntax to populate the results array
causes a RangeError due to the call stack limit being reached.
This commit updates the code to use regular "for" loop instead.

Fixes .

PR Close 
2020-11-25 11:01:58 -08:00
Pete Bacon Darwin
5684ac5e34 feat(localize): support Application Resource Bundle (ARB) translation file format ()
The ARB format is a JSON file containing an object where the keys are the
message ids and the values are the translations.

It is extensible because it can also contain metadata about each message.

For example:

```
{
  "@@locale": "...",
  "message-id": "Translated message string",
  "@message-id": {
    "type": "text",
    "description": "Some description text",
    "x-locations": [{ "start": {"line": 23, "column": 145}, "file": "some/file.ts" }]
  },
}
```

For more information, see:
https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification

PR Close 
2020-11-25 10:55:40 -08:00
Krzysztof Grzybek
94e790d4ee fix(compiler): report better error on interpolation in an expression ()
Compiler results in weird error message when encounters interpolation inside
existing expression context, e.g. *ngIf="name {{ name }}"

PR Close 
2020-11-25 10:53:19 -08:00