19342 Commits

Author SHA1 Message Date
Andrew Kushnir 33639db911 release: cut the v11.0.2 release 11.0.2 2020-11-19 19:34:21 +00:00
Andrew Kushnir 2fe2104738 ci: decrease payload size limit for AIO tests (#39766)
This commit updates the payload size limit for the AIO tests. This is likely an effect of the changes from
PR #39600 that was merged earlier.

PR Close #39766
2020-11-19 10:55:04 -08:00
Kristiyan Kostadinov 02378451a2 fix(router): migration incorrectly replacing deprecated key (#39763)
In #38762 we added a migration to replace the deprecated `preserveQueryParams`
option with `queryParamsHandling`, however due to a typo, we ended up replacing it
with `queryParamsHandler` which is invalid.

Fixes #39755.

PR Close #39763
2020-11-19 09:08:12 -08:00
Kapunahele Wong 04e469ee16 docs: move di-in-action doc to conceptual ref section (#39544)
Removes duplicate info, moves document into conceptual
reference section, but doesn't edit remaining content.
Groups two dependency injection documents together in
one expandable nav section.

PR Close #39544
2020-11-19 08:56:16 -08:00
Pete Bacon Darwin 8ab332b00b build: update to latest "yargs" package (#39749)
The 15.x versions of `yargs` relied upon a version of `y18n` that
has a SNYK vulnerability.
This commit updates the overall project, and therefore also the
`localize` and `compiler-cli` packages to use the latest version
of `yargs` that does not depend upon the vulnerable `y18n`
version.
The AIO project was already on the latest `yargs` version and so
does not need upgrading.

Fixes #39743

PR Close #39749
2020-11-18 16:09:43 -08:00
Misko Hevery 68be6f9896 refactor(core): clean up circular dependencies (#39746)
Clean up circular dependencies in core by pulling symbols out to their
respective files.

PR Close #39746
2020-11-18 16:05:20 -08:00
Keen Yee Liau c39ed99bcc docs: fix confusing description for strictTemplates (#39745)
This commit fixes a confusing description of the `strictTemplates` flag.

> When `true`, enables strict template type checking in Angular version 9.

This seems to imply that the flag is only available in one version.
Strict template type checking is available in version 9 **and above**.

PR Close #39745
2020-11-18 16:00:38 -08:00
David Shevitz ee14e43d26 docs: Update releases.md with v11 information. (#39716)
PR Close #39716
2020-11-18 15:56:10 -08:00
George Kalpakas 9f2ed3096a build(docs-infra): update @angular/material to 11.0.0 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0.

PR Close #39600
2020-11-18 15:49:22 -08:00
George Kalpakas 0a43d090c6 build(docs-infra): update @angular/* to 11.0.0 and @angular/cli to 11.0.1 (#39600)
This commit updates `@angular/*` and `@angular/cli` (and related
packages) to latest 11.0.x versions (11.0.0 and 11.0.1 respectively).
(See [here][1] for a diff between a v11.0.0-rc.2 and a v11.0.1 CLI app.)

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.0.0-rc.2...11.0.1

PR Close #39600
2020-11-18 15:49:21 -08:00
George Kalpakas 1523ea59bd build(docs-infra): update @angular/material to 11.0.0-rc.1 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0-rc.1.

PR Close #39600
2020-11-18 15:49:21 -08:00
George Kalpakas a645573f97 build(docs-infra): downgrade karma to v5.1.1 due to regression in v5.2.0 (#39600)
This commit downgrades `karma` to version 5.1.1, because of a regression
in version 5.2.0: karma-runner/karma#3560
It has been fixed with karma-runner/karma@05dc288016 on
master, but the fix is not included in the latest release (v5.2.3).

PR Close #39600
2020-11-18 15:49:20 -08:00
George Kalpakas 2287cd6b1f build(docs-infra): update @angular/* and @angular/cli to 11.0.0-rc.2 (#39600)
This commit updates `@angular/*` and `@angular/cli` (and related
packages) to version 11.0.0-rc.2. Apart from the automatic migrations,
this commit also tries to align `aio/` with new apps generated by the
latest CLI. (See [here][1] for a diff between a v10.1.3 and a
v11.0.0-rc.2 CLI app.)

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3...11.0.0-rc.2

PR Close #39600
2020-11-18 15:49:19 -08:00
George Kalpakas 3ea3128ac6 build(docs-infra): update payload sizes (#39600)
This commit updates the payload sizes for angular.io to reflect the
current values. This helps compare with the changes introduced by the
following commit.

The values are taken from these [test_aio][1], [test_aio_local][2] and
[test_aio_local_viewengine][3] CI jobs.

[1]: https://circleci.com/gh/angular/angular/852537
[2]: https://circleci.com/gh/angular/angular/852582
[3]: https://circleci.com/gh/angular/angular/852586

PR Close #39600
2020-11-18 15:49:19 -08:00
George Kalpakas ab45d5890a docs(http): fix em-dashes not displaying correctly (#38665)
Fixes #38662

PR Close #38665
2020-11-18 15:40:51 -08:00
Licanueto 26533a0954 docs: fixes on paragraph (#39664)
Phrasing improved, missing word added, lowercase "angular" fixed, unnecessary, commas removed.

PR Close #39664
2020-11-18 12:12:02 -08:00
Joey Perrott 84377531cb build: update to husky@5 (#39739)
Update to husky version 5.0.0 to better support windows usage.

PR Close #39739
2020-11-18 11:11:41 -08:00
Joey Perrott 91faaaccb7 feat(dev-infra): support command line arguments for restore-commit-message (#39739)
Allowing command line arguments to provide the file and source values to
the restore-commit-message command will assist in the the process of
upgrading to husky@5.

PR Close #39739
2020-11-18 11:11:41 -08:00
atscott 153b42b01e release: cut the v11.0.1 release 11.0.1 2020-11-18 10:38:43 -08:00
George Kalpakas 163fdc35f6 docs: add links to corresponding commits in v11.0.0 breaking changes in CHANGELOG.md (#39704)
This commit makes the breaking changes section of the v11.0.0 release
info in `CHANGELOG.md` easier to follow by:
1. Adding links to the corresponding commit for each breaking change (to
   make it easier to find the full context of the change).
2. Turning breaking changes of each scope into a bulleted list (to make
   it clearer that they affect the same package/scope).

NOTE:
It would be better if the changelog generation tooling handled this
automatically. This potential improvement is being tracked in #39698.

PR Close #39704
2020-11-18 10:23:23 -08:00
George Kalpakas 9b867b39d6 docs: group entries by scope in the v11.0.0 release info in CHANGELOG.md (#39704)
Usually, entries in the release notes for a version in `CHANGELOG.md` are
grouped by scope (i.e. all `compiler` changes together, all `router`
changes together, etc.). Currently, the notes for a non-patch release
are created manually, by contatenating the release notes for all
corresponding next/RC versions. As a result, the entries for v11.0.0 are
not grouped together.

This commit fixes it by grouping all entries for the v11.0.0 release by
scope, making it easier to identify all changes that affect a specific
package/scope.

PR Close #39704
2020-11-18 10:23:23 -08:00
George Kalpakas a76706d375 docs: fix links to issues "closed" by a commit in the v11.0.0 release info in CHANGELOG.md (#39704)
It seems that the script used to generate the `CHANGELOG.md` content
incorrectly treats any link or issue/PR reference in the commit message
as a link to an issue fixed/closed by the commit. However, there are
cases where such links/references do not refer to issues fixed/closed by
the commit (or not refer to issues at all).

This commit fixes such bogus links in the v11.0.0 release info.

NOTE:
The underlying issue should be more generically addressed in the
changelog generation tooling. This is being tracked in #39698.

PR Close #39704
2020-11-18 10:23:23 -08:00
George Kalpakas fd0cb532dc docs: fix link to commit in CHANGELOG.md (#39704)
Currently, the script that is used to generate the `CHANGELOG.md`
content uses the first 7 characters of a commit SHA in the generated
links. This is problematic when there are multiple commits in the repo
(or forks of the repo?) that start with the same 7 characters (which is
rare but possible), since GitHub shows a 404 page.

This was the case with commit 736e0644b0
that is included in the v11.0.0 release notes and happens to start with
the same characters as commit 736e064ac80f5e0ed84711694c2ba68809222ffd.

This commit fixes the issue by using the full commit SHA in the link for
this particular commit.

NOTE:
The underlying issue should be more generically addressed in the
changelog generation tooling. This is being tracked in #39698.

PR Close #39704
2020-11-18 10:23:23 -08:00
George Kalpakas 413c238a05 docs: remove commit with internal-only changes from CHANGELOG.md (#39704)
Commit 4ca1c736bb (part of PR #38931) was
incorrectly marked with scope `packaging`, while it is an internal-only
change (i.e. it does not affect packaging). As such is should have been
marked with a different scope (for example, `ci`/`build`/`refactoring`)
and should not appear in `CHANGELOG.md`.

This commit removes the entry from `CHANGELOG.md` to avoid confusing
developers trying to understand how this change may affect their apps.

NOTE:
The commit contains a breaking change notice (about dropping support for
IE<11) which _is_ relevant to app developers. This breaking change
notice is preserved in the "BREAKING CHANGES" section, but the scope is
changes from `packaging` to `core` to avoid confusion.

PR Close #39704
2020-11-18 10:23:22 -08:00
George Kalpakas 9f987b635e docs: fix typos in the v11.0.0 release info in CHANGELOG.md (#39704)
This commit includes several minor fixes in the v11.0.0 release info in
`CHANGELOG.md`, such as:
- Fixing typos/punctuation.
- Making capitalization consistent.
- Wrapping code in backticks (for better readability).

PR Close #39704
2020-11-18 10:23:22 -08:00
Joey Perrott 158581b366 refactor(dev-infra): extract the parsing of a range of commits into a util function (#39726)
A utility function to parse a range of commits allows for other tooling to assess
a range of commits.

PR Close #39726
2020-11-18 10:22:50 -08:00
Egor 5d8b5eb97b refactor(core): Replace non-null assertion operator with property initialization (#39730)
Reuse the `noop` function from the common utilities

PR Close #39730
2020-11-18 09:14:42 -08:00
Pete Bacon Darwin db29176075 build(docs-infra): compute previous version list (#39689)
Previously we hand coded the list of previous major versions
that are displayed in the left navigation.

Now these are generated from the tags in GitHub.

Closes #39688

PR Close #39689
2020-11-18 09:13:20 -08:00
ngdevelop-tech 403d889edf docs(core): fix directive.ts preserving whitespace example comment (#37377)
In directive.ts file - component preserving whitespace example's compiled output comment is wrongly written

PR Close #37377
2020-11-18 09:12:53 -08:00
Santosh Yadav 46edc48056 docs: meetup url to https (#33713)
PR Close #33713
2020-11-18 09:10:37 -08:00
spixy 724dc93080 docs: fix dead CSRF link (#35929)
Fix dead CSRF link which were pointing to non-working resources

PR Close #35929
2020-11-17 16:16:27 -08:00
Antonio Cardenas 3fcfc5fcd1 docs: add spanish lang (#39502)
PR Close #39502
2020-11-17 13:09:47 -08:00
Sebastian Häni 10e4ac05b4 fix(http): queue jsonp <script> tag onLoad event handler in microtask (#39512)
Before this change, when trying to load a JSONP script that calls the JSONP callback inside a
microtask, it will fail in Internet Explorer 11 and EdgeHTML. This commit changes the onLoad cleanup
to be queued after the loaded endpoint executed any potential microtask itself. This ensures that
the aforementioned browsers will first evaluate the loaded script calling the JSONP callback and
only then run the cleanup inside onLoad.

Fixes #39496

PR Close #39512
2020-11-17 13:09:09 -08:00
Ajit Singh a88bc643fc docs: add documentation for ngNonBindable (#36560)
ngNonBindable documentation was not present, on docs site added documentation for ngNonBindable. With this template primitive, Angular won't
evaluate expressions in elements.

Fixes #28577 Fixes #19497

PR Close #36560
2020-11-17 11:56:47 -08:00
Keen Yee Liau 752af2ea48 docs: remove bazel from deprecations doc (#39540)
Bazel builder and schematics have already been deprecated and removed in v10,
so there's no need to mention it in the index.

PR Close #39540
2020-11-17 11:54:45 -08:00
JoostK 882ff8fc37 perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694)
The result of utf-8 encoding a string was represented in a string, where
each individual character represented a single byte according to its
character code. All usages of this data were interested in the byte
itself, so this required conversion from a character back to its code.
This commit simply stores the individual bytes in array to avoid the
conversion. This yields a ~10% performance improvement for i18n message
ID computation.

PR Close #39694
2020-11-17 10:09:29 -08:00
JoostK 1891455784 perf(compiler): optimize computation of i18n message ids (#39694)
Message ID computation makes extensive use of big integer
multiplications in order to translate the message's fingerprint into
a numerical representation. In large compilations with heavy use of i18n
this was showing up high in profiler sessions.

There are two factors contributing to the bottleneck:

1. a suboptimal big integer representation using strings, which requires
repeated allocation and conversion from a character to numeric digits
and back.
2. repeated computation of the necessary base-256 exponents and their
multiplication factors.

The first bottleneck is addressed using a representation that uses an
array of individual digits. This avoids repeated conversion and
allocation overhead is also greatly reduced, as adding two big integers
can now be done in-place with virtually no memory allocations.

The second point is addressed by a memoized exponentiation pool to
optimize the multiplication of a base-256 exponent.

As an additional optimization are the two 32-bit words now converted to
decimal per word, instead of going through an intermediate byte buffer
and doing the decimal conversion per byte.

The results of these optimizations depend a lot on the number of i18n
messages for which a message should be computed. Benchmarks have shown
that computing message IDs is now ~6x faster for 1,000 messages, ~14x
faster for 10,000 messages, and ~24x faster for 100,000 messages.

PR Close #39694
2020-11-17 10:09:29 -08:00
Misko Hevery 9e87fc88ff refactor(core): Remove circular dependency on ApplicationRef (#39710)
`ViewRef` and `ApplicationRef` had a circular reference. This change
introduces `ViewRefTracker` which is a subset of `ApplicationRef` for
this purpose.

PR Close #39710
2020-11-16 11:17:43 -08:00
Misko Hevery 19b77b8a3b refactor(core): Remove circular dependency on render3 JIT and ViewEngine (#39710)
JIT needs to identify which type is `ChangeDetectorRef`. It was doing so
by importing `ChangeDetectorRef` and than comparing the types. This creates
circular dependency as well as prevents tree shaking. The new solution is
to brand the class with `__ChangeDetectorRef__` so that it can be identified
without creating circular dependency.

PR Close #39710
2020-11-16 11:17:43 -08:00
Misko Hevery db62b5f979 refactor(core): Remove circular dependency on render3 and ng_module (#39710)
Extracted `NgModeDef` into a separate file to break the circular dependency.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 05b22a956e refactor(core): Remove circular dependency between LContainer and ViewRef. (#39710)
`LContainer` stores `ViewRef`s this is not quite right as it creates
circular dependency between the two types. Also `LContainer` should not
be aware of `ViewRef` which iv ViewEngine specific construct.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 53ea4bbc93 refactor(core): extract DoBootstrap to separate file. (#39710)
Extract `DoBootstrap` interface to a separate file to break circular dependency.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 271be8aaec refactor(core): Cleanup non-standard Injector handling. (#39710)
Due to historical reasons `Injector.__NG_ELEMENT_ID__` was set to `-1`.
This changes it to be consistent with other `*Ref.__NG_ELEMENT_ID__`
constructs.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 9ab3fe732b refactor(core): Cleanup circular dependency between ViewEngine and Ivy Renderer2. (#39710)
`Renderer2` is declared in ViewEngine but it sub-classed in Ivy. This creates a circular
dependency between ViewEngine `Renderer2` which needs to declare `__NG_ELEMENT_ID__` and
ivy factory which needs to create it. The workaround used to be to pass the `Renderer2`
through stack but that created a very convoluted code. This refactoring simply bundles the
two files together and removes the stack workaround making the code simpler to follow.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 8a425cc29a refactor(core): Cleanup circular dependency between ViewEngine and Ivy ChangeDetectorRef. (#39710)
`ChangeDetectorRef` is declared in ViewEngine but it sub-classed in Ivy. This creates a circular
dependency between ViewEngine `ChangeDetectorRef` which needs to declare `__NG_ELEMENT_ID__` and
ivy factory which needs to create it. The workaround used to be to pass the `ChangeDetectorRef`
through stack but that created a very convoluted code. This refactoring simply bundles the
two files together and removes the stack workaround making the code simpler to follow.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 9d1131c58c refactor(core): Cleanup circular dependency between ViewEngine and Ivy ViewContainerRef. (#39710)
`ViewContainerRef` is declared in ViewEngine but it sub-classed in Ivy. This creates a circular
dependency between ViewEngine `ViewContainerRef` which needs to declare `__NG_ELEMENT_ID__` and
ivy factory which needs to create it. The workaround used to be to pass the `ViewContainerRef`
through stack but that created a very convoluted code. This refactoring simply bundles the
two files together and removes the stack workaround making the code simpler to follow.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 1c3226d45d refactor(core): Cleanup circular dependency between ViewEngine and Ivy TemplateRef. (#39710)
`TemplateRef` is declared in ViewEngine but it sub-classed in Ivy. This creates a circular
dependency between ViewEngine `TemplateRef` which needs to declare `__NG_ELEMENT_ID__` and
ivy factory which needs to create it. The workaround used to be to pass the `TemplateRef`
through stack but that created a very convoluted code. This refactoring simply bundles the
two files together and removes the stack workaround making the code simpler to follow.

PR Close #39710
2020-11-16 11:17:42 -08:00
Misko Hevery 5080a16933 refactor(core): Cleanup circular dependency between ViewEngine and Ivy ElementRef. (#39710)
`ElementRef` is declared in ViewEngine but it sub-classed in Ivy. This creates a circular
dependency between ViewEngine `ElementRef` which needs to declare `__NG_ELEMENT_ID__` and
ivy factory which needs to create it. The workaround used to be to pass the `ElementRef`
through stack but that created a very convoluted code. This refactoring simply bundles the
two files together and removes the stack workaround making the code simpler to follow.

PR Close #39710
2020-11-16 11:17:41 -08:00
Kristiyan Kostadinov e05cfdd367 fix(compiler-cli): incorrectly type checking calls to implicit template variables (#39686)
Currently when we encounter an implicit method call (e.g. `{{ foo(1) }}`) and we manage to resolve
its receiver to something within the template, we assume that the method is on the receiver itself
so we generate a type checking code to reflect it. This assumption is true in most cases, but it
breaks down if the call is on an implicit receiver and the receiver itself is being invoked. E.g.

```
<div *ngFor="let fn of functions">{{ fn(1) }}</div>
```

These changes resolve the issue by generating a regular function call if the method call's receiver
is pointing to `$implicit`.

Fixes #39634.

PR Close #39686
2020-11-16 09:36:10 -08:00
Pete Bacon Darwin b363d96724 refactor(core): remove isObservable TODO (#39669)
This commit removes the TODO comment that proposed
that we use the built-in RxJS `isObservable()` function.

This is not a viable approach since the built-in function
requires that the `obj` contains additional methods that
our "observable" types (such as `EventEmitter`) do not
necessarily have.

See #39643 for more information.

PR Close #39669
2020-11-16 09:28:12 -08:00