Commit Graph

16071 Commits

Author SHA1 Message Date
20e27a86d4 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:17 -08:00
7c4366dce8 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
f8e9c1e6f1 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
4988094e7d fix(ivy): auto register NgModules with ID (#33663)
PR Close #33663
2019-11-12 09:53:16 -08:00
9ab49def61 docs: updated amexio resource description (#33645)
PR Close #33645
2019-11-12 09:52:49 -08:00
66157436f8 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
72796b98b1 fix: generate the new locale files (#33682)
PR Close #33682
2019-11-11 15:55:14 -08:00
ea83125df3 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:14 -08:00
83626962cf 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:05 -08:00
5b292bf125 test: rename mispelled sanitization_spec.ts file (#33712)
PR Close #33712
2019-11-11 14:01:04 -08:00
3160193719 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
9045e3e495 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
c5400616f8 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
f67802ddc0 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
ffb010d3ab docs: fix numbering (#33736)
PR Close #33736
2019-11-11 12:46:34 -08:00
f45d5dc331 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
9396b19631 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
343483cae0 build: add @angular/localize to ng-update packageGroup (#33721)
PR Close #33721
2019-11-11 09:39:43 -08:00
682eaef690 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
011ecdf939 fix(common): rerun cldr to remove � characters (#33699)
PR Close #33699
2019-11-11 09:38:58 -08:00
cdceb60bd0 build: move clang formating out of gulp stream for cldr (#33699)
PR Close #33699
2019-11-11 09:38:58 -08:00
4613639a02 build(docs-infra): update @angular/* to 9.0.0-rc.1 (#33547)
PR Close #33547
2019-11-11 09:38:05 -08:00
f32ce01d93 build(docs-infra): update @angular/* to 9.0.0-rc.0 (#33547)
PR Close #33547
2019-11-11 09:38:05 -08:00
3d13a6d318 build(docs-infra): update @angular/cli to 9.0.0-rc.0 (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
46b5e4ae69 build(docs-infra): update aio payload size (#33547)
PR Close #33547
2019-11-11 09:38:04 -08:00
e6f383fe20 test(ivy): get ViewRef.rootNodes should get all root nodes from projectable nodes (#33647)
PR Close #33647
2019-11-11 09:37:39 -08:00
86d656bc67 refactor(ivy): simplify getFirstNativeNode processing of LContainer (#33647)
PR Close #33647
2019-11-11 09:37:39 -08:00
c5737f4a19 fix(ivy): properly insert views in front of empty views (#33647)
PR Close #33647
2019-11-11 09:37:39 -08:00
0b998844c8 fix(ivy): properly insert views in front of views with an empty element container (#33647)
PR Close #33647
2019-11-11 09:37:39 -08:00
fc24a69a6b docs: add AOT mode default to version 9 upgrade doc (#33703)
PR Close #33703
2019-11-08 15:38:41 -08:00
b789c891bb docs: update jiali's info (#33698)
PR Close #33698
2019-11-08 14:41:16 -08:00
eb9ed8cc13 docs: grammar fix (#33170)
PR Close #33170
2019-11-08 14:40:58 -08:00
139b2e4f40 docs: add missing word (#33170)
PR Close #33170
2019-11-08 14:40:58 -08:00
290ae43db3 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:21 -08:00
c7f913d1ec build(docs-infra): upgrade cli command docs sources to 4deae92a3 (#33684)
Updating [angular#9.0.x](https://github.com/angular/angular/tree/9.0.x) from [cli-builds#9.0.x](https://github.com/angular/cli-builds/tree/9.0.x).

##
Relevant changes in [commit range](7184f55eb...4deae92a3):

**Modified**
- help/update.json

##

PR Close #33684
2019-11-08 10:55:37 -08:00
ba68b560bc style: increase timeout to give blaze sufficient time to build (#33678)
PR Close #33678
2019-11-08 10:55:01 -08:00
69fdcbd71c docs: add ivy ssr opt-out (#33616)
PR Close #33616
2019-11-08 10:54:31 -08:00
a6ddda8834 docs: describe your change... (#32914)
Grammatical changes
PR Close #32914
2019-11-08 10:52:17 -08:00
2910d1a65f 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:53 -08:00
811275cd15 fix(ivy): properly determine the first native node of a view (#33627)
PR Close #33627
2019-11-07 16:50:30 -08:00
c8c51a9879 test(ivy): tests for view insertion before another view (#33627)
PR Close #33627
2019-11-07 16:50:30 -08:00
33f6cd4799 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:08 -08:00
c1bd3bc76a fix(common): update CLDR generated files to 36.0.0 (#33584)
PR Close #33584
2019-11-07 22:11:34 +00:00
0248d6b8a7 build: update cldr-data package to 36.0.0 (#33584)
PR Close #33584
2019-11-07 22:11:33 +00:00
4f69ff7e85 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
9df1178fe7 docs: app-name not rendering on browser (#33613)
Fixes #33612

PR Close #33613
2019-11-07 20:31:48 +00:00
76e52c5297 perf: report cold and minimal times when profiling in a browser (#33653)
PR Close #33653
2019-11-07 20:30:59 +00:00
83b635cb3f fix(ngcc): add reexports only once (#33658)
When ngcc is configured to generate reexports for a package using the
`generateDeepReexports` configuration option, it could incorrectly
render the reexports as often as the number of compiled classes in the
declaration file. This would cause compilation errors due to duplicated
declarations.

PR Close #33658
2019-11-07 20:29:13 +00:00
09cf0cd878 perf(ivy): allign (browser, benchpress, G3) the depth param for the tree benchmark (#33629)
PR Close #33629
2019-11-07 20:02:27 +00:00
cb55f60c74 revert: "fix(ivy): recompile component when template changes in ngc watch mode (#33551)" (#33661)
This reverts commit 8912b11f56.

PR Close #33661
2019-11-07 19:57:56 +00:00