19524 Commits

Author SHA1 Message Date
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
nseabourn 133075a174 docs: add reason to use Angular in README (#36927)
PR Close #36927
2020-12-09 08:58:11 -08:00
Benjamin Kindle 5a765f0be9 fix(animations): implement getPosition in browser animation builder (#39983)
Forward `getPosition` to `animation_group_player`.

PR Close #39983
2020-12-08 16:24:43 -08:00
Joey Perrott 03c3e07b8b fix(dev-infra): correct the environment variable to skip husky during merge (#40025)
With the migration to husky@5, the environment variable used to skip husky changed from
`HUSKY_SKIP_HOOKS` to `HUSKY`.  To continue skipping husky during the merge process as
expected, the environment variable used is updated.

PR Close #40025
2020-12-08 16:16:45 -08:00
devpato 38975ec7ab docs: add Pato Vargas to GDE resources (#40029)
PR Close #40029
2020-12-08 16:15:27 -08:00
Andrew Scott 65e93ea7b3 ci: add atscott to language-service approvers (#40027)
Add myself (atscott) to the list of approvers for language-service PRs.

PR Close #40027
2020-12-08 12:09:25 -08:00
Joey Perrott ef261974cb build: exclude build-worker file from formatting (#40012)
Exclude the generated build-worker.js file from formatting as it is
generated and not subject to formatting restrictions.

PR Close #40012
2020-12-08 12:08:28 -08:00
Joey Perrott 5fada68ed2 fix(dev-infra): allow build-worker to be used in forked process (#40012)
Generates a local copy of the build-worker file to allow it to be loaded
at runtime in a forked process.

PR Close #40012
2020-12-08 12:07:30 -08:00
Christoph Guttandin 588dbd3472 fix(service-worker): handle error with ErrorHandler (#39990)
Errors thrown by calling serviceWorker.register() are now passed to the global ErrorHandler.

Fixes #39913

PR Close #39990
2020-12-08 12:03:30 -08:00
George Kalpakas 97310d34f5 fix(upgrade): avoid memory leak when removing downgraded components (#39965)
Previously, due to the way the AngularJS and Angular clean-up processes
interfere with each other when removing an AngularJS element that
contains a downgraded Angular component, the data associated with the
host element of the downgraded component was not removed. This data was
kept in an internal AngularJS cache, which prevented the element and
component instance from being garbage-collected, leading to memory
leaks.

This commit fixes this by ensuring the element data is explicitly
removed when cleaning up a downgraded component.

NOTE:
This is essentially the equivalent of #26209 but for downgraded (instead
of upgraded) components.

Fixes #39911
Closes #39921

PR Close #39965
2020-12-08 12:02:53 -08:00
George Kalpakas 166c783958 refactor(upgrade): remove unused parameters/properties/variables (#39965)
This commit removes some unused parameters, properties and variables in
various `@angular/upgrade` functions.

PR Close #39965
2020-12-08 12:02:51 -08:00
Daniel Eisterhold 0969527c57 docs(platform-browser): fix spelling of deserialized (#36102)
PR Close #36102
2020-12-08 12:01:06 -08:00
Misko Hevery 19309b5797 Revert "build: update bazel rules_nodejs to version 2.3.1 (#39636)"
This reverts commit b82c88a0bf.
2020-12-08 11:11:15 -08:00
Misko Hevery 18124790b2 Revert "build: update to use npm_package.pack rule (#39636)"
This reverts commit 545ce2bf7e.
2020-12-08 11:11:10 -08:00