12702 Commits

Author SHA1 Message Date
Miško Hevery
1cc74eaece ci: fix bad merge 2019-02-13 14:58:22 -08:00
Greg Magolan
e2b3be87cb build(bazel): update to rules_nodejs 0.18.6 (#28699)
PR Close #28699
2019-02-13 12:13:09 -08:00
SebastienBtr
3ca6c928f9 docs(router): change slideInDownAnimation into slideInAnimation (#28640)
In the Routing & Navigation there is a typo - slideInDownAnimation, but it should be slideInAnimation

PR Close #28572

PR Close #28640
2019-02-13 12:03:46 -08:00
Paul Gschwendtner
5933d16f3e build: fix web_worker images example not working (#28562)
The web_worker images example is currently not really usable
because the rendered button that can be used to upload
an "image" to the demo is currently not working. This is because
the HTML markup for the `file-field` is not matching what `materialize-css`
expects. See: https://materializecss.com/text-inputs.html

PR Close #28562
2019-02-13 12:01:55 -08:00
Paul Gschwendtner
0f839bcfd0 build: playground examples do not explicitly specify "ng_module" assets (#28562)
Currently all playground examples are built with NGC, and most
of the HTML resources are automatically inlined. Surprisingly NGC
is able to resolve the relative component assets even though these
aren't specified in the `assets`. This seems to work because NGC
resolves the files in the execroot where the files are present
(if Bazel doesn't use sandboxing).

Issue is tracked with TOOL-667

PR Close #28562
2019-02-13 12:01:55 -08:00
Paul Gschwendtner
edda94edfa build: fix web_worker playground examples using external resources (#28562)
The `web_workers/images` example is not being tested by any e2e
spec and therefore it's technically not necessary to fix that it uses
external resources, though in order to ensure that the Bazel builds
are hermetic and that we can eventually add e2e specs for the
web_worker/image example, we should avoid any use of external
resources.

We remove the `web-animations` polyfill in the `web_workers/animations`
example because we should try to vendor as few as possible deps. Also
the animations API is already supported by browsers we run the e2e tests
against (note here: `web_workers/animations` is currently also disabled)

PR Close #28562
2019-02-13 12:01:55 -08:00
Judy Bogart
b5e36eaa3e docs: add di-related api doc (#27731)
PR Close #27731
2019-02-13 11:59:32 -08:00
Paul Gschwendtner
08a1f51704 build: remove legacy e2e tests job (#28697)
Now that all e2e integration tests within `modules/` have been
migrated to Bazel, we can remove the legacy e2e tests job.

PR Close #28697
2019-02-13 11:54:37 -08:00
Paul Gschwendtner
9690e36f78 build: update instructions to run benchmark tests (#28697)
* Updates the instructions on how to run the benchmark tests.
* Removes the unused `favicon.ico` file and the corresponding Bazel filegroup

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
68e741227b build: convert largeform benchmarks to bazel (#28697)
Switches the `largeform` benchmarks to Bazel.
This is the last remaining e2e test within `modules/`.

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
50a2327520 build: run largetable benchmark tests with bazel (#28697)
PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
b07346c8e3 build: serve largetable benchmark tests with bazel (#28697)
PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
8e95849751 build: fix routing playground example using external resource (#28697)
Currently the "routing" playground example fails the e2e tests
because it tries to load the OpenSans font using an external
HTTP request. External http requests are not allowed (unless
explicitly enabled) within Bazel in order to ensure that
all targets are built and tested in a hermetic way.

In order to work around this issue in a Bazel idiomatic way,
we just vendor the fonts in the "third_party" folder. Note
that we can technically also enable internet for the RBE
host platform, but it's not a best practice for hermeticity.

The following syntax would allow us to enable internet for
RBE (stated here for tracking)

```
properties: {
  name: "dockerNetwork"
  value: "standard"
}
```

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
cd143f67af build: disable failing ivy playground example e2e tests (#28697)
With ed1ba88ffd9d0fc266808413fa517e7a31943bc8 we switched the
examples to run with Bazel. This means that we can now also run the
e2e tests for these examples against Ivy. All playground e2e tests,
**except** the `web_worker` examples, successfully run with Ivy.

The failing webworker e2e tests have been temporarily disabled with
`fixmeIvy` and need to be investigated in a follow-up.

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
dd85351162 build: re-enable upgrade playground example (#28697)
The `upgrade` playground example has been disabled for a
long time because Protractor initially didn't support running
hybrid apps. Now that we use a more recent version of Protractor
that handles hybrid apps (also automatically), we can re-enable
this long-standing disabled test.

Additionally the e2e test logic was outdated and failed because a
CSS selector did not match the template of the upgrade example.
With this change, the CSS selector has been updated to match the
example's template, and also the test has been updated slightly
to also ensure that content projection works.

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
c1c68889de build: run playground e2e examples with bazel (#28697)
PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
866f4be782 build: fix "person_management" playground example (#28697)
Currently when someone serves the "person_management" playground
example, there will be runtime exceptions by `@angular/forms` if
someone clicks on one of the two buttons rendered in the example.

This happens because the example is outdated and the input elements
using `ngModel` do not specify a proper "name" while being inside of
a `<form>` element. A name is required inside of a form. The failure
is not specific to Ivy and is not covered by any test because the e2e
tests for this example are just asserting that the page properly loads
(the error only shows up one of the buttons has been clicked)

This is the reason why these errors were never visibile to the e2e tests.
Though in order to make this example work, we should this fix these failures
so that the example can work as expected.

```
FullNameComponent.html:7 ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form
      control must be defined as 'standalone' in ngModelOptions.

      Example 1: <input [(ngModel)]="person.firstName" name="first">
      Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">
    at Function.TemplateDrivenErrors.missingNameException (template_driven_errors.ts:40)
    at NgModel._checkName (ng_model.ts:319)
    at NgModel._checkForErrors (ng_model.ts:302)
    at NgModel.ngOnChanges (ng_model.ts:215)
    at Object.checkAndUpdateDirectiveInline (provider.ts:208)
    at checkAndUpdateNodeInline (view.ts:429)
    at checkAndUpdateNode (view.ts:389)
    at debugCheckAndUpdateNode (services.ts:431)
    at debugCheckDirectivesFn (services.ts:392)
    at Object.eval [as updateDirectives] (FullNameComponent.html:7)
```

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
80e4019c83 build: switch playground examples to bazel (#28697)
Currently all playground examples are built with `tsc`
and served with the `gulp serve` task. In order to be able
to test these examples easily with Ivy, we now build and
serve the examples using Bazel. This allows us to expand our
Ivy test coverage and additionally it allows us to move forward
with the overall Bazel migration. Building & serving individual
examples is now very easy and doesn't involve building everything
inside of `/modules`.

PR Close #28697
2019-02-13 11:54:36 -08:00
Paul Gschwendtner
d9f3316021 build: fix bazel protractor tests not capturing console output (#28697)
Currently we depend on the "rules_webtesting" version that is
installed by "rules_typescript//:package.bzl". This version of
the webtesting rules comes with a very old version of Chromium
and the `chromedriver` that does not support capturing console
errors properly (with stack traces). Since we have a few e2e
tests that depend on console output (e.g. playground/src/source-map),
we need to make sure that these tests can pass upon Bazel
migration.

**Note for patch version**: Technically this commit is no longer updating
the `rules_webtesting` version because a different PR/commit already updated
the version transitively in `master & patch` and reverted 0094b99176264b27582ab620565632788cab66c5
partially, so in order to keep master and patch in sync, we should not update the
version of `rules_webtesting`.

PR Close #28697
2019-02-13 11:54:36 -08:00
Miško Hevery
424a3b95aa ci: corrected left over merge marker 2019-02-13 10:50:36 -08:00
Miško Hevery
7e883c2319 ci: corrected left over merge marker 2019-02-13 10:41:55 -08:00
Marc Laval
6a7fd70ddf test(ivy): enable more docs examples e2e tests (#28688)
PR Close #28688
2019-02-13 09:54:29 -08:00
Paul Gschwendtner
73f9db53c2 ci: downgrade to sauce-connect v4.5.1 (#28659)
We currently face a lot of flakiness with our
Saucelabs CI jobs. These randomly exceed the 10min
CircleCI no-output limit because something throws
off `sauce-connect` in a long-lasting loop where
it tries to connect to some of their Saucelabs
servers. The initial assumption from the Saucelabs
team was that we might have some invalid firewall
rules, but this does not answer why this happens
_randomly_, so the latest update from the support
is that there have been some changes in the latest
version of `sauce-connect` version that **could**
cause this flakiness.

I've manually did multiple test runs and was only
able to reproduce the issues with v4.5.3 (latest
version), so it might be worth downgrading to
v4.5.1. This is also what the Saucelabs support
proposed us to do (though it's not guaranteed that
v4.5.1 is unaffected by the same issue)

PR Close #28659
2019-02-12 17:23:38 -08:00
Alex Eagle
2bf526bbfb docs: add a README for third_party usage (#28651)
PR Close #28651
2019-02-12 09:54:44 -08:00
Judy Bogart
8bd7d5befc docs: clarify library types integration (#28410)
PR Close #28410
2019-02-11 17:13:45 +00:00
Paul Gschwendtner
aa163bea93 refactor(compiler): allow disabling external symbol factory reexports (#28594)
Currently external static symbols which are referenced by AOT
compiler generated code, will be re-exported in the corresponding
`.ngfactory` files.

This way of handling the symbol resolution has been introduced in
favor of avoding dynamically generated module dependencies. This
behavior therefore avoids any strict dependency failures.

Read more about a particular scenario here: https://github.com/angular/angular/issues/25644#issuecomment-458354439

Now with `ngtsc`, this behavior has changed since `ngtsc` just
introduces these module dependencies in order to properly reference
the external symbol from its original location (also eliminating the need
for factories). Similarly we should provide a way to use the same
behavior with `ngc` because the downside of using the re-exported symbol
resolution is that user-code transformations (e.g. the `ngInjectableDef`
metadata which is added to the user source code), can resolve external
symbols to previous factory symbol re-exports. This is a critical issue
because it means that the actual JIT code references factory files in order
to access external symbols. This means that the generated output cannot
shipped to NPM without shipping the referenced factory files.

A specific example has been reported here: https://github.com/angular/angular/issues/25644#issue-353554070

PR Close #28594
2019-02-11 17:12:51 +00:00
Paul Gschwendtner
2f73c554c9 build: fix invalid bazel target referenced by benchmarks (#28626)
PR Close #28626
2019-02-08 15:13:53 -08:00
Paul Gschwendtner
fb2d15fda1 build: remove outdated polymer tree benchmark (#28568)
The "tree/polymer_leaves" benchmark has no benchmark tests, nor do we install
Polymer anywhere. Polymer was previously installed through `bower`, but since
we removed bower, there is no easy way to run this benchmark with Polymer.

Considering that there are no benchmark tests, nor we have an easy way to
install/vendor Polymer, we should just remove this benchmark app.

This is also based on the assumption that we want to remove the
Polymer benchmarks anyway: see: 8a05199fb9be5ef91ec8094a3c6abc0a65eb6bcd

PR Close #28568
2019-02-08 13:42:03 -08:00
Paul Gschwendtner
018507fa02 build: run tree benchmark tests with bazel (#28568)
PR Close #28568
2019-02-08 13:42:00 -08:00
Paul Gschwendtner
95bb72d322 build: serve benchmark tree examples with bazel (#28568)
PR Close #28568
2019-02-08 13:40:10 -08:00
Paul Gschwendtner
ce6e6c3f81 build: unable to run perf bazel e2e tests on windows (#28568)
Currently it's not possible to run the benchmark e2e tests with Bazel on Windows
because the logic that imports the `perf_util`'s is not using a proper Bazel script
manifest path. A script manifest path should not start with `./angular/`, but rather
with the workspace name (which is in our case `angular/`)

PR Close #28568
2019-02-08 13:37:37 -08:00
Paul Gschwendtner
e4b1bdbfa0 ci: do not install firebase-tools without cache (#28615)
Currently we install `firebase-tools` manually in the
integration tests run script. This is problematic
because it means that we cannot cache `firebase-tools`
properly and Yarn might time out downloading this
dependency. We can safely move this to the top level
`package.json` since Bazel now has a `.bazelignore` and
since we have a cache that works for PRs (with fallback
caching).

Note that the `.bazelignore` is relevant here because
`firebase-tools` has been mainly moved to the bash
script because it broke some Bazel calls.

See 4f0cae067656fa4563417542297c67030d911a36.

PR Close #28615
2019-02-08 10:23:20 -08:00
Nikita Potapenko
6477c9e04a docs(core): fixed code snippets (#28619)
PR Close #28619
2019-02-08 09:27:24 -08:00
George Kalpakas
3f380b3b78 test(upgrade): change flaky test to not be affected by other tests (#28617)
It seems that in some cases (especially on CI), global state is not
cleaned up properly causing a specific test to fail.
See #28045 and #28181 for more context.

This PR restores the global state for the affected test. This partly
defeat the purpose of the test, but is better than having flakes on CI.

Fixes #28614

PR Close #28617
2019-02-08 09:27:03 -08:00
Alex Eagle
c4c0e9dbc5 docs: update merge label meaning (#28574)
PR Close #28574
2019-02-08 09:25:05 -08:00
Igor Minar
4ddf57c58d ci: add all required statuses to the requiredStatuses list for angular-robot (#28613)
Somehow the current list ommits quite a few important targets. Especially the cla and google3.

This changes adds all the statuses that must always be present and green for this agregate state expised as "ci/angular: merge status" to be green.

PR Close #28613
2019-02-08 09:20:29 -08:00
Nikita Potapenko
624f01c311 docs(core): fixed typo (#28618)
PR Close #28618
2019-02-08 09:19:40 -08:00
Sebastian Dorn
6a713521e3 docs(aio): add Happy Angular Podcast to resources (#28407)
PR Close #28407
2019-02-07 21:57:08 -08:00
Filipe Silva
57a5ba3438 ci: use fallback caches (#28545)
This PR adds fallback cache hits for partial cache restoration.

PR Close #28545
2019-02-07 16:45:54 -08:00
Vladimir Moskva
1b6fb5bc19 refactor(common): Remove deprecated FileType (#28583)
FileType objects are deprecated. They are not required for specifying valid file types for rule attributes, a list of strings can be used instead.

PR Close #28583
2019-02-07 16:45:23 -08:00
Vani
bd9da268c1 docs: update HttpHeader documentation (#26233)
PR Close #26233
2019-02-07 16:42:13 -08:00
stoneLeaf
1e58a2194f fix(router): redirect to root url when returned as UrlTree from guard (#28271)
When a UrlTree of root url was returned by a guard as a redirection, the
navigation was not processed. The issue came from the error handler which
incorrectly marked the router as already navigated.

Fixes #27845

PR Close #28271
2019-02-06 21:23:33 -08:00
George Kalpakas
da81c9cb54 build(docs-infra): use pinned dependencies when possible in ng-packages-installer (#28510)
Previously, `ng-packages-installer` would replace the version ranges for
all dependencies that were peer dependencies of an Angular package with
the version range used in the Angular package. This effectively meant
that the pinned version (from `yarn.lock`) for that dependency was
ignored (even if the pinned version satisfied the new version range).

This commit reduces non-determinism in CI jobs using the locally built
Angular packages by always using pinned versions of dependencies for
Angular package peer dependencies if possible.

For example, assuming the following versions for the RxJS dependency:

- **aio/package.json**: `rxjs: ^6.3.0`
- **aio/yarn.lock**: `rxjs@^6.3.0: 6.3.3`
- **@angular/core#peerDependencies**: `rxjs: ^6.0.0`

...the following versions would be used with `ng-packages-installer`:

- Before this commit:
  - **aio/package.json**: `rxjs: ^6.0.0`
  - **node_modules/rxjs/**: `6.4.0` (latest version satisfying `^6.0.0`)
- After this commit:
  - **aio/package.json**: `rxjs: ^6.3.0`
  - **node_modules/rxjs/**: `6.3.3` (because it satisfies `^6.0.0`)

PR Close #28510
2019-02-06 21:23:03 -08:00
George Kalpakas
ef6d26d4fa build(docs-infra): keep other dependencies pinned when installing local Angular packages (#28510)
`ng-packages-installer` can be used to replace Angular packages with
locally built ones (from `dist/packages-dist/`) along with their peer
dependencies.

Previously, in order to achieve this, `yarn install` was called with the
`--no-lockfile` option, which resulted in installing the latest versions
of all dependencies (including transitive ones) permitted by the
corresponding version ranges in `package.json` files. As a result, newly
released versions would be picked, resulting in unexpected,
non-deterministic breakages in CI.

This commit calls `yarn install` with the `--pure-lockfile` option
instead. As a result, only the Angular packages (for which the locally
built ones are used) and their peer dependencies are unpinned; the
pinned versions from `yarn.lock` are used for all other (direct and
transitive) dependencies.

While this does not eliminate non-determinism across builds, it
significantly reduces it.

PR Close #28510
2019-02-06 21:23:03 -08:00
George Kalpakas
13bc1cd853 perf(docs-infra): avoid unnecessary I/O operation in ng-packages-installer (#28510)
PR Close #28510
2019-02-06 21:23:03 -08:00
George Kalpakas
1fa1379318 refactor(docs-infra): format package.json for readability in ng-packages-installer (#28510)
PR Close #28510
2019-02-06 21:23:03 -08:00
George Kalpakas
d9efacc07e build(docs-infra): remove unnecessary workaround for RxJS in ng-packages-installer (#28510)
Since b43f8bc7d, RxJS does not need to be patched any more in the
top-level `node_modules/`, so we don't need to special-case RxJS in
`ng-package-installer` and use `node_modules/rxjs/`.

PR Close #28510
2019-02-06 21:23:03 -08:00
cexbrayat
47f5b5f2d4 docs(service-worker): note about isStable/setInterval (#28102)
The docs don't mention that the app will never be stable if a `setInterval` is running somewhere, and that it will prevent the servcie worker to be registered too.

PR Close #28102
2019-02-06 15:13:20 -05:00
cexbrayat
019fe77f64 docs(core): document isStable traps (#28102)
PR Close #28102
2019-02-06 15:13:19 -05:00
Matias Niemelä
a0e3a8e0f7 build: fix revert issue with bitmap.ts (#28576)
PR Close #28576
2019-02-06 15:09:34 -05:00