19587 Commits

Author SHA1 Message Date
George Kalpakas bfb9b40884 docs(dev-infra): fix command and typos in browsers/README.md (#40150)
This commit fixes the instructions in `dev-infra/browsers/README.md` to
use the `shasum` executable (instead of `sha256`, which does not exist
afaict).

The commit also fixes a couple of typos.

PR Close #40150
2020-12-21 14:15:31 -08:00
George Kalpakas 6c0270ad93 docs(dev-infra): refactor browsers/README.md to use one sentence per line (#40150)
This commit refactor the `dev-infra/browsers/README.md` file to have one
sentence per line. This makes it consistent with other Markdown files in
the repository and makes diffs for future changes more readable.

This commit also uses proper Markdown numbered lists and fixes
indentation.

PR Close #40150
2020-12-21 14:15:31 -08:00
George Kalpakas 3f4a1d6154 build(docs-infra): update Lighthouse to v7.0.0 (#40198)
This commit updates `lighthouse` to version 7.0.0.

It also adds a `width` attribute to the `code-icon.svg` image on the
homepage, which was pointed out as missing in the Lighthouse report.
(Explicit `width`/`height` attributes on images help reduce the
[layout shift][1] of the page.)

[1]: https://web.dev/cls/

PR Close #40198
2020-12-21 10:36:02 -08:00
Alexey Elin 353b9db535 docs: remove -webkit-transition-timing-function CSS property (#40153)
Angular has stopped to support browser that requires that CSS property.
All supported browsers support standard transition-timing-function CSS property

PR Close #40153
2020-12-21 10:23:58 -08:00
Aristeidis Bampakos 1d13073173 docs: fix styles in binding guides (#40182)
Fix styling issues with the visual representation of the content

PR Close #40182
2020-12-21 10:22:32 -08:00
Hadrien TOMA d3afcc5fb0 docs: update App Shell guide to reflect its actual behavior (#40210)
PR Close #40210
2020-12-21 10:21:00 -08:00
George Kalpakas 089cc174da ci: correctly rebase PRs for branches contain a slash (/) (#40184)
Previously, due to a bug in `rebase-pr.js`, PRs for branches containing
a slash (/) in their name would fail to be rebased
([example failure][1]).

This commit ensures that such branch names are handled correctly.

[1]: https://circleci.com/gh/angular/angular/884503

PR Close #40184
2020-12-21 10:12:03 -08:00
George Kalpakas 7afd74db0c build(docs-infra): upgrade cli command docs sources to 715d873ae (#40214)
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/5baf8ed65...715d873ae):

**Modified**
- help/lint.json

PR Close #40214
2020-12-21 10:10:09 -08:00
Troels Lenda 2075cf79a3 docs: use an explicit product id in the getting started example (#34934)
Simplyfing the example by prodiving an id for each
product instead of relying on their index in the array.

Closes #34738

PR Close #34934
2020-12-17 12:02:10 -08:00
Alan Agius 24c6d56d5a refactor(core): remove custom globalThis (#40123)
This is provided by TypeScript since version 3.4

PR Close #40123
2020-12-17 11:43:28 -08:00
Andrew Kushnir f1aabf1c2f build: use "outFiles" in .vscode/launch.json to speed up debugging sessions (#39848)
This commit adds the "outFiles" config options into the .vscode/recommended-launch.json, which helps speed up
the startup time of a debugging session by limiting the number of files that should be loaded.

PR Close #39848
2020-12-17 11:23:14 -08:00
Tasos Alexiou ab34211eed refactor(docs-infra): enable tslint rules for the angular.io app (#39307)
Signed-off-by: Tasos Alexiou <tasos@arrikto.com>

PR Close #39307
2020-12-17 10:02:39 -08:00
George Kalpakas 35cde145e0 ci: fail CI jobs when rebasing on master fails (#40161)
As part of the `setup` CI job (which is a prerequisite for all other CI
jobs), we rebase the current code on master to make sure the PR changes
are compatible with the latest code from master, even if the PR has not
been rebased recently.

When it is not possible to automatically rebase (i.e. when there are
conflicts that need to be resolved manually), the job and subsequently
the entire workflow should fail.

This behavior has been accidentally broken in #39592, so that the job
would succeed even if the rebase operation failed.

This commit fixes it by ensuring the `exec()` helper used in
`rebase-pr.js` will throw an error if the underlying command execution
fails. Previously, the function would always return stdout output as a
string and attach a `code` property indicating the exit code of the
command.

Since the exit code isn't necessary in the `rebase-pr.js` script, this
commit simplifies the `exec()` helper by making it return the stdout
output as a plain string (without extra properties) and re-throw any
errors (unless the `ignoreError` argument is set to `true`).

(Initially reported [here][1] by @JoostK.)

[1]: https://angular-team.slack.com/archives/C042EU9T5/p1608070403128900

PR Close #40161
2020-12-17 09:43:48 -08:00
Joey Perrott e0e2157a28 release: cut the v11.0.5 release (#40164)
PR Close #40164
11.0.5
2020-12-16 15:17:38 -08:00
Alan Agius 922f492a3b fix(core): set ngDevMode to false when calling enableProdMode() (#40124)
The `ngDevMode` description also mentions that calling `enableProdMode` will set this the value to `false`.
https://github.com/angular/angular/blob/4610093c87975b6355f31a9c849351129908783a/packages/core/src/util/ng_dev_mode.ts#L22 which is currently not the case.

PR Close #40124
2020-12-16 13:20:59 -08:00
Misko Hevery 0aa220bc00 fix(core): fix possible XSS attack in development through SSR. (#40136)
Escape the content of the strings so that it can be safely inserted into a comment node.
The issue is that HTML does not specify any way to escape comment end text inside the comment.
`<!-- The way you close a comment is with "-->". -->`. Above the `"-->"` is meant to be text
not an end to the comment. This can be created programmatically through DOM APIs.

```
div.innerHTML = div.innerHTML
```
One would expect that the above code would be safe to do, but it turns out that because comment
text is not escaped, the comment may contain text which will prematurely close the comment
opening up the application for XSS attack. (In SSR we programmatically create comment nodes which
may contain such text and expect them to be safe.)
This function escapes the comment text by looking for the closing char sequence `-->` and replace
it with `-_-_>` where the `_` is a zero width space `\u200B`. The result is that if a comment
contains `-->` text it will render normally but it will not cause the HTML parser to close the
comment.

PR Close #40136
2020-12-16 09:38:08 -08:00
Stepan Suvorov 03e8a92a98 docs(docs-infra): link to angular-pro screencasit (#39472)
PR Close #39472
2020-12-15 14:37:56 -08:00
Joey Perrott a1c82e772d build: update config flags for snapshot builds (#40095)
Update the config flags used for snapshot builds and release builds.

PR Close #40095
2020-12-15 13:36:57 -08:00
Joey Perrott e715a50b82 feat(dev-infra): support --mode flag for building environment stamp (#40095)
When building the environment stamp, support two modes: release and snapshot

The release mode will always stamp using the current version of in the root package.json
and in snapshot mode will use a version stamp expressing a version based on the tag and
the number of commits from the tag.

PR Close #40095
2020-12-15 13:36:57 -08:00
Alexey Elin 7d9ac37ce0 docs: fix typo (#40106)
PR Close #40106
2020-12-14 11:51:25 -08:00
Zach Arend 3c384651f2 fix(dev-infra): add vim .swp files to gitignore (#40094)
The vim editor produces temporarily files that can end in both .swo and
.swp. This commits add .swp to the .gitignore so we don't accidentaly
commit temporary files.

PR Close #40094
2020-12-14 11:39:41 -08:00
George Kalpakas 407e58343b ci: reduce flakiness of docs-infra deploy-to-firebase.js tests (#40088)
The `deploy-to-firebase.js` tests rely on git info retrieved from the
`angular/angular` repository (via `git ls-remote ...`).

Previously, different calls to `git ls-remote ...` could return
different values if a new commit was pushed or a new branch was created
during test execution, resulting in errors ([example CI failure][1]).

This commit makes the tests more stable by memoizing the result of
`git ls-remote ...` and returning the same result for subsequent calls
with the same arguments (even if meanwhile the remote has been updated).

[1]: https://circleci.com/gh/angular/angular/877626

PR Close #40088
2020-12-14 11:38:32 -08:00
Alexey Elin df41340c0b docs: remove prefixed animation related CSS properties (#40084)
Angular has stopped to support browser that requires these CSS properties.
All supported browsers support standard CSS properties:
* @keyframes rule
* animation

PR Close #40084
2020-12-14 11:36:49 -08:00
Alexey Elin 142c9659ed docs: remove unused CSS rule (#40080)
Removed rule don't affect their component views.
The reason - the templates don't contain elements to which that rule is applied.
See https://angular.io/guide/view-encapsulation for more details

PR Close #40080
2020-12-14 11:35:37 -08:00
Alan Agius 1176b6102d docs: update CLI MAN page format (#40038)
With this change we update the CLI docs template to seperate
the following the default and value types from the argument field.

This should make it clearer and more understandable

PR Close #40038
2020-12-14 11:31:08 -08:00
David Shevitz 7033b8648b docs: Rename Main concepts to Understanding Angular, Built-in Features to Developer Guides (#39930)
PR Close #39930
2020-12-14 11:30:22 -08:00
Alexey Elin e90a7f7ff1 docs: remove unused CSS rules (#40069)
Removed rules don't affect their component views.
The reason - the templates don't contain elements to which that rules are applied.
See https://angular.io/guide/view-encapsulation for more details

PR Close #40069
2020-12-10 14:30:18 -08:00
Alexey Elin eda5b20a5f docs: remove prefixed border-radius related properties (#40066)
Angular has stopped to support browser that requires these CSS properties.
All supported browsers support standard CSS properties:
* border-radius
* border-bottom-left-radius
* border-bottom-right-radius

PR Close #40066
2020-12-10 14:29:39 -08:00
George Kalpakas 8921ed95e0 build(docs-infra): upgrade cli command docs sources to 5baf8ed65 (#40065)
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/d72eb44f8...5baf8ed65):

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

PR Close #40065
2020-12-10 14:20:17 -08:00
Amadou Sall c866632927 docs: update the link to the TypeScript documentation for strict mode (#40063)
PR Close #40063
2020-12-10 14:16:24 -08:00
Miloš Lapiš fc0d21a746 docs(router): Correct equivalent for 'enabled' initial navigation (#40061)
With regard to the code in `router_module.ts`, the correct equivalent for `enabled`
should be` enabledBlocking` and not `enabledNonBlocking`.

PR Close #40061
2020-12-10 14:07:43 -08:00
Jessica Janiuk bf03ef64c0 Revert "Revert "ci: update pullapprove config to add comp labels"" (#40059)
This reverts commit c88e8141ab.

This reverts the revert that undid the doing of the pull approve
approval.

PR Close #40059
2020-12-10 13:51:10 -08:00
Pete Bacon Darwin 287ac12fa3 feat(docs-infra): add no upcoming events message (#40055)
This commit adds a message that is displayed instead
of the events table if there are no upcoming events.

Fixes #40052

PR Close #40055
2020-12-10 13:46:33 -08:00
George Kalpakas c4c75096a2 fix(upgrade): fix HMR for hybrid applications (#40045)
Previously, trying to apply a change via Hot Module Replacement (HMR) in
a hybrid app would result in an error. This was caused by not having the
AngularJS app destroyed and thus trying to bootstrap an AngularJS app on
the same element twice.

This commit fixes HMR for hybrid apps by ensuring the AngularJS app is
destroyed when the Angular `PlatformRef` is [destroyed][1] in the
[`module.hot.dispose()` callback][2].

NOTE:
For "ngUpgradeLite" apps (i.e. those using `downgradeModule()`), HMR
will only work if the downgraded module has been bootstrapped and there
is at least one Angular component present on the page. The is due to a
combination of two facts:
- The logic for setting up the listener that destroys the AngularJS app
  depends on the downgraded module's `NgModuleRef`, which is only
  available after the module has been bootstrapped.
- The [HMR dispose logic][3] depends on having an Angular element
  (identified by the auto-geenrated `ng-version` attribute) present in
  the DOM in order to retrieve the Angular `PlatformRef`.

[1]:
https://github.com/angular/angular-cli/blob/205ea2b638f154291993bfd9e065cd66ff20503/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts#L75
[2]:
https://github.com/angular/angular-cli/blob/205ea2b638f154291993bfd9e065cd66ff205033/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts#L31
[3]:
https://github.com/angular/angular-cli/blob/205ea2b638f154291993bfd9e065cd66ff205033/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts#L116

Fixes #39935

PR Close #40045
2020-12-10 13:40:54 -08:00
George Kalpakas bed2e8a23c refactor(upgrade): create a helper for cleaning jqLite/jQuery data (#40045)
This commit moves the code for cleaning jqLite/jQuery data on an element
to a re-usable helper function. This way it is easier to keep the code
consistent across all places where we need to clean data (now and in the
future).

PR Close #40045
2020-12-10 13:40:54 -08:00
George Kalpakas 9a28ddff21 refactor(upgrade): remove unused variables (#40045)
This commit removes a couple of unused variables.

PR Close #40045
2020-12-10 13:40:53 -08:00
Alexey Elin 373d8baf1c docs: remove -webkit-box-sizing and -moz-box-sizing (#40039)
Angular has stopped to support browser that requires these CSS properties.
All supported browsers support standard box-sizing CSS property

PR Close #40039
2020-12-10 13:38:19 -08:00
Teri Glover 1758e26c5a docs: add Teri Glover to contributor file (#39830)
PR Close #39830
2020-12-10 13:22:17 -08:00
Kristiyan Kostadinov f5aab2b972 fix(compiler): handle strings inside bindings that contain binding characters (#39826)
Currently the compiler treats something like `{{  '{{a}}' }}` as a nested
binding and throws an error, because it doesn't account for quotes
when it looks for binding characters. These changes add a bit of
logic to skip over text inside quotes when parsing.

Fixes #39601.

PR Close #39826
2020-12-10 11:11:22 -08:00
Amadou Sall 46fcfe0255 docs: fix the code sample displayed in the "reusable animations" guide (#37262)
Currently the code sample displayed in this guide is not a valid.
The `trigger` is directly used in the `@Component` decorator.
It should instead be in the `animations` array of the `@Component` decorator.

PR Close #37262
2020-12-10 11:03:32 -08:00
Jessica Janiuk eba7de6b22 Revert "ci: update pullapprove config to add comp labels" (#40053)
This reverts commit 9f8ccd577f. The
PullApprove labeling is unfortunately removing labels rather than
adding them.

PR Close #40053
2020-12-09 12:06:27 -08:00
Joey Perrott 884f743baa release: cut the v11.0.4 release (#40051)
PR Close #40051
11.0.4
2020-12-09 11:43:33 -08:00
Joey Perrott 73ab6730d8 Revert "feat(compiler): support tagged template literals in code generator (#39122)" (#40050)
This reverts commit 5631daa05c.

PR Close #40050
2020-12-09 11:38:55 -08:00
Joey Perrott 55326837b7 Revert "feat(compiler): allow trailing comma in array literal (#22277)" (#40050)
This reverts commit f7e767f3aa.

PR Close #40050
2020-12-09 11:38:55 -08:00
Julien b2090fdf93 docs(common): use table layout for Pre-defined format options (#40036)
easier to read
PR Close #40036
2020-12-09 09:11:04 -08:00
George Kalpakas 721cbdcd54 build(docs-infra): upgrade cli command docs sources to d72eb44f8 (#40035)
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/4915c24ab...d72eb44f8):

**Modified**
- help/add.json
- help/build.json
- help/config.json
- help/doc.json
- help/e2e.json
- help/extract-i18n.json
- help/generate.json
- help/new.json
- help/serve.json
- help/test.json
- help/update.json

PR Close #40035
2020-12-09 09:08:16 -08:00
Jessica Janiuk 7984b02570 ci: update pullapprove config to add comp labels (#39962)
This adds comp labels to each group defined in the yml file.

PR Close #39962
2020-12-09 09:05:47 -08:00
Alexey Elin 8ae5d2d7a0 docs: remove cursor: hand (#39918)
PR Close #39918
2020-12-09 09:04:55 -08:00
Aristeidis Bampakos 2046bd5735 docs: fix typos in the Style Precedence guide (#39560)
PR Close #39560
2020-12-09 09:02:15 -08:00
Christoph Guttandin 3dd9faf3fd docs: add angular-prerender to resources.json (#39387)
PR Close #39387
2020-12-09 09:01:24 -08:00