19580 Commits

Author SHA1 Message Date
George Kalpakas 557756ba9c fix(docs-infra): do not deploy as archive when major is not lower than stable (#39853)
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 #39760 for more details.

PR Close #39853
2020-12-02 12:51:44 -08:00
George Kalpakas 2a074df09a test(docs-infra): avoid unnecessary re-computations in deploy-to-firebase.spec.js (#39853)
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 #39853
2020-12-02 12:51:43 -08:00
George Kalpakas 1b9aa4a515 refactor(docs-infra): support multiple deployments per run (#39853)
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 #39760 for more details.

PR Close #39853
2020-12-02 12:51:42 -08:00
George Kalpakas 5c04334958 refactor(docs-infra): decouple deploying from other operations in deploy-to-firebase.js (#39853)
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 #39760 for more details.

PR Close #39853
2020-12-02 12:51:41 -08:00
Wes Grimes abff156f8a docs: add wes grimes to GDE resources (#34741)
PR Close #34741
2020-12-02 12:40:23 -08:00
George Kalpakas 57642e80a6 feat(docs-infra): add maskable PWA icon (#39928)
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 #39928
2020-12-02 11:17:56 -08:00
George Kalpakas dc363055da build(docs-infra): update lighthouse to 6.5.0 (#39928)
This commit updates the `lighthouse` package to version 6.5.0 to take
advantage of the latest fixes and audits.

PR Close #39928
2020-12-02 11:17:55 -08:00
Nicholas Papadopoulos c4969e3f58 docs(common): fix typo in HttpClient docs (#39904)
PR Close #39904
2020-12-02 11:16:45 -08:00
Kapunahele Wong fc5f4a44ee docs: archive svg-in-templates.md (#39896)
PR Close #39896
2020-12-02 11:15:34 -08:00
Иванов Дмитрий 8705d289c6 docs(forms): fix example 'Reset the form group values and disabled status' (#33137)
PR Close #33137
2020-12-02 11:14:27 -08:00
Jessica Janiuk 7001ef6429 release: cut the v11.0.3 release (#39931)
PR Close #39931
11.0.3
2020-12-02 10:13:00 -08:00
Kapunahele Wong 3d19645208 docs: edit binding-syntax doc (#38773)
PR Close #38773
2020-12-01 12:05:54 -08:00
George Kalpakas 518fbeac9b ci: enable the Selenium Promise Manager in AIO e2e tests to avoid flakiness on CI (#39905)
Since we turned off the Selenium Promise Manager in #39600, 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 #39873 for more details).

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

Fixes #39872

PR Close #39905
2020-12-01 11:39:50 -08:00
George Kalpakas a25ec0f07d ci: remove unnecessary retry for docs examples tests (#39905)
In #32497, 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 #39905
2020-12-01 11:39:50 -08:00
George Kalpakas 425e3297f8 build(docs-infra): upgrade cli command docs sources to 4f756ce2f (#39907)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/65abe8a54...4f756ce2f):

**Modified**
- help/build.json

PR Close #39907
2020-12-01 10:48:04 -08:00
Kapunahele Wong 4c55f793bc docs: edit interpolation doc (#38687)
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 #38687
2020-12-01 10:15:01 -08:00
Kristiyan Kostadinov 75e22abe74 fix(core): not invoking object's toString when rendering to the DOM (#39843)
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 #38839.

PR Close #39843
2020-11-30 15:49:58 -08:00
Kapunahele Wong 24c0897839 docs: edit step 2 of getting started start-routing.md (#39593)
PR Close #39593
2020-11-30 15:00:39 -08:00
Jaime Oliveira 288a0a668a docs: fix builder section of generated angular.json file for libs (#39888)
Closes #39887

PR Close #39888
2020-11-30 12:10:13 -08:00
Tzimpoulas Nikos f7908baa5c docs(common): change HTTPResponse to HttpResponse (#39860)
PR Close #39860
2020-11-30 12:04:35 -08:00
bluemyria 20ab5d89a0 docs: fix typo in two-way-binding guide (#39859)
PR Close #39859
2020-11-30 11:15:03 -08:00
christos-P b11a303f40 docs: added a missing ` in inputs-outputs.md (#39856)
PR Close #39856
2020-11-30 11:14:02 -08:00
George Kalpakas d7c11deaf9 build(docs-infra): upgrade cli command docs sources to 65abe8a54 (#39852)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/ac653af78...65abe8a54):

**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 #39852
2020-11-30 11:07:23 -08:00
Kapunahele Wong e821184333 docs: edit Getting Started start/index.md copy and headers (#39583)
PR Close #39583
2020-11-30 11:06:12 -08:00
Kapunahele Wong 340f1ff89b docs: edit dependency-injection.md (#39255)
PR Close #39255
2020-11-30 11:04:00 -08:00
Andrew Scott 01c1bfdbdd fix(core): Ensure OnPush ancestors are marked dirty when events occur (#39833)
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 #39832

PR Close #39833
2020-11-25 14:39:20 -08:00
Ryan Russell 95ed2b0090 docs(forms): Deprecate legacy options for FormBuilder.group (#39769)
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 #39769
2020-11-25 14:28:12 -08:00
Manfred Steyer 4cfa2098d0 docs(docs-infra): display angulararchitects.io in trainings (#37139)
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 #37139
2020-11-25 12:33:08 -08:00
Adrien Crivelli c20c76aff8 docs: integrate webserver configuration (#36553)
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 #36553
2020-11-25 12:30:09 -08:00
rugk 2bfa8eec7a docs: make MDN link locale-indepenent (#39842)
`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 #39842
2020-11-25 11:05:05 -08:00
Basheer Ahmed e95cd2a17a fix(animations): replace copy of query selector node-list from "spread" to "for" (#39646)
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 #38551.

PR Close #39646
2020-11-25 11:01:59 -08:00
Krzysztof Grzybek 6dc74fd5de fix(compiler): report better error on interpolation in an expression (#30300)
Compiler results in weird error message when encounters interpolation inside
existing expression context, e.g. *ngIf="name {{ name }}"

PR Close #30300
2020-11-25 10:53:20 -08:00
George Kalpakas 9dc0a4edf6 test(docs-infra): disable the Selenium Promise Manager in docs examples e2e tests (#39818)
This commit disables the Selenium Promise Manager when running e2e tests
for docs examples in order to more closely align them with new apps
created with CLI v11. This change requires that any async operations in
tests are handled explicitly (e.g. using `async/await` or
`Promise#then()`).

PR Close #39818
2020-11-24 14:56:23 -08:00
George Kalpakas f5fa8b8606 test(docs-infra): remove redundant code from upgrade-module e2e tests (#39818)
This commit removes some code that is no longer necessary for the
`upgrade-module` docs example e2e tests to run. It used to be necessary
in earlier version of Protractor but not any more.

PR Close #39818
2020-11-24 14:56:21 -08:00
George Kalpakas 0163881c3b test(docs-infra): fix the dependency-injection-in-action e2e tests (#39818)
Previously, the tests made no meaningful assertions. It seems that the
intention was to ensure that some elements were present on the page, but
all the assertions did was verify that the corresponding
`ElementFinder`s were defined. The `ElementFinder`s would always be
defined, even if there were no corresponding elements on the page. In
fact, some of the `ElementFinder` selectors were incorrect, so they did
not match any actual elements.

This commit fixes the tests by fixing the `ElementFinder` selectors and
asserting that the elements are actually present on the page.

PR Close #39818
2020-11-24 14:56:20 -08:00
George Kalpakas 93dfab9b2a test(docs-infra): fix the dynamic-component-loader e2e tests (#39818)
Previously, the test made no meaningful assertion. It seems that the
intention was to ensure that some elements were present on the page, but
all the assertions did was verify that the corresponding
`ElementFinder`s were defined. The `ElementFinder`s would always be
defined, even if there were no corresponding elements on the page. In
fact, some of the `ElementFinder` selectors were incorrect, so they did
not match any actual elements.

This commit fixes the tests by fixing the `ElementFinder` selectors and
asserting that the elements are actually present on the page.

PR Close #39818
2020-11-24 14:56:19 -08:00
George Kalpakas 6730493b46 build(docs-infra): update docs examples to Angular v11.0.1 (#39818)
This commit updates the docs examples to Angular v11.0.1. In addition to
updating the dependencies versions, it also updates the project's
structure and config to more closely match what a new v11 CLI app would
look like. See, also, the [diff][1] between a basic v10.1.3 CLI app and a
v11.0.2 one.

NOTE:
I refrained from disabling the Selenium Promise Manager (as seen
[here][2]) and switching all e2e tests to `async/await`, because that is
a big change and should be done in a separate commit/PR.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3..11.0.2
[2]:
https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3...11.0.2#diff-dbd675d74087d57cd084d6dd6ae24ae2eeff2ff0122680e12916052f8a843a29

PR Close #39818
2020-11-24 14:56:17 -08:00
JoostK 75b53690f6 docs: explain foreign function/value constraints in Ivy compatibility examples (#36092)
Addresses documentation gaps as reported in #35078. The documentation only
contained a single statement on foreign function/value compatibility
without going into detail on what this means. This commit adds several
examples to the Ivy compatibility guide and explains why Ivy behaves differently
compared to VE.

PR Close #36092
2020-11-24 13:09:41 -08:00
Srashti Jain 25d7823022 docs: added Srashti Jain to GDE resources (#39150)
PR Close #39150
2020-11-24 13:04:07 -08:00
Michael Gerullis 9cb12ca62c docs(core): update links to schema.json of @schematics/angular (#39827)
closes #39796

PR Close #39827
2020-11-24 10:50:33 -08:00
JoostK 8634611e37 fix(compiler-cli): report error when a reference target is missing instead of crashing (#39805)
If a template declares a reference to a missing target then referring to
that reference from elsewhere in the template would crash the template
type checker, due to a regression introduced in #38618. This commit
fixes the crash by ensuring that the invalid reference will resolve to
a variable of type any.

Fixes #39744

PR Close #39805
2020-11-24 08:46:39 -08:00
mchl18 dc486c97ea docs(core): fix typo (#39825)
PR Close #39825
2020-11-24 08:42:19 -08:00
Kapunahele Wong 5cb711244f docs: archive template expression operators doc, move pipes precedence section (#39170)
Archives most of the content in the template expression operators doc.
The pipes precedence section that was originally in
template expression operators moves into the pipes doc
with some editing and an addition of a ternary example.

PR Close #39170
2020-11-24 08:41:20 -08:00
mgechev f5d7ca6e90 docs: add an exception for accepting contributions (#39611)
PR Close #39611
2020-11-24 08:40:25 -08:00
zuckjet 9f197611e2 docs(core): fix typo for getting component definition function (#39823)
PR Close #39823
2020-11-24 08:39:07 -08:00
George Kalpakas 7bf73d7442 fix(service-worker): correctly handle failed cache-busted request (#39786)
Since 5be4edfa17, a failing cache-busted
network request (such as requests for fetching uncached assets) will
cause the ServiceWorker to incorrectly enter a degraded
`EXISTING_CLIENTS_ONLY` mode. A failing network request could be caused
by many reasons, including the client or server being offline, and does
not necessarily signify a broken ServiceWorker state.

This commit fixes the logic in `cacheBustedFetchFromNetwork()` to
correctly handle errors in network requests.
For more details on the problem and the implemented fix see #39775.

Fixes #39775

PR Close #39786
2020-11-23 14:59:58 -08:00
Joey Perrott 7e52be372a fix(dev-infra): verify the version of generated build artifacts (#39789)
Verify the version of the generated build artifacts to ensure that
the version published to NPM is the version we expect.

PR Close #39789
2020-11-23 12:08:24 -08:00
Joey Perrott b980bf9649 build: define the package building function for ng-dev release tooling (#39711)
The packages are built during the release process on demand via a function
defined locally in the ng-dev config.

PR Close #39711
2020-11-23 12:07:42 -08:00
Joey Perrott 6ed1576eb8 ci: migrate rebase-pr CI script to the circleci directory (#39592)
Migrate the rebase-pr script used on CI out of tools and into the circleci
directory.  Additionally removes its support for running in the local
repository as this is now better handled by `ng-dev pr rebase <pr-number>`.

PR Close #39592
2020-11-23 12:07:06 -08:00
Gautier Pelloux-Prayer 7c9b84f528 docs(http): Add mention to default value 'OK' for statusText. #23334 (#23494)
PR Close #23494
2020-11-23 08:31:26 -08:00