14333 Commits

Author SHA1 Message Date
Pete Bacon Darwin
c7a9987067 feat(ivy): ngcc - implement CommonJsRenderingFormatter ()
PR Close 
2019-05-22 16:24:15 -07:00
Pete Bacon Darwin
1bdec3ed6a feat(ivy): ngcc - implement CommonJsDependencyHost ()
PR Close 
2019-05-22 16:24:15 -07:00
Pete Bacon Darwin
620cd5c148 feat(ivy): ngcc - implement CommonJsReflectionHost ()
PR Close 
2019-05-22 16:24:15 -07:00
Pete Bacon Darwin
76391f8999 fix(ivy): use ReflectionHost in AbsoluteModuleStrategy ()
The AbsoluteModuleStrategy in ngtsc assumed that the source code is
formatted as TypeScript with regards to module exports.

In ngcc this is not always the case, so this commit changes
`AbsoluteModuleStrategy` so that it relies upon a `ReflectionHost`  to
compute the exports of a module.

PR Close 
2019-05-22 16:24:14 -07:00
Andrew Kushnir
02523debe5 fix(ivy): handle pipes in i18n attributes properly ()
Prior to this change we processed binding expression (including bindings with pipes) in i18n attributes before we generate update instruction. As a result, slot offsets for pipeBind instructions were calculated incorrectly. Now we perform binding expression processing when we generate "update block" instructions, so offsets are calculated correctly.

PR Close 
2019-05-22 16:23:18 -07:00
Paul Gschwendtner
70fd4300f4 test(compiler-cli): compliance tests not always reporting test failure ()
Currently the `@angular/compiler-cli` compliance tests sometimes do
not throw an exception if the expected output does not match the
generated JavaScript output. This can happen for the following cases:

1. Expected code includes character that is not part of known alphabet
    (e.g. `Δ` is still used in a new compliance test after rebasing a PR)
2. Expected code asserts that a string literal matches a string with
    escaped quotes. e.g. expects `const $var$ = "\"quoted\"";`)

PR Close 
2019-05-22 16:22:52 -07:00
Alex Eagle
3125376ec1 fix(bazel): allow ts_library interop with list-typed inputs ()
_compile_action should take a list since we compute it within one node in the build graph
This needs to be cleaned up since Bazel is getting stricter with
disallowing iteration over depsets

PR Close 
2019-05-22 16:22:10 -07:00
Judy Bogart
2cd5294394 docs: add new cli builder api guide ()
PR Close 
2019-05-22 16:19:54 -07:00
jenniferfell
3c548189b1 docs: update node and typescript versions mentioned in docs ()
PR Close 
2019-05-22 16:17:41 -07:00
Judy Bogart
ae91f45b27 docs: update file structure and workspace config for v8 ()
PR Close 
2019-05-22 11:20:18 -07:00
Paul Gschwendtner
f74e0fd825 refactor(core): migrations should parse cli workspace config as json5 ()
Currently we try to parse CLI workspace configurations gracefully by
using the native `JSON.parse()` method. This means that the CLI workspace
configuration needs to follow the strict JSON specification because otherwise
the migrations would not be able to find TypeScript configurations in the CLI
project where JSON5 workspace configurations are supported.

In order to handle such workspace configurations, we leverage the JSON
parsing logicfrom the `@angular-devkit/core` which is also used by the CLI.

PR Close 
2019-05-21 17:26:22 -07:00
George Kalpakas
f1ea78ba09 build(docs-infra): upgrade cli command docs sources to f960a8e4a ()
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](73d875a70...f960a8e4a):

**Modified**
- help/update.json

##

PR Close 
2019-05-21 17:09:57 -07:00
Jason Aden
87a2366eeb build: update base SHA for rebase on merge-pr script 2019-05-21 17:07:19 -07:00
jenniferfell
0f5da82cfd docs: deprecations summary fix api heading level, remove inject, add index by version ()
PR Close 
2019-05-21 13:51:26 -07:00
Pawel Kozlowski
66f269c077 refactor(ivy): rename query-related functions for clarity ()
PR Close 
2019-05-21 13:14:15 -07:00
Pawel Kozlowski
b613f90146 refactor(ivy): avoid calling query instructions from static query instructions ()
PR Close 
2019-05-21 13:14:14 -07:00
Pawel Kozlowski
2fe6f350cb refactor(ivy): avoid repeated read of LView from global state ()
PR Close 
2019-05-21 13:14:14 -07:00
Pawel Kozlowski
514ebf402a refactor(ivy): avoid calling other instructions from the loadViewQuery instruction ()
PR Close 
2019-05-21 13:14:14 -07:00
Sander Vanneste
7c0667d215 docs: delete double dashes on ng command in testing guide ()
Closes 

PR Close 
2019-05-21 13:12:47 -07:00
cexbrayat
f6bf8928f2 fix(core): temporarily remove @deprecated jsdoc tag for a TextBed.get overload ()
PR  introduced a new `TestBed.get` signature and deprecated the existing one.
This raises a lot of TSLint deprecation warnings in projects using a strict TS config (see  for context), so we are temporarily removing the `@deprecated` annotation in favor of a plain text warning until we properly fix it.

Refs 
Fixes FW-1336

PR Close 
2019-05-21 13:11:21 -07:00
Brandon
6debe9dfb9 docs(docs-infra): add common/upgrade to authors package for API docs ()
This fixes an issue where the common/upgrade packge isn't included
on page reload when changes are made to the common/upgrade package

PR Close 
2019-05-21 13:09:09 -07:00
Brandon
0d52a27f41 docs(common): update API docs for unified location service for upgrading ()
PR Close 
2019-05-21 13:09:08 -07:00
George Kalpakas
697046c2b2 docs: document the PR action: rerun CI at HEAD label in TRIAGE_AND_LABELS.md ()
Related to .

PR Close 
2019-05-21 13:07:37 -07:00
George Kalpakas
53a0b26348 docs: document the PR action: review label in TRIAGE_AND_LABELS.md ()
PR Close 
2019-05-21 13:07:37 -07:00
George Kalpakas
8c00fced1c docs: add info about who adds/removes labels in TRIAGE_AND_LABELS.md ()
PR Close 
2019-05-21 13:07:37 -07:00
Stewart Rand
a50c1bb7bc docs: fix spelling of 'its' ()
PR Close 
2019-05-21 13:07:13 -07:00
Miško Hevery
f3c69e7f6b refactor(ivy): rewrite flatten function to be more memory efficient ()
The `flatten` function used `concat` and `slice` which created a lot of intermediary
object allocations. Because `flatten` is used from query any benchmark which
used query would exhibit high minor GC counts.

PR Close 
2019-05-21 13:06:23 -07:00
Brandon
c9f5f3d802 docs: add section to upgrade guide on lazy loading AngularJS ()
PR Close 
2019-05-21 13:06:01 -07:00
Kara Erickson
a96976e88f fix(core): remove deprecated TestBed.deprecatedOverrideProvider API ()
BREAKING CHANGE

In PR , we fixed a bug in `TestBed.overrideProvider` where
eager providers were not being instantiated correctly. However,
it turned out that since this bug had been around for quite a bit,
many apps were relying on the broken behavior where the providers
would not be instantiated. To assist in the transition, the
`TestBed.deprecatedOverrideProvider` method was temporarily
introduced to mimic the old behavior so that apps would have a
longer time period to migrate their code.

2 years and 3 versions later, it is time to remove the temporary
method. This commit removes `TestBed.deprecatedOverrideProvider`
altogether. Any usages of `TestBed.deprecatedOverrideProvider`
should be replaced with `TestBed.overrideProvider`. This may mean
that providers that were not created before will now be instantiated,
which could mean that your tests need to provide more mocks or stubs
for the dependencies of the newly instantiated providers.

PR Close 
2019-05-21 12:37:17 -07:00
George Kalpakas
ebfbc04000 ci(docs-infra): fix test_docs_examples_ivy job ()
Context:
As part of the `test_docs_examples_ivy` job, we run 5 concurrent builds
on each VM (each for a different example/project). Additionally, all
example projects share the same `node_modules/` (via a symlink to
`aio/tools/examples/shared/node_modules/`), so all concurrent builds
operate on the same files.

Previously, we pre-ran ngcc with `--properties module` to process the
fesm5 bundles. Since we have switched to es2015 in 661a57d9e, we now
need the esm2015 bundles. As a result, the initial ngcc run is
redundant and ngcc runs again during each build (to process the fesm2015
bundles). Since there are 5 concurrent builds, we often end up with
multiple ngcc instances processing the same package and trying to write
to the same directories at the same time, causing a
`file already exists` error

This commit fixes it by pre-processing the esm2015 bundles, so there is
no need to re-run ngcc during each concurrent build.

Fixes 

PR Close 
2019-05-21 12:32:57 -07:00
Brandon
e1af6e3c70 docs: use dynamic import syntax in examples using lazy loading ()
PR Close 
2019-05-21 09:09:35 -07:00
Trotyl Yu
9e946c9715 docs(changelog): remove docs-infra changes ()
PR Close 
2019-05-21 09:06:45 -07:00
Santosh Yadav
0d97143965 docs: correct typo in changelog ()
Fixes 

PR Close 
2019-05-21 09:06:02 -07:00
Miško Hevery
df1d3fbd7b perf(ivy): minor cleanup; prevent sparse arrays ()
PR Close 
2019-05-21 09:04:39 -07:00
Manohar Reddy Poreddy
e946594bf8 docs: move instructions to see changes after the error is fixed in the tutorial ()
docs: List only appears after the error is fixed

When the error happens, the list is not displayed too. Once the error is removed, the heroes list appears, so we can click and see the details.

PR Close 
2019-05-21 09:03:49 -07:00
Ben Lesh
abe4433202 test(ivy): add tests around directive attribute ghosting ()
This battery of tests is to ensure the instructions we are generating have the same behavior in Ivy has they did in ViewEngine.

PR Close 
2019-05-21 09:03:03 -07:00
janith
c79bffaacb docs: remove gender prefixes from examples ()
PR Close 
2019-05-20 16:42:59 -07:00
Fux, Etienne
e58e5ec6a6 docs: improve consistency of style guide example ()
The text for entry Style 04-10 of the style guide talks about
FilterTextService however, the example folder structure has the inversed
filename.

PR Close 
2019-05-20 16:42:16 -07:00
Keen Yee Liau
e688e02ee4 fix(bazel): ng test should run specific ts_web_test_suite ()
PR closes https://github.com/angular/angular/issues/30191

PR Close 
2019-05-20 16:40:11 -07:00
Ben Lesh
d7eaae6f22 refactor(ivy): Move instructions back to ɵɵ ()
There is an encoding issue with using delta `Δ`, where the browser will attempt to detect the file encoding if the character set is not explicitly declared on a `<script/>` tag, and Chrome will find the `Δ` character and decide it is window-1252 encoding, which misinterprets the `Δ` character to be some other character that is not a valid JS identifier character

So back to the frog eyes we go.

```
    __
   /ɵɵ\
  ( -- ) - I am ineffable. I am forever.
 _/    \_
/  \  /  \
==  ==  ==
```

PR Close 
2019-05-20 16:37:47 -07:00
jenniferfell
1c3ee41902 docs: move old quick start content into new local setup guide ()
PR Close 
2019-05-20 10:16:23 -07:00
George Kalpakas
f78bda9ff0 build: add recommended config files for VSCode remote development ()
Add some recommended config files to use (as is or as basis) for setting
up [remote development using docker containers][1] with VSCode. This is
an opt-in feature. See `.devcontainer/README.md` for more info.

The configuration can be further tweaked/improved, but is a good
starting point.

[1]: https://code.visualstudio.com/docs/remote/containers

PR Close 
2019-05-20 10:13:53 -07:00
Miško Hevery
6454f76cf6 refactor(ivy): remove ngPrivateData megamorphic prop access ()
PR Close 
2019-05-20 10:12:07 -07:00
Miško Hevery
28ae22ecb9 refactor(ivy): move renderTemplate into render_util.ts because it is only used in tests ()
PR Close 
2019-05-20 10:12:07 -07:00
George Kalpakas
c1135ee18f build: update version to 8.0.0-rc.4 in package.json ()
PR Close 
2019-05-17 14:25:01 -07:00
George Kalpakas
1114053daa build: remove obsolete branchPattern field from package.json ()
PR Close 
2019-05-17 14:25:00 -07:00
cexbrayat
95830ee584 feat(common): stricter types for SlicePipe ()
Adds overloads to the `transform` methods of `SlicePipe`,
to have better types than `any` for `value` and `any` as a return.
With this commit, using `slice` in an `ngFor` still allow to type-check the content of the `ngFor`
with `fullTemplateTypeCheck` enabled in Ivy:

    <div *ngFor="let user of users | slice:0:2">{{ user.typo }}</div>
                                                        |
                                                        `typo` does not exist on type `UserModel`

whereas it is currently not catched (as the return of `slice` is `any`) neither in VE nor in Ivy.

BREAKING CHANGE
`SlicePipe` now only accepts an array of values, a string, null or undefined.
This was already the case in practice, and it still throws at runtime if another type is given.
But it is now a compilation error to try to call it with an unsupported type.

PR Close 
2019-05-17 14:21:36 -07:00
Brandon Roberts
661a57d9e2 docs: update docs example dependencies to version 8 ()
PR Close 
2019-05-17 14:16:55 -07:00
Alan Agius
660a091f41 ci: increase codefresh memory limit to decrease flakyness of known big tests ()
Such tests are:
```
//packages/language-service/test:test
//packages/bazel/test/ngc-wrapped:ngc_test
```

PR Close 
2019-05-17 13:34:11 -07:00
Alan
7d31f7b540 ci: include more tests in windows ci ()
We added most of the tests excluded the once which are tagged with `browser:chromium-local` as they are currently not working in CI but work locally.

The `--test_tag_filters` option is now passed via command line as it seems that it has no effect as it is passed in both RC and command line. IE command line options are not merged with the RC options but rather overridden.

PR Close 
2019-05-17 13:34:11 -07:00