Commit Graph

16074 Commits

Author SHA1 Message Date
Pete Bacon Darwin db2c606d41 build(common): fix bad `root` reference in global locale files (#33662)
There was a mistake in the generation of the global
locale files, where `root` was being used instead of
the correctl `global`.

PR Close #33662
2019-11-12 11:39:19 -08:00
crisbeto e31f62045d perf(ivy): chain listener instructions (#33720)
Chains multiple listener instructions on a particular element into a single call which results in less generated code. Also handles listeners on templates, host listeners and synthetic host listeners.

PR Close #33720
2019-11-12 09:59:13 -08:00
NothingEverHappens ccee818034 perf(core): Avoid unnecessary creating provider factory (#33742)
In providerToRecord move creating the factory into a condition which
actually needs it to avoid unnecessary creating it

PR Close #33742
2019-11-12 09:57:05 -08:00
George Kalpakas 2ce9cdab9d ci: publish tarballs for the zone.js package as CI build artifacts (#33733)
Since #33321, Angular packages have been persisted on each build as
CircleCI build artifacts (`.tgz` files), which can be used to install
dependencies on a project (for the purpose of testing or trying out a
change before a PR being merged and without having to build the packages
from source locally).

Previously, only packages published to npm under the `@angular` scope
were persisted as build artifacts.

This commit adds the `zone.js` package to the list of persisted
packages.

Fixes #33686

PR Close #33733
2019-11-12 09:55:17 -08:00
George Kalpakas 74b7d1ace1 test(ngcc): build `zone.js` from source in `scripts/build-packages-dist.sh` (#33733)
In #33046, internal uses of `zone.js` were switched to reference it
directly from source (built with Bazel) instead of npm. As a result, the
necessary scripts were updated to build `zone.js` as necessary. However,
some `integration/**/debug-test.sh` scripts were missed (apparently
because they are not used on CI, but only locally as helpers for
debugging the integration projects).

This commit updates the `scripts/build-packages-dist.sh` script to also
build `zone.js`, so that other scripts (such as the various
`debug-test.sh` scripts) can use it.

PR Close #33733
2019-11-12 09:55:16 -08:00
Andrew Scott f1b0547f0a revert: fix(ivy): R3TestBed should clean up registered modules after each test (#32872) (#33663)
This commit reverts 475e36a.

PR Close #33663
2019-11-12 09:53:16 -08:00
Andrew Scott e1ee90c218 revert: fix(ivy): Only restore registered modules if user compiles modules with TestBed (#32944) (#33663)
This commit reverts 63256b5.

PR Close #33663
2019-11-12 09:53:16 -08:00
Andrew Scott a972e4cd4d fix(ivy): auto register NgModules with ID (#33663)
PR Close #33663
2019-11-12 09:53:15 -08:00
ketangote fcde671ae2 docs: updated amexio resource description (#33645)
PR Close #33645
2019-11-12 09:52:48 -08:00
Keen Yee Liau 8b91ea5532 fix(language-service): Resolve template variable in nested ngFor (#33676)
This commit fixes a bug whereby template variables in nested scope are
not resolved properly and instead are simply typed as `any`.

PR closes https://github.com/angular/vscode-ng-language-service/issues/144

PR Close #33676
2019-11-11 16:06:00 -08:00
Ephraim 942e2ebe44 fix: generate the new locale files (#33682)
PR Close #33682
2019-11-11 15:55:13 -08:00
Ephraim 472641cea0 fix: use full cldr data to support all locales (#33682)
switching to cldr-data package resulted in
loss of some locales, since by default only core locales are loaded.
This PR adds a flag to tell cldr-data to use full locale coverage

fixes: #33681

PR Close #33682
2019-11-11 15:55:13 -08:00
Pete Bacon Darwin e511bfcab5 fix(ivy): ensure that the correct `document` is available (#33712)
Most of the use of `document` in the framework is within
the DI so they just inject the `DOCUMENT` token and are done.

Ivy is special because it does not rely upon the DI and must
get hold of the document some other way. There are a limited
number of places relevant to ivy that currently consume a global
document object.

The solution is modelled on the `LOCALE_ID` approach, which has
`getLocaleId()` and `setLocaleId()` top-level functions for ivy (see
`core/src/render3/i18n.ts`).  In the rest of Angular (i.e. using DI) the
`LOCALE_ID` token has a provider that also calls setLocaleId() to
ensure that ivy has the same value.

This commit defines `getDocument()` and `setDocument() `top-level
functions for ivy. Wherever ivy needs the global `document`, it calls
`getDocument()` instead.  Each of the platforms (e.g. Browser, Server,
WebWorker) have providers for `DOCUMENT`. In each of those providers
they also call `setDocument()` accordingly.

Fixes #33651

PR Close #33712
2019-11-11 14:01:04 -08:00
Pete Bacon Darwin c303371b26 test: rename mispelled `sanitization_spec.ts` file (#33712)
PR Close #33712
2019-11-11 14:01:04 -08:00
Pete Bacon Darwin f7475870a6 test: cleanup `document` "after" each test (#33712)
It looks like there was a typo when it originally was
written. As it works right now, the `beforeEach` and
`afterEach` cancel each other out. But then
`ensureDocument()` is called anyway in the `withBody()`
function.

With this change there is no need to call `ensureDocument() in the
`withBody() function.

PR Close #33712
2019-11-11 14:01:04 -08:00
JiaLiPassion d8be830fce fix: resolve event listeners not correct when registered outside of ngZone (#33711)
Close #33687.

PR Close #33711
2019-11-11 14:00:31 -08:00
Pete Bacon Darwin b3c3000004 fix(ngcc): ensure that adjacent statements go after helper calls (#33689)
Previously the renderers were fixed so that they inserted extra
"adjacent" statements after the last static property of classes.

In order to help the build-optimizer (in Angular CLI) to be able to
tree-shake classes effectively, these statements should also appear
after any helper calls, such as `__decorate()`.

This commit moves the computation of this positioning into the
`NgccReflectionHost` via the `getEndOfClass()` method, which
returns the last statement that is related to the class.

FW-1668

PR Close #33689
2019-11-11 13:01:15 -08:00
Pete Bacon Darwin 52d1500155 refactor(ngcc): allow look up of multiple helpers (#33689)
This change is a precursor to finding the end of a
class, which needs to search for helpers of many
different names.

PR Close #33689
2019-11-11 13:01:15 -08:00
Judy Bogart c6ebcd1eb9 docs: fix numbering (#33736)
PR Close #33736
2019-11-11 12:46:34 -08:00
Andrew Kushnir eece138fa7 fix(ivy): provider override via TestBed should remove old providers from the list (#33706)
While overriding providers in Ivy TestBed (via TestBed.overrideProvider call), the old providers were retained in the list, since the override takes precedence. However, presence of providers in the list might have side-effect: if a provider has the `ngOnDestroy` lifecycle hook, this hook will be registered and invoked later (when component is destroyed). This commit updates TestBed logic to clear provider list by removing the ones which have overrides.

PR Close #33706
2019-11-11 12:46:16 -08:00
Alan Agius ca1ff3ea11 docs: update update guide to use `ng update` instead of `npm i` (#33726)
For more context see: https://github.com/angular/angular-cli/issues/16021

Closes: https://github.com/angular/angular-cli/issues/16021

PR Close #33726
2019-11-11 09:40:08 -08:00
Alan Agius a8f9ff52f3 build: add @angular/localize to ng-update packageGroup (#33721)
PR Close #33721
2019-11-11 09:39:42 -08:00
Paul Gschwendtner a1e9956290 ci: update material-unit-tests job commit (#33716)
Updates the commit we run the `material-unit-tests` job
against. The latest commit includes 1255139a38

This commit reduces the flakiness of a `MatMenu` test and therefore
improves the stability of the material-unit-tests job.

Example failing build: https://circleci.com/gh/angular/angular/521625

PR Close #33716
2019-11-11 09:39:24 -08:00
Joey Perrott 1527ac6c47 fix(common): rerun cldr to remove � characters (#33699)
PR Close #33699
2019-11-11 09:38:58 -08:00
Joey Perrott 6cb9988d63 build: move clang formating out of gulp stream for cldr (#33699)
PR Close #33699
2019-11-11 09:38:58 -08:00
George Kalpakas b197e90206 build(docs-infra): update @angular/* to 9.0.0-rc.1 (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
George Kalpakas 976bdf1087 build(docs-infra): update @angular/* to 9.0.0-rc.0 (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
George Kalpakas 5c6e36eb95 build(docs-infra): update @angular/cli to 9.0.0-rc.0 (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
George Kalpakas 0260b8c795 build(docs-infra): update `aio` payload size (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
Pawel Kozlowski 39712bcdb2 test(ivy): get ViewRef.rootNodes should get all root nodes from projectable nodes (#33647)
PR Close #33647
2019-11-11 09:37:38 -08:00
Pawel Kozlowski 9d99c7244f refactor(ivy): simplify getFirstNativeNode processing of LContainer (#33647)
PR Close #33647
2019-11-11 09:37:38 -08:00
Pawel Kozlowski 05d7c575e4 fix(ivy): properly insert views in front of empty views (#33647)
PR Close #33647
2019-11-11 09:37:38 -08:00
Pawel Kozlowski 056236cafd fix(ivy): properly insert views in front of views with an empty element container (#33647)
PR Close #33647
2019-11-11 09:37:38 -08:00
Kara Erickson 1d429b2165 docs: add AOT mode default to version 9 upgrade doc (#33703)
PR Close #33703
2019-11-08 15:38:40 -08:00
JiaLiPassion a40103d849 docs: update jiali's info (#33698)
PR Close #33698
2019-11-08 14:41:16 -08:00
Németh Tamás b97577bd94 docs: grammar fix (#33170)
PR Close #33170
2019-11-08 14:40:58 -08:00
Németh Tamás 4385cbaa65 docs: add missing word (#33170)
PR Close #33170
2019-11-08 14:40:58 -08:00
Daniele Morosinotto 98766b1d07 docs: fix migration-renderer code snippets (#33553)
Fix code snippets for migration-renderer.md found in next.angular.io
PR Close #33553
2019-11-08 12:43:20 -08:00
George Kalpakas afbaaf93c5 build(docs-infra): upgrade cli command docs sources to 3bcf5b5e2 (#33683)
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](e598c8e89...3bcf5b5e2):

**Modified**
- help/update.json

##

PR Close #33683
2019-11-08 10:55:22 -08:00
Miško Hevery 1db86500de style: increase timeout to give blaze sufficient time to build (#33678)
PR Close #33678
2019-11-08 10:55:01 -08:00
Alan Agius 570936e39f docs: add ivy ssr opt-out (#33616)
PR Close #33616
2019-11-08 10:54:31 -08:00
Shibasish 43ffe7257a docs: describe your change... (#32914)
Grammatical changes
PR Close #32914
2019-11-08 10:52:17 -08:00
Kara Erickson c4fbd0bef7 docs: update ivy compatibility guide with latest changes (#33675)
This commit removes one of the expected Ivy changes because we have
decided to change the behavior to be more backwards-compatible.

It also adds a bug fix that is technically breaking to the list of
expected changes.

PR Close #33675
2019-11-08 10:51:52 -08:00
Pawel Kozlowski f63e5d9319 fix(ivy): properly determine the first native node of a view (#33627)
PR Close #33627
2019-11-07 16:50:29 -08:00
Pawel Kozlowski c57759f191 test(ivy): tests for view insertion before another view (#33627)
PR Close #33627
2019-11-07 16:50:29 -08:00
Keen Yee Liau a33162bb66 fix(compiler-cli): Pass SourceFile to getFullText() (#33660)
Similar to https://github.com/angular/angular/pull/33633, this commit is
needed to fix an outage with the Angular Kythe indexer.

Crash logs:

```
TypeError: Cannot read property 'text' of undefined
    at NodeObject.getFullText (typescript/stable/lib/typescript.js:121443:57)
    at FactoryGenerator.generate (angular2/rc/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.ts:67:34)
    at GeneratedShimsHostWrapper.getSourceFile (angular2/rc/packages/compiler-cli/src/ngtsc/shims/src/host.ts:88:26)
    at findSourceFile (typescript/stable/lib/typescript.js:90654:29)
    at typescript/stable/lib/typescript.js:90553:85
    at getSourceFileFromReferenceWorker (typescript/stable/lib/typescript.js:90520:34)
    at processSourceFile (typescript/stable/lib/typescript.js:90553:13)
    at processRootFile (typescript/stable/lib/typescript.js:90383:13)
    at typescript/stable/lib/typescript.js:89399:60
    at Object.forEach (typescript/stable/lib/typescript.js:280:30)

```

PR Close #33660
2019-11-07 16:47:07 -08:00
Joey Perrott c77faf566e fix(common): update CLDR generated files to 36.0.0 (#33584)
PR Close #33584
2019-11-07 22:11:33 +00:00
Joey Perrott e51acd5bcc build: update cldr-data package to 36.0.0 (#33584)
PR Close #33584
2019-11-07 22:11:33 +00:00
Matias Niemelä 71b400eb7b test(ivy): introduce a benchmark for duplicate map-based style/class bindings (#33608)
Prior to this patch all the styling benchmarks only tested for
template map-based style/class bindings. Because of each of the bindings
being only present in the template, there was no possibility of
there being any duplicate map-based styling bindings.

This benchmark introduces benchmarking for map-based style/class bindings
that are evaluated from both template bindings as well as directives.

This benchmark can be executed by calling:

```
bazel build //packages/core/test/render3/perf:duplicate_map_based_style_and_class_bindings_lib.min_debug.es2015.js

node dist/bin/packages/core/test/render3/perf/duplicate_map_based_style_and_class_bindings_lib.min_debug.es2015.js
```

The benchmark is also run via the `profile_all.js` script (found in
`packages/core/test/render3/perf/`)

PR Close #33608
2019-11-07 20:34:26 +00:00
Santosh Yadav 0ca2a390d5 docs: app-name not rendering on browser (#33613)
Fixes #33612

PR Close #33613
2019-11-07 20:31:48 +00:00