Compare commits

..

243 Commits

Author SHA1 Message Date
0f37ed1060 release: cut the v7.2.3 release 2019-01-30 11:42:59 -08:00
5c85b4f1e9 docs: add Jeff Cross to contributors (#28432)
PR Close #28432
2019-01-29 16:41:32 -08:00
22bc6ef22a docs: fix typo for Browserslist in build guide (#28328)
PR Close #28328
2019-01-29 16:35:27 -08:00
bf928d1c9e docs: fix typo for Browserslist in file structure guide (#28312)
PR Close #28312
2019-01-29 16:33:19 -08:00
d11c2f915b docs: fix typo in lifecycle-hooks.md (#28206)
## PR Checklist
Please check if your PR fulfills the following requirements:
 
* [x]  The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
* [ ]  Tests for the changes have been added (for bug fixes / features)
* [x]  Docs have been added / updated (for bug fixes / features)
 
## PR Type
What kind of change does this PR introduce?

* [ ]  Bugfix
* [ ]  Feature
* [ ]  Code style update (formatting, local variables)
* [ ]  Refactoring (no functional changes, no api changes)
* [ ]  Build related changes
* [ ]  CI related changes
* [x]  Documentation content changes
* [ ]  angular.io application / infrastructure changes
* [ ]  Other... Please describe:

## What is the current behavior?
Issue Number: N/A

## What is the new behavior?
## Does this PR introduce a breaking change?
* [ ]  Yes
* [x]  No

## Other information
PR Close #28206
2019-01-29 16:32:03 -08:00
98c99e5073 docs: angular.kr link added (#28113)
PR Close #28113
2019-01-29 16:31:38 -08:00
2c63108faa docs(core): add relative path information to component metadata (#27962)
Adds the information that the templateUrl and styleUrls options supports only relative Urls.

Adds more information about relative paths and absolute URLs in project metadata.

PR Close #27962
2019-01-29 16:31:12 -08:00
0ff48a1266 style: change to American English (#27266)
PR Close #27266
2019-01-29 16:30:26 -08:00
ea2a3f8335 Revert "build: switch example e2e tests to bazel (#28402)" (#28438)
This reverts commit ef78e33560.

PR Close #28438
2019-01-29 16:20:27 -08:00
cbed4851a3 Revert "test: disable failing ivy example e2e tests (#28402)" (#28438)
This reverts commit 351610ca8d.

PR Close #28438
2019-01-29 16:20:27 -08:00
7c157780a9 docs: fix Redundant "See also:" link in ContentChild (#28334)
PR Close #28334
2019-01-29 12:03:26 -08:00
cc1b2a5373 perf: yarn version upgrade (#28360)
PR Close #28360
2019-01-29 11:58:48 -08:00
5076185fc8 fix(docs-infra): add hamburger button to CLI COMMANDS section (#28418)
Currently, when we navigate in the `CLI COMMANDS` section, the "hamburger button" isn't present because the class css `folder-cli` is missing.
This PR add this class in order to show this button when we are in this section.

PR Close #28418
2019-01-29 11:48:34 -08:00
65375f4c21 fix(docs-infra): boolean options default value is incorrect when it's undefined (#27024)
In the CLI when it's undefined it can mean `false`, or sometimes it will be overwritten by a runtime value.

PR Close #27024
2019-01-28 20:43:16 -08:00
068a6070dc docs(docs-infra): add ng-India to events list (#28119)
docs: add ng-India to events list
PR Close #28119
2019-01-28 20:18:52 -08:00
47e9761a01 build: improve compiler-cli codegen output test (#28191)
* Improves the `compiler-cli/integrationtest` codegen output test slightly by using a more clear test description and by adding an assertion that ensures that decorators are downleveled.

PR Close #28191
2019-01-28 20:07:23 -08:00
bef52d20b5 build: fix outdated ngtools compiler-cli test logic (#28191)
* Fixes that the test logic for `ngtools` in the offline compiler test is no longer working due to being unmaintained for a long time
* Makes the path comparison logic platform agnostic, so that the tests can be also executed on Windows

PR Close #28191
2019-01-28 20:07:23 -08:00
fe50710021 build: fix outdated i18n compiler-cli test assertions (#28191)
PR Close #28191
2019-01-28 20:07:23 -08:00
71b66fb862 build: run offline_compiler_test using bazel (#28191)
PR Close #28191
2019-01-28 20:07:23 -08:00
8db05b408e test(bazel): Integration test for Sass support (#28297)
Add .sass files to the integration test for bazel-schematics.

Also addressed Alex's comment in
https://github.com/angular/angular/pull/28167/files#r248149866
about the unit tests being too brittle.

PR Close #28297
2019-01-28 20:01:19 -08:00
351610ca8d test: disable failing ivy example e2e tests (#28402)
PR Close #28402
2019-01-28 19:21:10 -08:00
ef78e33560 build: switch example e2e tests to bazel (#28402)
* No longer builds the example e2e tests using "tsc". The examples are now built with Bazel and can therefore be built with Ivy by using the `--define=compile=aot` switch.
* No longer runs the example e2e tests using the protractor CLI. example e2e tests are executed with the Bazel protractor rule and can therefore run incrementally.

NOTE: Unit tests found within the examples are still running within the legacy jobs.

PR Close #28402
2019-01-28 19:21:10 -08:00
12b8a6e351 fix(bazel): Builder should invoke local bazel/iblaze (#28303)
Builder for `@angular/bazel` schematics should not expect bazel/ibazel
to be on the PATH. It should instead invoke the local executable
installed by yarn/npm.

PR Close #28303
2019-01-28 12:01:36 -08:00
260ac20e92 fix(bazel): Bazel-workspace schematics should run in ScopedTree (#28349)
Users should be able to add Bazel workspace to an existing project.
The current approach assumes that the schematics is working on the same
tree as that of ng-new, which includes the top-level directory. Instead,
the schematic should work on the tree rooted at `appRoot` to enable
Bazel files to be added to existing project.

This change uses the newly implemented ScopedTree
a0ac4b0e3d
to achieve this.

NOTE: The version of `@angular-devkit/schematics` that is installed is
used to run the `@angular/bazel` schematic. Even if a different version
is used in the schematic itself, it has no effect.
Therefore, the *latest* Angular CLI should be used to generate the
files. As of this commit, the latest version is @angular/cli@7.3.0-rc.0

PR Close #28349
2019-01-28 12:00:16 -08:00
aed48e00d2 build: update sauce connect version (#28378)
PR Close #28378
2019-01-28 11:55:07 -08:00
a9d46e4952 fix(bazel): ng-new should run yarn install (#28381)
yarn install was disabled in ng-new for Bazel schematics because
Bazel manages its own node_modules dependencies and therefore
there is no need to install dependencies twice.

However, the first yarn install is needed for `ng` commands to work,
most notably `ng build`.

This commit restores the original behavior.

PR Close #28381
2019-01-28 11:54:37 -08:00
2f19ad9b46 fix(docs-infra): upgrade codelyzer to 4.5.0 (#28389)
PR Close #28389
2019-01-28 11:51:57 -08:00
81678e62db build(bazel): update to bazel 0.22.0 and turn on --incompatible_strict_action_env flag (#28404)
PR Close #28404
2019-01-28 11:48:42 -08:00
cf82fbceba build: set a default module_name for ts_library rules (#28051) (#28241)
PR Close #28051

PR Close #28241
2019-01-25 12:52:27 -08:00
1d67cb0ce1 test(docs-infra): increase timeout for redirection tests more (#28290)
Occasionally, external URLs take even longer than the previously set 60s
to load, which causes CI flakes.

PR Close #28290
2019-01-25 12:51:38 -08:00
318bd83a6e test(docs-infra): unregister the SW after each test (#28290)
This ensures that the SW is cleaned up, even in cases where
synchronization is disabled (and thus the clean-up inside `goTo()`
happens without waiting for Angular).

PR Close #28290
2019-01-25 12:51:38 -08:00
f767c22b31 test(docs-infra): unregister the SW after waitForAngular() (#28290)
This increases the chances that the clean-up will take place _after_ the
SW has been registered.

PR Close #28290
2019-01-25 12:51:38 -08:00
8346a6dca2 test(docs-infra): properly report errors if page.init() fails/rejects (#28290)
For asynchronous callbacks, this can be done either by calling
`done.fail()` or by returning the promise directly (without requesting a
`done` callback). (Using the latter, because it is shorter.)

PR Close #28290
2019-01-25 12:51:37 -08:00
6397885e74 test(bazel): Cleanup bazel-schematics integration test (#28351)
PR Close #28351
2019-01-25 12:47:27 -08:00
8cee56e8c5 fix(bazel): add @npm//tslib dep to e2e ts_library target in bazel-workspace schematic (#28358)
PR Close #28358
2019-01-25 12:38:35 -08:00
a1b9995731 refactor(router): initalize browserUrlTree to empty tree (#28376)
The value here is unimportant on initialization since it's not looked at until the second navigation. However, sometimes in testing  the `Location` service is mocked out, or the Router constructor manually called. Assuming `Location` exists in the constructor leads to test failures in `google3` therefore we initialize to a value that will not cause errors.

PR Close #28376
2019-01-25 12:37:57 -08:00
35f7ff047a docs: add api doc for ngif (#27376) (#28344)
PR Close #27376

PR Close #28344
2019-01-24 15:45:06 -08:00
4ad691a33d docs: add api doc for ngfor (#27377) (#28344)
PR Close #27377

PR Close #28344
2019-01-24 15:45:06 -08:00
c5af3f8617 docs: add api doc to template_ref (#28344)
PR Close #28344
2019-01-24 15:45:06 -08:00
bc1032866c fix(docs-infra): change the key used to find out the cli section (#28293)
PR Close #28293
2019-01-24 15:41:45 -08:00
63e6d1a896 docs(docs-infra): show top menu at 992px screen width (#26418)
Show top menu at 992px screen width. The JS expression was checking just for screen widths
strictly greater than 992px to show the menu, while the CSS media query was showing the hamburger
icon just for screen widths strictly smaller than 992px, so there was a gap of 1px that the user
could't navigate through the top menu.

closes #24324

PR Close #26418
2019-01-24 10:26:55 -08:00
cb9fd9b4d7 feat(docs-infra): saves the scroll position before the change of location (#28037)
Issue #27916, #17308

PR Close #28037
2019-01-24 10:24:43 -08:00
d5dca0764c fix(docs-infra): align property names to the top (#28104)
This looks better when the property descriptions span multiple lines;
especially when scrolling to a specific property (e.g.
[AbstractControl#status][1]).

[1]: https://next.angular.io/api/forms/AbstractControl#status

PR Close #28104
2019-01-24 10:24:04 -08:00
bcd1a09dec refactor(docs-infra): remove unused CSS style rule (#28104)
The `.properties-table` selector does not match any element and the
styles don't look relevant for the similarly named `.property-table`
class.

PR Close #28104
2019-01-24 10:24:04 -08:00
898c0134e7 docs: fix typo and add parenthesis to method in HTTP tutorial (#28289)
Merge remote-tracking branch 'origin/TOH' into TOH


PR Close #28289
2019-01-24 10:23:25 -08:00
763d2150cc docs(animations): fix group and sequence function usage examples (#28305)
animate functions now contain style functions instead of plain objects
e.g. animate(1s, { background: black }))
to   animate(1s, style({ background: black }))

PR Close #28305
2019-01-24 10:21:35 -08:00
beacbfcb8e build(docs-infra): upgrade cli command docs sources to 699743282 (#28329)
Updating [angular#7.2.x](https://github.com/angular/angular/tree/7.2.x) from [cli-builds#7.2.x](https://github.com/angular/cli-builds/tree/7.2.x).
Relevant changes in [commit range](02d2ec250...699743282):

**Modified**
- help/generate.json
- help/new.json

PR Close #28329
2019-01-24 10:18:56 -08:00
f72319cf6e docs(router): removed additional to (#25989)
PR Close #25989
2019-01-23 11:00:20 -08:00
5877b3f702 refactor: remove unused parameter in _main method invocation (#28203)
PR Close #28203
2019-01-23 10:58:39 -08:00
cf310ba1fa refactor: fix code style (#28203)
PR Close #28203
2019-01-23 10:58:38 -08:00
c2d2953ee4 refactor: remove unused parameters (#28203)
PR Close #28203
2019-01-23 10:58:38 -08:00
5c5fe34241 release: cut the v7.2.2 release 2019-01-22 15:27:48 -08:00
32737a6bf7 fix(router): skipLocationChange with named outlets (#28301)
With #27680, a bug was fixed where multiple redirects using `eager` URL update could cause navigation to fail. However, that fix introduced a problem where with `skipLocationChange` enabled, the URL tree rendered was not properly stored for reference. This specifically caused an issue with named router outlets and subsequent navigations not being recognized.

This PR stores the correct `UrlTree` for reference with later navigations. It fixes the regression introdued with #27680.

Fixes #28200

PR Close #28301
2019-01-22 15:15:34 -08:00
7642308c14 docs: correct array to map (#27379)
PR Close #27379
2019-01-22 12:16:46 -08:00
f1c08d83b0 docs: add input doc (#27379)
PR Close #27379
2019-01-22 12:16:46 -08:00
617412f9c3 docs: add api doc for ng_style directive (#27379)
PR Close #27379
2019-01-22 12:16:46 -08:00
cf716684a9 build: hide vscode settings e.g. debug launch config (#28299)
PR Close #28299
2019-01-22 11:38:16 -08:00
54565ed389 docs: fix crisis-detail milestone files (#27025)
Crisis Detail's template was being added two times and the component's TS none.
PR Close #27025
2019-01-22 11:19:51 -08:00
ab08385336 build: create dist/bin symlink with Bazel outputs (#27781)
Note that we had nasty problems in the past when this was enabled, but those have supposedly been fixed.

PR Close #27781
2019-01-22 09:52:46 -08:00
eb8ccf65d1 fix(docs-infra): removal of the use of the ChildNode.remove() method that it isn't supported by IE (#28188)
fixes #28177

PR Close #28188
2019-01-22 09:48:20 -08:00
cb93027f32 build: Fix gulp format for Node >= 10.14 (#28213)
With Node.js v10.14 and greater, running `yarn gulp format` produces
the following error:

```
$ nvm current
v10.15.0
$ yarn gulp format:changed
yarn run v1.12.3
$ /usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/.bin/gulp format:changed
internal/util/inspect.js:31
const types = internalBinding('types');
              ^

ReferenceError: internalBinding is not defined
    at internal/util/inspect.js:31:15
    at req_ (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:137:5)
    at require (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:110:12)
    at util.js:25:21
    at req_ (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:137:5)
    at require (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:110:12)
    at fs.js:42:21
    at req_ (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/usr/local/google/home/kyliau/Documents/GitHub/angular/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:99)
```

A search on GitHub reveals this issue is due to natives@1.1.4:
gulpjs/gulp#2246

```
$ yarn why natives
yarn why v1.12.3
[1/4] Why do we have the module "natives"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "natives@1.1.6"
info Reasons this module exists
   - "gulp#vinyl-fs#graceful-fs" depends on it
   - Hoisted from "gulp#vinyl-fs#graceful-fs#natives"
   - Hoisted from "browserstacktunnel-wrapper#unzip#fstream#graceful-fs#natives"
```

The solution is to add a manual resolution for natives@1.1.6

PR Close #28213
2019-01-22 09:45:51 -08:00
607fd8e970 refactor: remove unused case in switch statement (#28253)
PR Close #28253
2019-01-22 09:44:35 -08:00
f4ac96d0ff style(docs-infra): Active tslint rule semicolon (#28282)
PR Close #28282
2019-01-22 09:38:45 -08:00
1c7d156abd ci: add a rebase check to the merge-pr script (#28250)
Adds a check to verify that each PR branch to be merged upstream contains SHAs of commits that significantly changed our CI infrastructure.

This check is used to enforce that we don't merge PRs that have not been rebased recently and could result in merging of non-approved or otherwise bad changes.

PR Close #28250
2019-01-22 09:26:54 -08:00
4c00059260 feat(compiler-cli): resolve generated Sass/Less files to .css inputs (#28166)
Users might have run the CSS Preprocessor tool *before* the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

We assume that the preprocessor does a trivial 1:1 mapping using the same
basename with a different extension.

PR Close #28166
2019-01-18 09:49:19 -08:00
93d78c9c51 build(bazel): Use local rollup & build-optimizer for ng_rollup_bundle (#28215)
The current build workflow depends on cross workspace dependency by
installing angular-cli as a Bazel repository. This is not ideal because
it introduces separate node_module directories other than the one
installed by Angular through the yarn_install rule (ngdeps).

This commit removes angular-cli from the Bazel workspace and installs
rollup and @angular-devkit/build-optimizer locally.

PR Close #28215
2019-01-18 09:07:53 -08:00
49bee4c0d8 ci(docs-infra): do not automatically post preview comments on PRs for team (#28211)
Right now, we post such comments whenever a file has been touched that
could potentially have affected the docs. Since the API docs are built
from comments in the source code, almost all non-docs changes are
generating such preview comments, even though most of the time they are
irrelevant to the author and create unnecessary noise on the PR
(especially for actively worked-on PRs).

This commit removes the `team` GitHub team from the list of teams whose
members will automatically get preview comments.
(Adding the `aio: preview` label would still work on any PR.)

Jira: FW-967

PR Close #28211
2019-01-17 14:11:43 -08:00
d8c75f1bb0 docs: fix comments in services example (#26194)
PR Close #26194
2019-01-16 17:38:24 -08:00
6d40ef2d6b fix(docs-infra): improve a11y (#28086)
Issue #27723

PR Close #28086
2019-01-16 17:37:46 -08:00
4ea6c27dcf build(bazel): Use @angular/cli from root package.json (#28139)
A few integration tests now depend on @angular/cli.

This commit changes the affected tests to use the dependency
on @angular/cli defined at root package.json.

PR Close #28139
2019-01-16 17:37:23 -08:00
a4d9192fbc feat(bazel): Add support for SASS (#28167)
This commit adds the appropriate rules to the WORKSPACE for a project
that requires SASS support.

PR Close #28167
2019-01-16 17:35:55 -08:00
7b772e93a3 fix(bazel): Fix integration test after v8 bump (#28194)
The integration test for bazel-schematics installs Angular in
two different locations:

1. Bazel workspace
2. package.json -> fetched from npm

Pull request #28142 changes the test to always install (1) from
source. This breaks when there's a major version bump since the
versions locally and the version in package.json no longer match.

This change updates package.json to fetch @angular/* packages
locally as well.

PR Close #28194
2019-01-16 16:50:52 -08:00
05168395b0 release: cut the v7.2.1 release 2019-01-16 13:23:06 -08:00
03293c4fec fix(ivy): normalize summary and factory shim files paths (#28173)
At the moment, paths stored in `maps` are not normalized and in Windows is causing files not to be found when enabling factory shimming.

For example, the map contents will be
```
Map {
  'C:\\git\\cli-repos\\ng-factory-shims\\index.ngfactory.ts' => 'C:\\git\\cli-repos\\ng-factory-shims\\index.ts' }
```

However, ts compiler normalized the paths and is causing;
```
error TS6053: File 'C:/git/cli-repos/ng-factory-shims/index.ngfactory.ts' not found.
error TS6053: File 'C:/git/cli-repos/ng-factory-shims/index.ngsummary.ts' not found.
```

The changes normalized the paths that are stored within the factory and summary maps.

PR Close #28173
2019-01-16 11:56:53 -08:00
479019f457 test(upgrade): clean up global state after test (#28181)
In ngUpgradeLite, when a downgraded component
[requests its downgraded module][1], the AngularJS injector is
[temporarily stored][2] with the intention of grabbing it
[once the module has been bootstrapped][3] (which also cleans up the
[temporary injector reference][4]).

In [some tests][5], bootstrapping a component might throw an error,
which causes the test to fail immediatelly and move on to the next
test. In slow browsers (e.g. on CI/Saucelabs), the (successful)
bootstrapping of another downgraded module might not have been
completed in time and thus the temporary injector reference not cleaned
up.

In such a case, if the following test (in our randomized test suite)
happens to rely on the temporary injector reference's being initially
unset (such as [this test][6]), it will fail. This might appear as a
flake on CI, because it depends on a race condition and specific order
of tests, so it usually goes away after a rerun.

This commit fixes it by ensuring the temporary injector reference is
manually cleaned up, when necessary.

Jira issue: FW-939

[1]: f983e99fb2/packages/upgrade/src/common/downgrade_component.ts (L120)
[2]: f983e99fb2/packages/upgrade/src/static/downgrade_module.ts (L165)
[3]: f983e99fb2/packages/upgrade/src/static/downgrade_module.ts (L169)
[4]: f983e99fb2/packages/upgrade/src/static/angular1_providers.ts (L25)
[5]: f983e99fb2/packages/upgrade/test/static/integration/downgrade_module_spec.ts (L1331-L1381)
[6]: f983e99fb2/packages/upgrade/test/static/angular1_providers_spec.ts (L31-L45)

PR Close #28181
2019-01-16 11:56:53 -08:00
68515818b9 perf(platform-server): use shared DomElementSchemaRegistry instance (#28150) (#28151)
Right now the `ServerRendererFactory2` creates a new instance of the
`DomElementSchemaRegistry` for each and every request, which is quite
costly (for the Tour of Heroes SSR this takes around **30%** of the
overall execution time). Since the schema is never modified, but only
used in a read-only fashion, it should be possible to re-use a single
instance instead.

Naive performance testing with 100 concurrent connections and 1000
requests in total shows an approximate **33%** improvement in Req/Sec
on the Tour of Heroes SSR example.

PR Close #28150

PR Close #28151
2019-01-16 11:56:53 -08:00
8bc369f828 docs(router): add clarification for Router config (#28159)
PR Close #28159
2019-01-16 11:56:53 -08:00
3d1a4d5cc3 docs: add api doc for switch directives (#27378)
PR Close #27378
2019-01-16 11:56:53 -08:00
5c56b778e0 docs(core): fix typo (#28042)
PR Close #28042
2019-01-16 11:56:53 -08:00
585e871c96 fix(service-worker): navigation urls backwards compatibility (#27244)
PR Close #27244
2019-01-16 11:56:53 -08:00
6ae7aee2c3 fix(router): ensure URL is updated after second redirect with UrlUpdateStrategy="eager" (#27680)
Navigating to a route such as `/users`, you may get redirected to `/login`. Previously, if you go then route to `/users` again the URL will end up showing `/users` after the second redirect. This only happened in `UrlUpdateStrategy="eager"`. This is now fixed so after the second redirect, the URL shows the correct page.

Fixes #27116

PR Close #27680
2019-01-16 11:56:53 -08:00
701270d039 test(bazel): Use local_repository to load Angular (#28142)
The current integration test for Bazel schematics downloads a
published version of Angular as required by the http_archive
rule in the CLI created WORKSPACE.
However, this makes the test less useful because it does not
actually test any changes to the Angular repo at source.
This PR replaces the http_archive method in the WORSPACE
with local_repository so that any local changes to the Angular
repo are tested accordingly.

With Typescript 3.2, the file e2e/src/app.po.ts generated by CLI
no longer compiles under Bazel due to missing type annotations.
A temporary file is placed in the integration/bazel-schematics
directory while the change is pending in CLI repo.
https://github.com/angular/angular-cli/pull/13406

PR Close #28142
2019-01-16 11:56:53 -08:00
02a852a34a fix(bazel): Bazel schematics should add router package (#28141)
This commit fixes a bug whereby a Bazel project created by the
schematics would not compiled if project contains routing module.

It is missing a dependency on the router package.

PR Close #28141
2019-01-16 11:56:52 -08:00
531f940212 docs(ivy): remove duplicated words in architecture doc (#27471)
PR Close #27471
2019-01-16 11:56:52 -08:00
de80f1b6dd docs: update testing doc example style for HostListener (#26372)
HostListener is preferred over host metadata by official style guide

PR Close #26372
2019-01-16 11:56:52 -08:00
ca3965afe0 fix(bazel): incorrectly always uses ngc-wrapped from "npm" workspace (#28137)
* This is a follow-up to cd0451305a which fixes that "ngc-wrapped" from the "npm" workspace is always used if "angular" is fetched as an external dependency.

PR Close #28137
2019-01-16 11:56:52 -08:00
f269e433a7 docs: ng config link fix (#28115)
Fixed 'ng config' link to lead to proper CLI command site
PR Close #28115
2019-01-16 11:56:52 -08:00
8750b09fca fix(docs-infra): Add crossed through styling (#28111)
PR Close #28111
2019-01-16 11:56:52 -08:00
ea2eef737b fix(docs-infra): change style of deprecated markers (#28111)
PR Close #28111
2019-01-16 11:56:52 -08:00
0ceab97a03 fix(docs-infra): render deprecated markers for CLI command options (#28111)
fixes #27563
fixes #27423

PR Close #28111
2019-01-16 11:56:52 -08:00
fbbdaaacc0 fix(bazel): replay compilation uses wrong compiler for building esm5 (#28053)
With the update to TypeScript 3.2.x, a big issue seems to have appeared for downstream Bazel users. If the downstream user still uses a lower TypeScript version, normal Bazel targets using the `ng_module` rule are still compiled with the correct/old TypeScript version (assuming they set the `node_modules` attribute properly).

But, if they build the previous Bazel targets by specifying them within a `ng_package` rule, the TypeScript version from the Angular `workspace` is being used for the replayed ESM5 compilation. This is because we resolve the replay compiler to `ngc_wrapped` or `tsc_wrapped` Bazel executables which are defined as part of the `angular` workspace. This means that the compilers are different if the downstream user uses `ngc-wrapped` from the `@npm` repository because the replayed compilation would use the compiler with `@ngdeps//typescript`.

In order to fix this, we should just use the compiler that is defined in the `@angular//BUILD.bazel` file. This target by defaults to the "@npm" workspace which is working for downstream users. This is similar to how it is handled for `tsc-wrapped`. `tsc-wrapped` works as expected for downstream users.

**Note**: This is not the ideal solution because ideally we would
completely respect the `compiler` option from the base `ng_module`, but
this is not possible in a hermetic way, unless we somehow accept the
`compiler` as an attribute that builds all transitive deps. This is
something we should explore in the future. For now, we just fix this in
a reasonable way that is also used for `tsc_wrapped` from the TypeScript
rules.

PR Close #28053
2019-01-16 11:56:52 -08:00
080de58a88 refactor(bazel): use web_package rule for index.html (#27995)
index.html needs to have the zone.js and the project bundle injected
using script tags. This used to be done explicitly by specifying a
new index.html but with `web_package` rule introduced in rules_nodejs,
it is now possible to perform the injection dynamically.

PR Close #27995
2019-01-16 11:56:52 -08:00
5390948360 docs: fix typo in singleton services guide (#27948)
PR Close #27948
2019-01-16 11:56:51 -08:00
0d860051af docs: change in(what should I import? answer) NgModule FAQs (#27677)
I think only should be after BrowserModule , because we can import more than BrowserModule and I think we need to import other modules to AppModule in most of cases and we should import BrowserModule only in AppModule,so that thing seems okay.

PR Close #27677
2019-01-16 11:56:51 -08:00
edbba24b60 docs: fix typo in dependency injection guide (#27616)
~~`HeroService` must provided in some parent injector~~
*`HeroService` must be provided in some parent injector*

PR Close #27616
2019-01-16 11:56:51 -08:00
6ae8d7691d docs: fix typo in docs.md (#27484)
Added a period to the end of the last sentence in the first paragraph
PR Close #27484
2019-01-16 11:56:51 -08:00
af3cf36ce9 docs: ngComponentOutlet doc updated with new Injector creation (#27291)
PR Close #27291
2019-01-16 11:56:51 -08:00
1be2f11965 docs: updates to minor spelling mistakes in pipes guide (#27208)
PR Close #27208
2019-01-16 11:56:51 -08:00
495ce325b2 docs: add browser polyfills for IE11 with hash-based routing (#27135)
Closes #26511

PR Close #27135
2019-01-16 11:56:51 -08:00
92411043d1 docs: fix GitHub pages deployment command (#26896)
closes #26803
PR Close #26896
2019-01-16 11:56:51 -08:00
aa3f75b3c9 docs: minor wording change in code example comment (#26835)
PR Close #26835
2019-01-16 11:56:51 -08:00
d64aadf57a docs: fix typo in testing guide (#26828)
PR Close #26828
2019-01-16 11:56:51 -08:00
51f7f081a3 docs: update link in universal guide (#26628)
Link to the document "53 percent of mobile site visits" was changed, updated link. Old link led to a page that didn't have the statistics on it.

PR Close #26628
2019-01-16 11:56:50 -08:00
b9fd62413f docs: fix scripts section and some minor issues in universal documentation (#26444)
PR Close #26444
2019-01-16 11:56:50 -08:00
c5664bf245 test(docs-infra): increase timeout for all redirection tests (#28103)
Occasionally, URLs take longer to load, which causes CI flakes.
In #27903, the timeout for external URLs was increased, but internal
URLs turned out to be affected as well.

PR Close #28103
2019-01-16 11:56:50 -08:00
c66a076614 docs: add library doc to guides in aio (#27581)
PR Close #27581
2019-01-16 11:56:50 -08:00
28d34b699d fix(bazel): Add ibazel to deps of Bazel project (#28090)
Incremental rebuilds is a fundamental part of the development
workflow. `@bazel/ibazel` should be added to the dev dependencies
of a Bazel project.

PR Close #28090
2019-01-16 11:56:50 -08:00
47840bee71 docs(forms): fix up @see tags for AbstractContol (#28069)
PR Close #28069
2019-01-16 11:56:50 -08:00
305331f634 build(docs-infra): render @see information in members (#28069)
Previously `@see` tags were only rendered for top level class-like
docs. Now these tags are rendered for methods and properties too.

PR Close #28069
2019-01-16 11:56:50 -08:00
5e6c24cb01 build: update version in package.json (#28075)
The version was updated on master (with 0efbb3738), but the commit was
not backported to 7.2.x. As a result, the version on angular.io appears
as `7.2.0-rc.0` (instead of 7.2.0).

PR Close #28075
2019-01-16 11:56:40 -08:00
0ec4e1372a docs(service-worker): fix example of manually checking for updates (#28020)
Poll for updates in a way that does not prevent the SW from being
registered. Discussed in https://github.com/angular/angular/pull/27332#pullrequestreview-179504620.

PR Close #28020
2019-01-16 11:55:47 -08:00
84c1bad3a1 style(service-worker): fix code formatting in service-worker-getting-started example (#28020)
PR Close #28020
2019-01-16 11:55:47 -08:00
1640832f56 docs(service-worker): fix the service-worker-getting-started docs example (#28020)
Changes:
- Change the project type to `service-worker`, so that it gets
  appropriate `package.json` (with `@angular/service-worker` dependency)
  and `angular.json` (with `serviceWorker: true` in production config).
- Move `ngsw-config.json` to the correct directory.
- Specify custom test commands for aio's `yarn example-e2e` to also
  verify that the ServiceWorker bits are set up correctly.

PR Close #28020
2019-01-16 11:55:47 -08:00
8ab036262d feat(docs-infra): add support for custom test commands in cli-based docs examples (#28020)
Previously, cli-based docs examples were tested using `yarn e2e ...`. In
some cases, it might make sense to run different or additional checks
for a docs example (when running `yarn example-e2e` in `aio/`).

Currently, the only option is to define a custom project type and
overwrite the `e2e` yarn script in `package.json`. Doing so (in addition
to being cumbersome and verbose) would also end up in the `.zip` archive
that users can download to run the example locally. This would be
confusing, if these custom tests are specific to our CI needs.

This commit adds support for defining a custom list of commands per
example. These commands (if specified) would be run instead of the
default `yarn e2e ...`, when testing the docs examples on CI (via
`yarn example-e2e`).

(This feature will be used to verify that the
`service-worker-getting-started` example is set up correctly in a
subsequent commit, but can be useful in other cases as well.)

PR Close #28020
2019-01-16 11:55:47 -08:00
76e8c0ac7b feat(docs-infra): add service-worker project type (#28020)
File overwrites:
- **angular.json**: Add `serviceWorker: true` to production config.
- **package.json**: Add `@angular/service-worker` to dependencies.

This will make any `service-worker` examples work out-of-the-box, when
downloading and running locally from the `.zip` archives.

PR Close #28020
2019-01-16 11:55:47 -08:00
0e81e418fb docs: add schematics terms to glossary (#27862)
PR Close #27862
2019-01-16 11:55:47 -08:00
60255b68c0 docs: re-write interpolation section and add example (#25170)
PR Close #25170
2019-01-16 11:55:47 -08:00
ae7b3c8d45 docs(router): fixed a typo in CanLoad title text (#27894)
* Interface that a class can implement to be a guard deciding if a children can be loaded.
'...if a children...' changed to '...if children...'
 * Interface that a class can implement to be a guard deciding if children can be loaded.

PR Close #27894
2019-01-16 11:55:47 -08:00
9556ba7bca docs(router): fix misnamed path (#27879)
This change matches the routes found in the following code example
for auth.guard.ts as well as the login.component.1.ts in the "Add
the LoginComponent" section.

PR Close #27879
2019-01-16 11:55:47 -08:00
80994b25b9 docs: fix typo (#27865)
PR Close #27865
2019-01-16 11:55:47 -08:00
2f154b980f docs: fix broken html for deployment.md (#27851)
without the closing quote the text and link are not displayed correctly

PR Close #27851
2019-01-16 11:55:46 -08:00
342d352a00 refactor(core): improve type for EventEmitter (#27228)
PR Close #27228
2019-01-16 11:55:46 -08:00
f240ae5084 build(bazel): Bump @bazel/typescript & @bazel/karma to 0.22.1 (#28031)
PR Close #28031
2019-01-16 11:55:46 -08:00
e4fc8bad35 fix(bazel): Add /bazel-out to .gitignore (#27874)
PR Close #27874
2019-01-16 11:55:46 -08:00
5c680d4aa8 test(upgrade): log more info to help debug CI flakes (#28045)
Related Jira issue: FW-939

PR Close #28045
2019-01-16 11:55:46 -08:00
f05c5f82c8 fix(bazel): protractor rule does not run spec files with underscore (#28022)
There are various e2e tests with the `_spec.ts` suffix in the Angular project. Currently the protractor Bazel rule does not pick up these files and just ignores them. Since underscore is commonly used, we should support this.

Needed for the conversion fo the `examples` to Bazel.

PR Close #28022
2019-01-16 11:55:46 -08:00
2e0c58ec3e docs: document why not using compare-url orb (#28010)
Discussed in
https://github.com/angular/angular/pull/27775#issuecomment-452565603.

PR Close #28010
2019-01-16 11:55:46 -08:00
21093b9090 fix(bazel): Add @bazel/bazel to dev deps (#28032)
Project created by @angular/cli depends on Bazel at build time and
we should not assume that Bazel is available globally.
Instead, the project should specify an explicit dev dependency on
`@bazel/bazel`.

PR Close #28032
2019-01-16 11:55:46 -08:00
a6153accf0 docs: remove deprecated fromPromise from RxJS guide (#28015)
Follow-up to #27443.

PR Close #28015
2019-01-16 11:55:46 -08:00
dee789c204 docs(core): add missing closing backtick (`) (#27908)
PR Close #27908
2019-01-16 11:55:46 -08:00
12dd552fcd docs(forms): remove duplicated link (#27884)
PR Close #27884
2019-01-16 11:55:45 -08:00
079bcffe07 docs: fix typo PageNotFoundCompponent (#27799)
closes: #27795

PR Close #27799
2019-01-16 11:55:45 -08:00
30256e8fe8 ci: add brandonroberts to @angular/docs-infra codeowners (#28023)
Brandon is joining the docs-infra team in addition to the docs team.

PR Close #28023
2019-01-16 11:55:45 -08:00
8ee69831fc build(bazel): List explicit dependencies in WORKSPACE (#28000)
Instead of relying on implicit dependencies through Angular, the WORKSPACE
of the project should explicitly add rules_nodejs and rules_typescript so
it can better control the versions.

PR Close #28000
2019-01-16 11:55:45 -08:00
c3d8e2888d fix(bazel): flat module misses AMD module name on windows (#27839)
* Fixes that the flat module out files do not have a proper AMD module name on Windows. This is currently blocking serving a `ng_module` using the Bazel TypeScript `devserver` on Windows.

PR Close #27839
2019-01-16 11:55:45 -08:00
bea677136b build: re-enable disabled e2e tests (#27979)
Re-enables a few e2e tests which have been disabled a long time ago. Since these pass now, we should re-enable them.

PR Close #27979
2019-01-16 11:55:45 -08:00
11728bbbd9 build: remove travisci leftovers (#27979)
PR Close #27979
2019-01-16 11:55:45 -08:00
1da4b03940 fix(aio): Treating some deprecated (#27981)
PR Close #27981
2019-01-16 11:55:45 -08:00
54ba0f021f docs(core): fix characters that corrupt link (#27982)
PR Close #27982
2019-01-16 11:55:45 -08:00
836a5c72a0 build(docs-infra): remove unnecessary script to workaround cli issue (#28012)
The cli issue has been fixed and we no longer need to work around it.
This is essentially reverting #23470.

PR Close #28012
2019-01-16 11:55:45 -08:00
f589933440 test(upgrade): properly clean up after tests to avoid errors in unrelated tests (#28013)
Many `ngUpgrade` tests need to manually [bootstrap modules][1] (instead
of using `TestBed` which automatically cleans up) and thus need to also
manually clean up afterwards (e.g. by calling [destroyPlatform()][2]
after each test).

Failing to destroy the platform is usually not a problem, unless the
next test tries to manually destroy it (as a precaution), as happens
[here][3] (among other places).

More specifically, the problem happens, because (as part of the clean-up
happening on platform destruction) upgraded components will try to
[call a method][4] on `angular.element` after `angular` has been
[set to `undefined`][5] (assuming the last test was using the
[withEachNg1Version()][6] helper).

Because the test order is pseudo-random and thus different on each run,
these errors did not always come up and - when they did- they would go
away after a couple of reruns, making them appear as flakes on CI.

(For reference, the issue was introduced in 43c33d566.)

This commit eliminates the issue by always destroying the platform after
each `ngUpgrade` test.

Jira issue: FW-924

[1]: c3aa24c3f9/packages/upgrade/test/static/test_helpers.ts (L21)
[2]: c3aa24c3f9/packages/upgrade/test/static/integration/upgrade_component_spec.ts (L24)
[3]: c3aa24c3f9/packages/elements/test/create-custom-element_spec.ts (L31)
[4]: c3aa24c3f9/packages/upgrade/src/common/upgrade_helper.ts (L134-L135)
[5]: c3aa24c3f9/packages/upgrade/test/common/test_helpers.ts (L115)
[6]: c3aa24c3f9/packages/upgrade/test/common/test_helpers.ts (L31)

PR Close #28013
2019-01-16 11:55:45 -08:00
ef3ec34aa3 docs: use static zip function as an Observable creator. (#26790)
The existing example makes it seem like zip is a pipeable operator. It can be used this way, but I think that is for backwards compatibility. You can achieve the same functionality by using it as an Observable creator. I think this also makes the example clearer.

PR Close #26790
2019-01-16 11:55:44 -08:00
37a6d2d033 Revert "test(ivy): re-enable passing animation tests (#27997)"
This reverts commit 097af5ae2b.
It was accidentally merged on both master and patch branches when
it should have only been merged on master.
2019-01-16 11:55:44 -08:00
354f3639bb docs: update rxjs example and change fromPromise to from (#27443)
the first example at https://angular.io/guide/rx-library,
https://github.com/ReactiveX/rxjs-tslint/issues/7

PR Close #27443
2019-01-16 11:55:44 -08:00
c4b06868b1 test: fix outDir in TS 3.2 integration test (#27774)
PR Close #27774
2019-01-16 11:55:44 -08:00
e3853e842e ci: fix public api rule in codeowners (#27999)
@alxhub spotted that the public api rule in codeowners is being overriden by the Build & CI Owners rule.

swapping the two sections fixes the problem.

PR Close #27999
2019-01-16 11:55:44 -08:00
aee5cbd057 test(ivy): re-enable passing animation tests (#27997)
PR Close #27997
2019-01-16 11:55:44 -08:00
e9614eff1a ci: update payload size for cli-hello-world (#27994)
PR Close #27994
2019-01-16 11:55:44 -08:00
80f9f7e8ef docs: group fixes and features for 7.2.0 in changelog desc (#27974)
PR Close #27974
2019-01-16 11:55:37 -08:00
7d2589556f docs: remove Travis status from README (#27973)
we no longer use TravisCI
PR Close #27973
2019-01-16 11:54:04 -08:00
468fcab59d ci: compute commit range for rerun workflows (#27775)
On push builds, CircleCI provides `CIRCLE_COMPARE_URL`, which we use to
extract the commit range for a given build. When a workflow is rerun
(e.g. to recover from a flaked job), `CIRCLE_COMPARE_URL` is not
defined, causing some jobs to fail.

This commit fixes it by retrieving the compare URL from the original
workflow. It uses a slow process involving a (potentially large) number
of requests to CircleCI API.
It depends on the (undocumented) fact, that the `workspace_id` is the
same on all rerun workflows and the same as the original `workflow_id`.

PR Close #27775
2019-01-16 11:54:04 -08:00
f720e972d4 ci: remove required ci status for travis from angular-robot.yaml (#27970)
we missed this one!! oops

the robot should not expect travis status check on PRs any more.

PR Close #27970
2019-01-16 11:54:04 -08:00
b51ae7e59a build: increase parallelism for "test_docs_examples" job (#27937)
PR Close #27937
2019-01-16 11:54:04 -08:00
eedb06936f build: group sharded "test_docs_examples" jobs within circleci (#27937)
* Groups the two sharded `test_docs_examples` job using CircleCI's `parallelism` feature.  This makes the amount of jobs that show up on a PR, more reduced and also reduces code duplication for maintaining the Circle job definition.

PR Close #27937
2019-01-16 11:54:04 -08:00
ee5a094424 build: bazel integration test using limited resources (#27937)
PR Close #27937
2019-01-16 11:54:04 -08:00
9773b5a173 build: shard integration tests on circleci (#27937)
PR Close #27937
2019-01-16 11:54:04 -08:00
eed171839e test: fix integration/platform-server test which had missing @types/node devDep (#27937)
I'm not sure why this problem is visible only now or how this worked before, but the CI
is now failing because @types/node is missing.

I also added the yarn.lock file which was previously omitted. We want the yarn.lock file in so that
our deps don't change over time without us knowing.

PR Close #27937
2019-01-16 11:54:04 -08:00
1057b52def build: remove "build.sh" script (#27937)
this script is now obsolete and not needed any more. yay!!!

PR Close #27937
2019-01-16 11:54:04 -08:00
302506e940 build: remove "test.sh" script (#27937)
test.sh is no longer needed... all the tests should now be executed via bazel.

if for whatever reason we need to run the legacy unit test setup, we should should follow the commands that we use to execute those tests in .circle/config.yaml

PR Close #27937
2019-01-16 11:54:04 -08:00
cc35feb445 ci: remove travis ci setup (#27937)
we no longer need it... yay!!!

PR Close #27937
2019-01-16 11:54:03 -08:00
21b875d4d0 ci: run legacy e2e tests in parallel (#27937)
PR Close #27937
2019-01-16 11:54:03 -08:00
dac9c09235 ci: move e2e tests from travis to circleci (#27937)
PR Close #27937
2019-01-16 11:54:03 -08:00
5cba438eb5 ci: remove build steps that are no longer needed (#27937)
the metadata build seems to be needed only by the offline compiler tests which is currently disabled

PR Close #27937
2019-01-16 11:54:03 -08:00
2b001cb2b1 ci: move local and saucelabs unit tests to circle (#27937)
Moving the tests over to CircleCI in pretty much "as-is" state just so that we can drop the dependency on Travis.

In the followup changes we plan to migrate these tests to run on sauce under bazel. @gregmagolan is working on that.

I've previously verified that all the tests executed in legacy-unit-tests-local already under bazel.
Therefore the legacy-unit-tests-local job is strictly not necessary any more, but given how flaky legacy-unit-tests-saucelabs is,
it is good to have the -local job just so that we can quickly determine if any failure is a flake or legit issue
(the bazel version of these tests could theoretically run in a slightly different way and fail or not fail in a different way, so having -lcoal job is just an extra safety check).

This change was coauthored with @devversion

PR Close #27937
2019-01-16 11:54:03 -08:00
0be8487f09 fix(bazel): protractor utils cannot start server on windows (#27915)
* Currently the protractor utils assume that the specified Bazel server runfile can be resolved by just using the real file system. This is not the case on Windows because the runfiles are not symlinked into the working directory and need to be resolved through the runfile manifest.

PR Close #27915
2019-01-16 11:54:03 -08:00
e1e69ca828 test(bazel): re-enable ng_package golden testing on ci (#27829)
* Enables the ng_package golden testing on the CI
* Fixes the ng_package golden testing for Windows

PR Close #27829
2019-01-16 11:54:03 -08:00
f376c46d78 test(bazel): fix all ng_package tests not working on windows (#27829)
PR Close #27829
2019-01-16 11:54:03 -08:00
fad4145f48 fix(bazel): packager not properly removing amd directives on windows (#27829)
PR Close #27829
2019-01-16 11:54:03 -08:00
6b394f62be fix(bazel): ng_package creates invalid typings reexport on windows (#27829)
Currently when building a package on Windows, the typings re-export for secondary entry-points is not valid TypeScript. Similarly the metadata and the "package.json" files use non-posix paths and cause inconsistency within the NPM package.

For example:

_package.json_
```
  "esm5": "./esm5\\core.js",
  "esm2015": "./esm2015\\core.js",
```

_testing.d.t.s_ (of the `core` package)
```
export * from './testing\testing';
```

PR Close #27829
2019-01-16 11:54:03 -08:00
16aad8b2d8 docs: add Alyle UI to resources (#27954)
PR Close #27954
2019-01-16 11:54:03 -08:00
25bbcbcbe5 ci: add brandonroberts to @angular/framework-global-approvers-for-docs-only-changes (#27949)
I’ve observed that Brandon reviews many docs-only PRs and then we still need me or Jeniffer to approve them.

In most cases, Brandon is perfectly qualified to approve these, so I’m proposing that Brandon is added to the framework-global-approvers-for-docs-only-changes group.

PR Close #27949
2019-01-16 11:54:02 -08:00
0efbb37381 release: cut the v7.2.0 release 2019-01-07 07:37:59 -08:00
6b0c1a71fa test(ivy): turn on platform-browser-dynamic tests on CI (#27940)
We missed removing the `fixme-ivy-aot` bazel tag from the BUILD file
of platform-browser-dynamic, so we weren't running the
`//packages/platform-browser-dynamic/test:test_web_chromium-local`
test target on CI. This commit turns on the tests and adds root causes
where they are known.

PR Close #27940
2019-01-05 17:48:11 -08:00
4c9aff5695 ci: fix typos in codeowners file (#27945)
PR Close #27945
2019-01-05 17:46:27 -08:00
224d78765f ci: replace our pullapprove setup with GitHub CODEOWNERS (#27690)
Summary of changes:
- created .github/CODEOWNERS with docs and config similar to the one in .pullapprove.yml
- updated docs
- updated .github/angular-robot.yml to not expect pullapprove status
- removed .pullapprove.yml

The primary motivations behind this change are:
- CODEOWNERS didn't exist when we introduced pullapprove
- CODEOWNERS is a functionality tightly integrated with github which results in better DX
- pullapprove v2 has been very unstable recently causing productivity loss
- pullapprove v2 has been deprecated in favor of v3, which requires and migration

PR Close #27690
2019-01-05 17:39:00 -08:00
7adcbb320f build: enforce minimum Bazel version of 0.21.0 in WORKSPACE so cache works with yarn bazel (#27935)
PR Close #27935
2019-01-04 18:38:44 -08:00
e7f43386a6 build: update to Bazel 0.21.0 (#27935)
PR Close #27935
2019-01-04 18:38:44 -08:00
411de252d7 fix(ivy): disable test which rely on DebugElement in WebWorker (#27895)
PR Close #27895
2019-01-04 18:37:31 -08:00
b61dafaeac refactor: remove redundant error in catch (#25478)
PR Close #25478
2019-01-04 15:42:19 -08:00
929334b0bf fix(ivy): should not throw when getting VCRef.parentInjector on the root view (#27909)
PR Close #27909
2019-01-04 14:57:39 -08:00
fb7816fed4 fix(ivy): element injector on the host of a component should see viewProviders of that component (#27928)
PR Close #27928
2019-01-04 14:46:15 -08:00
5d3dcfc6ad fix(ivy): ensure @animation host bindings/listeners work properly (#27896)
PR Close #27896
2019-01-04 14:12:29 -08:00
0bd9deb9f5 fix(ivy): pipes should overwrite pipes with later entry in the pipes array (#27910)
PR Close #27910
2019-01-04 13:21:46 -08:00
13d23f315b fix(ivy): ngtsc program emit ignoring custom transformers (#27837)
Fixes the `customTransformers` that are passed to the `NgtscProgram.emit` not being passed along.

PR Close #27837
2019-01-04 12:29:15 -08:00
48555f95c6 fix(ivy): ensure unique template and listener function identifiers (#27766)
Previously, there could be identical template/listener function names
for a component's template, if it had multiple similarly structured
nested sub-templates or listeners.
This resulted in build errors:
`Identifier '<SOME_IDENTIFIER>' has already been declared`

This commit fixes this by ensuring that the template index is included
in the `contextName` passed to the `TemplateDefinitionBuilder`
responsible for processing nested sub-templates.
Similarly, the template or element index is included in the listener
names.

PR Close #27766
2019-01-04 12:28:11 -08:00
d026b675be refactor(ivy): minor refactoring / code clean-up (#27766)
PR Close #27766
2019-01-04 12:28:11 -08:00
7eb2c41fb2 fix(ivy): ng-content tags in re-inserted templates should walk declaration tree (#27783)
This PR assures that content projection works if an <ng-content> tag is
placed inside an <ng-template> in one component and that <ng-template>
is inserted into a different component. It fixes a bug where the
projection instruction code would walk up the insertion tree to find
selector data instead of the declaration tree.

PR Close #27783
2019-01-04 12:20:18 -08:00
3f2ebbd7ab fix(ivy): support bindings in ICUs in nested contexts (#27914)
Prior to this change, ICU extraction logic was not taking into account nested bindings (that look like this: �0:1�) and only accounted for top level bindings (like this �0�). As a result, ICUs were not parsed and remained as text in the output. Now the extraction logic (regular expressions) take into account the nested bindings format as well.

PR Close #27914
2019-01-04 12:19:46 -08:00
38b4d15227 fix(ivy): implement 'TestBed.overrideTemplateUsingTestingModule' function (#27717)
Adding 'TestBed.overrideTemplateUsingTestingModule' function that overrides Component template and uses TestingModule as a scope.

PR Close #27717
2019-01-04 12:19:20 -08:00
176b3f12f4 ci: make integration_test job logs less verbose (#27934)
The build and test progress logs make the CI log output so long that it
can't be displayed in the UI and one has to download and view the file
locally instead. This makes it harder to get to the interesting lines,
such as error messages.

Similar to #26869, but for the `bazel-schematics` integration project.

PR Close #27934
2019-01-04 12:18:39 -08:00
8a05199fb9 test: remove bower and polymer benchmarks (#27931)
the polymer benchmarks are super old and not relevant any more

and these benchmarks were the only reason why we needed bower at all

so long, bower. thanks for all the fish.

PR Close #27931
2019-01-04 12:02:22 -08:00
51a0bd2e75 test(ivy): correct attribute marker in broken test (#27919)
Test incorrectly marks the attribute as a 'Class', when it should be 'SelectOnly'

PR Close #27919
2019-01-03 16:10:00 -08:00
1b0b36d143 fix(forms): match getError and hasError to get method signature (#20211)
Internally getError and hasError call the AbstractControl#get method which takes  `path: Array<string | number> | string` as input, since there are different ways to traverse the AbstractControl tree.
This change matches the method signitures of all methods that use this.

PR Close #20211
2019-01-03 10:16:06 -08:00
e268a0579a docs(forms): update desc for hasError and getError (#27861)
This commit adds docs for the changes made in #20211.

Closes #19734.

PR Close #27861
2019-01-03 10:15:23 -08:00
1f1e77b641 fix(ivy): don’t publish animation bindings as attributes (#27805)
Some of the animation tests have been failing because animation gets
triggered multiple times. The reason for this is that the compiler was
generating static attribute bindings in addition to dynamic bindings.
This created multiple writes to the animation render which failed the
tests.

PR Close #27805
2019-01-03 09:39:25 -08:00
880b4aabdb fix(docs-infra): upgrade to latest dgeni-packages to fix linking problem (#27864)
This new version of dgeni-packages gives the main (implemented)
overload of a method the correct id and aliases, which allow it to be
automatically linked.

See 398f35da30

Fixes #27820
Closes #27821

PR Close #27864
2019-01-03 09:38:06 -08:00
5fee444fea test(ivy): update test failure root cause (#27855)
Updates the root cause for a couple of the test failures.

PR Close #27855
2019-01-03 09:37:26 -08:00
1e6c9be86c fix(bazel): unable to launch protractor test on windows (#27850)
Due to an incorrect environment variable name, it's currently not possible to launch Protractor on Windows using the Bazel protractor rule.

PR Close #27850
2019-01-03 09:36:37 -08:00
a9790018df fix(ivy): resolve forwardRefs correctly in TestBed (JIT) (#27737)
Forward refs in some places (like imports/export/providers/viewProviders/queries) were not resolved before passing to compilation phase. Now we resolve missing refs before invoking compile function.

PR Close #27737
2019-01-03 09:34:15 -08:00
1dc95c41eb docs: fix typo in TOH http section (#26127)
PR Close #26127
2019-01-03 09:32:28 -08:00
a0a3648e7a docs: add more info on what is being cached (#27343)
PR Close #27343
2019-01-03 09:29:44 -08:00
7df9040c05 docs: add missing comma to environment config in build guide (#27476)
PR Close #27476
2019-01-03 09:29:17 -08:00
5638c1d507 docs: fix npm description in architecture modules guide (#27818)
PR Close #27818
2019-01-03 09:28:45 -08:00
755c8091af docs: improve description of bundle budgets (#27833)
PR Close #27833
2019-01-03 09:28:16 -08:00
59f64dd361 docs(service-worker): update service worker configuration doc (#27868)
PR Close #27868
2019-01-03 09:27:30 -08:00
27431e0e1e test(docs-infra): increase timeout for redirection to external URL (#27903)
Occasionally, external URLs take longer to load, which causes CI flakes.

PR Close #27903
2019-01-03 09:26:54 -08:00
b7d0ab7de3 test(ivy): enable more @angular/core tests (#27912)
PR Close #27912
2019-01-03 09:22:22 -08:00
460be795cf test(ivy): add root cause analysis for failing core tests (view injector integration) (#27912)
PR Close #27912
2019-01-03 09:22:22 -08:00
c4f7727408 docs: add api doc for viewport scroller (#27381)
PR Close #27381
2018-12-26 11:47:16 -08:00
d1de9ff313 build: update to latest rules_nodejs (#27764)
This includes a performance fix for module resolution in the common case under Ivy

PR Close #27764
2018-12-26 11:31:37 -08:00
707c6828b5 docs(elements): add "Firefox" for support of custom elements (#27789)
Firefox now supports custom elements: https://caniuse.com/#feat=custom-elementsv1

PR Close #27789
2018-12-26 11:27:45 -08:00
3f64e87ed1 test: check payload size for cli-hello-world-ivy (#27797)
Adds size bundle checking to the integration test `cli-hello-world-ivy`

PR Close #27797
2018-12-26 11:19:19 -08:00
62e45cef2d test: update cli-hello-world-ivy to cli@7.2.0-rc.0 (#27797)
Updates the app itself to reflect the result of using the  `experimentalIvy` flag on the CLI.
The result is similar to:

    npx @angular/cli@next new cli-hello-world-ivy --experimental-ivy --defaults

But replaces the current (cli `7.2.0-rc.0`) `renderComponent` bootstrap with the usual `platformBrowserDynamic` one.
It also keeps what the app did (display a pipe, tests it).

PR Close #27797
2018-12-26 11:19:19 -08:00
c34eee4e8e test(ivy): root cause analysis for @angular/platform-server (#27800)
PR Close #27800
2018-12-26 11:17:45 -08:00
9b91beed69 docs: fix typo explictly (#27798)
Closes #27796

PR Close #27798
2018-12-26 06:57:55 -05:00
eea2b0f288 revert: fix(router): ensure URL is updated after second redirect with UrlUpdateStrategy="eager" (#27523) 2018-12-25 22:14:07 -08:00
13eb57a59f fix(ivy): merge static style rendering across elements, directives and components (#27661)
PR Close #27661
2018-12-21 18:14:44 -05:00
0b3ae3d70c build: update to latest karma version (#27735)
Updates to the latest Karma version that includes karma-runner/karma@cc2eff2 and should be able to properly restart disconnected browsers. This was a long-term Karma bug and affected CI flakiness significantly.

PR Close #27735
2018-12-21 17:02:50 -05:00
4b67b0af3e fix(ivy): adding TestBed.overrideProvider support (#27693)
Prior to this change, provider overrides defined via TestBed.overrideProvider were not applied to Components/Directives. Now providers are taken into account while compiling Components/Directives (metadata is updated accordingly before being passed to compilation).

PR Close #27693
2018-12-21 16:39:34 -05:00
bba5e2632e docs(forms): clarify the pattern validator behavior (#27560)
PR Close #27560
2018-12-21 15:12:31 -05:00
c5ce4e62c6 docs: fix code example to ensure consistency in file (#26577)
PR Close #26577
2018-12-21 15:12:05 -05:00
509aa61619 fix(ivy): apply all overrides from TestBed, not the last one only (#27734)
In some cases in our tests we can define multiple overrides for a given class. As a result, only the last override is actually applied due to the fact that we store overrides in a Type<->Override map. This update changes the logic to keep all overrides defined in a given test for a Type (i.e. Type<->Override[] map) and applies them one by one at resolution phase. This behavior is more inline with the previous TestBed.

PR Close #27734
2018-12-21 15:09:00 -05:00
cdd737e28b test(ivy): mark tests using getDebugContext as obsolete in ivy (#27790)
PR Close #27790
2018-12-21 15:07:31 -05:00
5da55d6246 test(ivy): add root cause analysis for failing router tests (#27792)
PR Close #27792
2018-12-21 15:06:56 -05:00
50a91ba28c docs(upgrade): add gotchas/tips/example for multiple downgraded modules (#27217)
PR Close #27217
2018-12-20 16:20:41 -05:00
077a5fb04b test(upgrade): test injector tree traversal for downgraded components (#27217)
This commit adds tests that verify the current behavior wrt injector
tree traversal for downgraded components, so that it is easier to
contrast with changed behavior is future commits (should we decide
to actually change it).

PR Close #27217
2018-12-20 16:20:41 -05:00
bc0ee01d09 fix(upgrade): allow nesting components from different downgraded modules (#27217)
PR Close #27217
2018-12-20 16:20:41 -05:00
326b464d20 fix(upgrade): correctly handle nested downgraded components with downgradeModule() (#27217)
Previously, nested downgraded components would not be created/destroyed
inside the Angular zone (as they should) and they would not be wired up
correctly for change detection.

This commit ensures that ngUpgrade correctly detects whether this is an
ngUpgradeLite app (i.e. one using `downgradeModule()` instead of
`UpgradeModule`) and appropriately handles components, even if they are
nested inside other downgraded components.

Fixes #22581
Closes #22869
Closes #27083

PR Close #27217
2018-12-20 16:20:41 -05:00
8a7498e0ef refactor(upgrade): simplify special handling of ngUpgradeLite in downgradeComponent() (#27217)
PR Close #27217
2018-12-20 16:20:41 -05:00
07ada7f3d9 fix(router): ensure URL is updated after second redirect with UrlUpdateStrategy="eager" (#27523)
Navigating to a route such as `/users`, you may get redirected to `/login`. Previously, if you go then route to `/users` again the URL will end up showing `/users` after the second redirect. This only happened in `UrlUpdateStrategy="eager"`. This is now fixed so after the second redirect, the URL shows the correct page.

Fixes #27116

PR Close #27523
2018-12-20 16:18:52 -05:00
880e8a5cfc refactor: fix broken formatting 2018-12-20 09:16:09 -08:00
a0585c9a9a fix(ivy): correct content projection with nested templates (#27755)
Previously ivy code generation was emmiting the projectionDef instruction in
a template where the <ng-content> tag was found. This code generation logic was
incorrect since the ivy runtime expects the projectionDef instruction to be present
in the main template only.

This PR ammends the code generation logic so that the projectionDef instruction is
emmitedin the main template only.

PR Close #27755
2018-12-20 12:01:20 -05:00
a833b98fd0 fix(ivy): change detection strategy not being passed to compiler (#27753)
Fixes the defined change detection strategy not being passed to the compiler when a component is being compiled.

PR Close #27753
2018-12-20 12:00:58 -05:00
4b70a4e905 feat(ivy): support NgModule metadata from calls that do not return ModuleWithProviders types (#27326)
Normally functions that return `ModuleWithProvider` objects should parameterize
the return type to include the type of `NgModule` that is being returned. For
example `forRoot(): ModuleWithProviders<RouterModule>`.

But in some cases, especially those generated by nccc, these functions to not
explicitly declare `ModuleWithProviders` as their return type. Instead they
return a "intersection" type, one of whose members is a type literal that
declares the `NgModule` type returned. For example:
`forRoot(): CustomType&{ngModule:RouterModule}`.

This commit changes the `NgModuleDecoratorHandler` so that it can extract
the `NgModule` type from either kind of declaration.

PR Close #27326
2018-12-20 11:58:50 -05:00
f2a1c66031 feat(ivy): ngcc - add typings to ModuleWithProviders functions (#27326)
Exported functions or static method that return a `ModuleWithProviders`
compatible structure need to provide information about the referenced
`NgModule` type in their return type.

This allows ngtsc to be able to understand the type of `NgModule` that is
being returned from calls to the function, without having to dig into the
internals of the compiled library.

There are two ways to provide this information:

* Add a type parameter to the `ModuleWithProviders` return type. E.g.

```
static forRoot(): ModuleWithProviders<SomeNgModule>;
```

* Convert the return type to a union that includes a literal type. E.g.

```
static forRoot(): (SomeOtherType)&{ngModule:SomeNgModule};
```

This commit updates the rendering of typings files to include this type
information on all matching functions/methods.

PR Close #27326
2018-12-20 11:58:49 -05:00
cfb8c17511 feat(ivy): ngcc - map functions as well as classes from source to typings (#27326)
To support updating `ModuleWithProviders` calls,
we need to be able to map exported functions between
source and typings files, as well as classes.

PR Close #27326
2018-12-20 11:58:49 -05:00
99d0e27587 test(ivy): update root cause for core test (#27768)
PR Close #27768
2018-12-20 11:58:14 -05:00
b08f3acf09 test(bazel): Make sure CLI project created with Bazel works with original workflow (#27741)
Bazel bits added to a CLI project should not be destructive.
The project should still work under the original CLI workflow.

PR Close #27741
2018-12-19 18:24:25 -05:00
3ab25ab078 refactor: fix broken linting rules due to revert 2018-12-19 13:06:43 -08:00
0604527199 Revert "build: update gulp-clang-format dependency (#27712)" (#27759)
This reverts commit d766ad01db.

As discussed per chat, we want to temporarily revert that change because `gulp-clang-format` expects a more recent version of `clang-format` which comes with new style updates. In order to make sure that the formatting will be enforced in the meanwhile, we need to revert the update.

PR Close #27759
2018-12-19 15:13:36 -05:00
8f8572fd3e fix(ivy): @Host should behave as in View Engine (#27646)
PR Close #27646
2018-12-19 15:12:35 -05:00
e8f7241366 build: fix our copy of Array#find typing (#27742)
It should be nullable, matching the lib.es2015.d.ts from TypeScript

PR Close #27742
2018-12-19 15:11:52 -05:00
a20b2f72f2 fix(ivy): process creation mode deeply before running update mode (#27744)
Prior to this commit, we had two different modes for change detection
execution for Ivy, depending on whether you called `bootstrap()` or
`renderComponent()`. In the former case, we would complete creation
mode for all components in the tree before beginning update mode for
any component. In the latter case, we would run creation mode and
update mode together for each component individually.

Maintaining code to support these two different execution orders was
unnecessarily complex, so this commit aligns the two bootstrapping
mechanisms to execute in the same order. Now creation mode always
runs for all components before update mode begins.

This change also simplifies our rendering logic so that we use
`LView` flags as the source of truth for rendering mode instead of
`rf` function arguments. This fixed some related bugs (e.g. calling
`ViewRef.detectChanges` synchronously after the view's creation
would create view nodes twice, view queries would execute twice, etc).

PR Close #27744
2018-12-19 15:10:16 -05:00
329 changed files with 14032 additions and 8483 deletions

View File

@ -22,12 +22,18 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Filesystem interactions # # Filesystem interactions #
############################### ###############################
# Don't create symlinks like bazel-out in the project. # Create symlinks in the project:
# These cause VSCode to traverse a massive tree, opening file handles and # - dist/bin for outputs
# - dist/testlogs, dist/genfiles
# - bazel-out
# NB: bazel-out should be excluded from the editor configuration.
# The checked-in /.vscode/settings.json does this for VSCode.
# Other editors may require manual config to ignore this directory.
# In the past, we say a problem where VSCode traversed a massive tree, opening file handles and
# eventually a surprising failure with auto-discovery of the C++ toolchain in # eventually a surprising failure with auto-discovery of the C++ toolchain in
# MacOS High Sierra. # MacOS High Sierra.
# See https://github.com/bazelbuild/bazel/issues/4603 # See https://github.com/bazelbuild/bazel/issues/4603
build --symlink_prefix=/ build --symlink_prefix=dist/
# Performance: avoid stat'ing input files # Performance: avoid stat'ing input files
build --watchfs build --watchfs
@ -36,6 +42,16 @@ build --watchfs
run --nolegacy_external_runfiles run --nolegacy_external_runfiles
test --nolegacy_external_runfiles test --nolegacy_external_runfiles
# Turn on --incompatible_strict_action_env which was on by default
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
# This flag is needed to so that the bazel cache is not invalidated
# when running bazel via `yarn bazel`.
# See https://github.com/angular/angular/issues/27514.
build --incompatible_strict_action_env
run --incompatible_strict_action_env
test --incompatible_strict_action_env
############################### ###############################
# Release support # # Release support #
# Turn on these settings with # # Turn on these settings with #

4
.gitignore vendored
View File

@ -1,7 +1,7 @@
.DS_STORE .DS_STORE
/dist/ /dist/
/bazel-* /bazel-out/
/integration/bazel/bazel-* /integration/bazel/bazel-*
e2e_test.* e2e_test.*
node_modules node_modules
@ -13,9 +13,9 @@ pubspec.lock
.c9 .c9
.idea/ .idea/
.settings/ .settings/
.vscode/launch.json
*.swo *.swo
modules/.settings modules/.settings
.vscode
modules/.vscode modules/.vscode
# Don't check in secret files # Don't check in secret files

15
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/bazel-out/**": true,
"**/dist/**": true,
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/bazel-out": true,
"**/dist": true,
},
}

View File

@ -1,3 +1,65 @@
<a name="7.2.3"></a>
## [7.2.3](https://github.com/angular/angular/compare/7.2.2...7.2.3) (2019-01-30)
### Bug Fixes
* **bazel:** add [@npm](https://github.com/npm)//tslib dep to e2e ts_library target in bazel-workspace schematic ([#28358](https://github.com/angular/angular/issues/28358)) ([8cee56e](https://github.com/angular/angular/commit/8cee56e))
* **bazel:** Bazel-workspace schematics should run in ScopedTree ([#28349](https://github.com/angular/angular/issues/28349)) ([260ac20](https://github.com/angular/angular/commit/260ac20))
* **bazel:** Builder should invoke local bazel/iblaze ([#28303](https://github.com/angular/angular/issues/28303)) ([12b8a6e](https://github.com/angular/angular/commit/12b8a6e))
* **bazel:** ng-new should run yarn install ([#28381](https://github.com/angular/angular/issues/28381)) ([a9d46e4](https://github.com/angular/angular/commit/a9d46e4))
### Performance Improvements
* yarn version upgrade ([#28360](https://github.com/angular/angular/issues/28360)) ([cc1b2a5](https://github.com/angular/angular/commit/cc1b2a5))
<a name="7.2.2"></a>
## [7.2.2](https://github.com/angular/angular/compare/7.2.1...7.2.2) (2019-01-22)
### Bug Fixes
* **bazel:** Fix integration test after v8 bump ([#28194](https://github.com/angular/angular/issues/28194)) ([7b772e9](https://github.com/angular/angular/commit/7b772e9)), closes [#28142](https://github.com/angular/angular/issues/28142)
* **router:** `skipLocationChange` with named outlets ([#28301](https://github.com/angular/angular/issues/28301)) ([32737a6](https://github.com/angular/angular/commit/32737a6)), closes [#27680](https://github.com/angular/angular/issues/27680) [#28200](https://github.com/angular/angular/issues/28200)
### Features
* **bazel:** Add support for SASS ([#28167](https://github.com/angular/angular/issues/28167)) ([a4d9192](https://github.com/angular/angular/commit/a4d9192))
* **compiler-cli:** resolve generated Sass/Less files to .css inputs ([#28166](https://github.com/angular/angular/issues/28166)) ([4c00059](https://github.com/angular/angular/commit/4c00059))
<a name="7.2.1"></a>
## [7.2.1](https://github.com/angular/angular/compare/7.2.0...7.2.1) (2019-01-16)
### Bug Fixes
* **bazel:** Add [@bazel](https://github.com/bazel)/bazel to dev deps ([#28032](https://github.com/angular/angular/issues/28032)) ([21093b9](https://github.com/angular/angular/commit/21093b9))
* **bazel:** Add /bazel-out to .gitignore ([#27874](https://github.com/angular/angular/issues/27874)) ([e4fc8ba](https://github.com/angular/angular/commit/e4fc8ba))
* **bazel:** Add ibazel to deps of Bazel project ([#28090](https://github.com/angular/angular/issues/28090)) ([28d34b6](https://github.com/angular/angular/commit/28d34b6))
* **bazel:** Bazel schematics should add router package ([#28141](https://github.com/angular/angular/issues/28141)) ([02a852a](https://github.com/angular/angular/commit/02a852a))
* **bazel:** flat module misses AMD module name on windows ([#27839](https://github.com/angular/angular/issues/27839)) ([c3d8e28](https://github.com/angular/angular/commit/c3d8e28))
* **bazel:** incorrectly always uses ngc-wrapped from "npm" workspace ([#28137](https://github.com/angular/angular/issues/28137)) ([ca3965a](https://github.com/angular/angular/commit/ca3965a))
* **bazel:** ng_package creates invalid typings reexport on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([6b394f6](https://github.com/angular/angular/commit/6b394f6))
* **bazel:** packager not properly removing amd directives on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([fad4145](https://github.com/angular/angular/commit/fad4145))
* **bazel:** protractor rule does not run spec files with underscore ([#28022](https://github.com/angular/angular/issues/28022)) ([f05c5f8](https://github.com/angular/angular/commit/f05c5f8))
* **bazel:** protractor utils cannot start server on windows ([#27915](https://github.com/angular/angular/issues/27915)) ([0be8487](https://github.com/angular/angular/commit/0be8487))
* **bazel:** replay compilation uses wrong compiler for building esm5 ([#28053](https://github.com/angular/angular/issues/28053)) ([fbbdaaa](https://github.com/angular/angular/commit/fbbdaaa))
* **router:** ensure URL is updated after second redirect with UrlUpdateStrategy="eager" ([#27680](https://github.com/angular/angular/issues/27680)) ([6ae7aee](https://github.com/angular/angular/commit/6ae7aee)), closes [#27116](https://github.com/angular/angular/issues/27116)
* **service-worker:** navigation urls backwards compatibility ([#27244](https://github.com/angular/angular/issues/27244)) ([585e871](https://github.com/angular/angular/commit/585e871))
### Performance Improvements
* **platform-server:** use shared `DomElementSchemaRegistry` instance ([#28150](https://github.com/angular/angular/issues/28150)) ([#28151](https://github.com/angular/angular/issues/28151)) ([6851581](https://github.com/angular/angular/commit/6851581))
<a name="7.2.0"></a> <a name="7.2.0"></a>
# [7.2.0](https://github.com/angular/angular/compare/7.1.4...7.2.0) (2019-01-07) # [7.2.0](https://github.com/angular/angular/compare/7.1.4...7.2.0) (2019-01-07)

View File

@ -62,8 +62,8 @@ local_repository(
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
# Bazel version must be at least v0.21.0 because: # Bazel version must be at least v0.21.0 because:
# - 0.21.0 --experimental_strict_action_env flag turned on by default which fixes cache when # - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
# running `yarn bazel` (see https://github.com/angular/angular/issues/27514#issuecomment-451438271) # (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
check_bazel_version("0.21.0", """ check_bazel_version("0.21.0", """
You no longer need to install Bazel on your machine. You no longer need to install Bazel on your machine.
Angular has a dependency on the @bazel/bazel package which supplies it. Angular has a dependency on the @bazel/bazel package which supplies it.

View File

@ -26,8 +26,8 @@ ARG AIO_GITHUB_ORGANIZATION=angular
ARG TEST_AIO_GITHUB_ORGANIZATION=test-org ARG TEST_AIO_GITHUB_ORGANIZATION=test-org
ARG AIO_GITHUB_REPO=angular ARG AIO_GITHUB_REPO=angular
ARG TEST_AIO_GITHUB_REPO=test-repo ARG TEST_AIO_GITHUB_REPO=test-repo
ARG AIO_GITHUB_TEAM_SLUGS=team,aio-contributors ARG AIO_GITHUB_TEAM_SLUGS=aio-contributors
ARG TEST_AIO_GITHUB_TEAM_SLUGS=team,aio-contributors ARG TEST_AIO_GITHUB_TEAM_SLUGS=aio-contributors
ARG AIO_NGINX_HOSTNAME=$AIO_DOMAIN_NAME ARG AIO_NGINX_HOSTNAME=$AIO_DOMAIN_NAME
ARG TEST_AIO_NGINX_HOSTNAME=$TEST_AIO_DOMAIN_NAME ARG TEST_AIO_NGINX_HOSTNAME=$TEST_AIO_DOMAIN_NAME
ARG AIO_NGINX_PORT_HTTP=80 ARG AIO_NGINX_PORT_HTTP=80

View File

@ -16,7 +16,7 @@ const ITEMS: Item[] = [
const FETCH_LATENCY = 500; const FETCH_LATENCY = 500;
/** Simulate a data service that retrieves crises from a server */ /** Simulate a data service that retrieves items from a server */
@Injectable() @Injectable()
export class ItemService implements OnDestroy { export class ItemService implements OnDestroy {

View File

@ -1508,7 +1508,7 @@ done manually.
When `true`, this option tells the compiler not to check the TypeScript version. When `true`, this option tells the compiler not to check the TypeScript version.
The compiler will skip checking and will not error out when an unsupported version of TypeScript is used. The compiler will skip checking and will not error out when an unsupported version of TypeScript is used.
Setting this option to `true` is not recommended because unsupported versions of TypeScript might have undefined behaviour. Setting this option to `true` is not recommended because unsupported versions of TypeScript might have undefined behavior.
This option is `false` by default. This option is `false` by default.

View File

@ -273,8 +273,8 @@ The CLI uses [Autoprefixer](https://github.com/postcss/autoprefixer) to ensure c
You may find it necessary to target specific browsers or exclude certain browser versions from your build. You may find it necessary to target specific browsers or exclude certain browser versions from your build.
Internally, Autoprefixer relies on a library called [Browserslist](https://github.com/browserslist/browserslist) to figure out which browsers to support with prefixing. Internally, Autoprefixer relies on a library called [Browserslist](https://github.com/browserslist/browserslist) to figure out which browsers to support with prefixing.
Browserlist looks for configuration options in a `browserlist` property of the package configuration file, or in a configuration file named `.browserslistrc`. Browserlist looks for configuration options in a `browserslist` property of the package configuration file, or in a configuration file named `.browserslistrc`.
Autoprefixer looks for the Browserlist configuration when it prefixes your CSS. Autoprefixer looks for the `browserslist` configuration when it prefixes your CSS.
* You can tell Autoprefixer what browsers to target by adding a browserslist property to the package configuration file, `package.json`: * You can tell Autoprefixer what browsers to target by adding a browserslist property to the package configuration file, `package.json`:
``` ```

View File

@ -53,7 +53,7 @@ Workspace-wide `node_modules` dependencies are visible to this project.
| `app/` | Contains the component files in which your app logic and data are defined. See details in [App source folder](#app-src) below. | | `app/` | Contains the component files in which your app logic and data are defined. See details in [App source folder](#app-src) below. |
| `assets/` | Contains image files and other asset files to be copied as-is when you build your application. | | `assets/` | Contains image files and other asset files to be copied as-is when you build your application. |
| `environments/` | Contains build configuration options for particular target environments. By default there is an unnamed standard development environment and a production ("prod") environment. You can define additional target environment configurations. | | `environments/` | Contains build configuration options for particular target environments. By default there is an unnamed standard development environment and a production ("prod") environment. You can define additional target environment configurations. |
| `browserlist` | Configures sharing of target browsers and Node.js versions among various front-end tools. See [Browserlist on GitHub](https://github.com/browserslist/browserslist) for more information. | | `browserslist` | Configures sharing of target browsers and Node.js versions among various front-end tools. See [Browserslist on GitHub](https://github.com/browserslist/browserslist) for more information. |
| `favicon.ico` | An icon to use for this app in the bookmark bar. | | `favicon.ico` | An icon to use for this app in the bookmark bar. |
| `index.html` | The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any `<script>` or` <link>` tags here manually. | | `index.html` | The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any `<script>` or` <link>` tags here manually. |
| `main.ts` | The main entry point for your app. Compiles the application with the [JIT compiler](https://angular.io/guide/glossary#jit) and bootstraps the application's root module (AppModule) to run in the browser. You can also use the [AOT compiler](https://angular.io/guide/aot-compiler) without changing any code by appending the `--aot` flag to the CLI `build` and `serve` commands. | | `main.ts` | The main entry point for your app. Compiles the application with the [JIT compiler](https://angular.io/guide/glossary#jit) and bootstraps the application's root module (AppModule) to run in the browser. You can also use the [AOT compiler](https://angular.io/guide/aot-compiler) without changing any code by appending the `--aot` flag to the CLI `build` and `serve` commands. |

View File

@ -124,7 +124,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
Respond after Angular checks the component's views and child views / the view that a directive is in. Respond after Angular checks the component's views and child views / the view that a directive is in.
Called after the `ngAfterViewInit` and every subsequent `ngAfterContentChecked()`. Called after the `ngAfterViewInit()` and every subsequent `ngAfterContentChecked()`.
</td> </td>
</tr> </tr>

View File

@ -3796,7 +3796,7 @@ The relevant *Crisis Center* code for this milestone follows.
</code-pane> </code-pane>
<code-pane header="crisis-detail.component.html" path="router/src/app/crisis-center/crisis-detail/crisis-detail.component.html"> <code-pane header="crisis-detail.component.ts" path="router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts">
</code-pane> </code-pane>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

@ -698,5 +698,13 @@
"website": "https://brianflove.com", "website": "https://brianflove.com",
"bio": "Brian is a software engineer and GDE in Angular with a passion for learning, writing, speaking, teaching and mentoring. Brian has been building web applications for over 20 years and has long been a fanboy of JavaScript. When not in front of his Macbook Pro Brian is in the Rocky Mountains skiing or hiking.", "bio": "Brian is a software engineer and GDE in Angular with a passion for learning, writing, speaking, teaching and mentoring. Brian has been building web applications for over 20 years and has long been a fanboy of JavaScript. When not in front of his Macbook Pro Brian is in the Rocky Mountains skiing or hiking.",
"group": "GDE" "group": "GDE"
},
"jeffbcross": {
"name": "Jeff Cross",
"picture": "jeff-cross.jpg",
"twitter": "jeffbcross",
"website": "https://nrwl.io/",
"bio": "Jeff is an Angular Consultant at nrwl.io where he helps enterprise teams succeed with Angular. Prior to founding Nrwl, Jeff was one of the earliest members of the Angular Core Team at Google, and contributed to many of the early state management and performance efforts of AngularJS and Angular.",
"group": "GDE"
} }
} }

View File

@ -19,6 +19,12 @@
<td>Atlanta, Georgia</td> <td>Atlanta, Georgia</td>
<td>January 9 - 12, 2019</td> <td>January 9 - 12, 2019</td>
</tr> </tr>
<!-- ng-India 2019-->
<tr>
<th><a href="https://www.ng-ind.com/" title="ng-India">ng-India</a></th>
<td>Gurgaon, India</td>
<td>February 23, 2019</td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -8,7 +8,7 @@
<div class="feature-section"> <div class="feature-section">
<div class="feature-header"> <div class="feature-header">
<div class="text-headline">Cross Platform</div> <div class="text-headline">Cross Platform</div>
<img src="generated/images/marketing/features/feature-icon.svg" height="70px"> <img src="generated/images/marketing/features/feature-icon.svg" height="70px" alt="">
</div> </div>
<div class="feature-row"> <div class="feature-row">
@ -34,7 +34,7 @@
<div class="feature-section"> <div class="feature-section">
<div class="feature-header"> <div class="feature-header">
<div class="text-headline">Speed and Performance</div> <div class="text-headline">Speed and Performance</div>
<img src="generated/images/marketing/features/feature-icon.svg" height="70px"> <img src="generated/images/marketing/features/feature-icon.svg" height="70px" alt="">
</div> </div>
<div class="feature-row"> <div class="feature-row">
@ -59,7 +59,7 @@
<div class="feature-section"> <div class="feature-section">
<div class="feature-header"> <div class="feature-header">
<div class="text-headline">Productivity</div> <div class="text-headline">Productivity</div>
<img src="generated/images/marketing/features/feature-icon.svg" height="70px"> <img src="generated/images/marketing/features/feature-icon.svg" height="70px" alt="">
</div> </div>
<div class="feature-row"> <div class="feature-row">
@ -84,7 +84,7 @@
<div class="feature-section"> <div class="feature-section">
<div class="feature-header"> <div class="feature-header">
<div class="text-headline">Full Development Story</div> <div class="text-headline">Full Development Story</div>
<img src="generated/images/marketing/features/feature-icon.svg" height="70px"> <img src="generated/images/marketing/features/feature-icon.svg" height="70px" alt="">
</div> </div>
<div class="feature-row"> <div class="feature-row">

View File

@ -9,7 +9,7 @@
<!-- LOGO --> <!-- LOGO -->
<div class="hero-logo"> <div class="hero-logo">
<img src="assets/images/logos/angular/angular.svg"/> <img src="assets/images/logos/angular/angular.svg" alt="Angular"/>
</div> </div>
<!-- CONTAINER --> <!-- CONTAINER -->
@ -104,7 +104,7 @@
<div layout="row" layout-xs="column" class="home-row"> <div layout="row" layout-xs="column" class="home-row">
<a href="guide/quickstart"> <a href="guide/quickstart">
<div class="card"> <div class="card">
<img src="generated/images/marketing/home/code-icon.svg" height="70px"> <img src="generated/images/marketing/home/code-icon.svg" height="70px" alt="Angular quickstart">
<div class="card-text-container"> <div class="card-text-container">
<div class="text-headline">Get Started</div> <div class="text-headline">Get Started</div>
<p>Start building your Angular application.</p> <p>Start building your Angular application.</p>

View File

@ -20,7 +20,7 @@
<div class="presskit-row"> <div class="presskit-row">
<div class="presskit-inner"> <div class="presskit-inner">
<div class="presskit-image-container"> <div class="presskit-image-container">
<img src="assets/images/logos/angular/angular.svg" alt="Angular"> <img src="assets/images/logos/angular/angular.svg" alt="Full color logo Angular">
</div> </div>
<div> <div>
<h3 class="l-space-left-3">FULL COLOR LOGO</h3> <h3 class="l-space-left-3">FULL COLOR LOGO</h3>
@ -40,7 +40,7 @@
<div class="presskit-inner"> <div class="presskit-inner">
<div class="presskit-image-container"> <div class="presskit-image-container">
<div> <div>
<img src="assets/images/logos/angular/angular_solidBlack.svg"> <img src="assets/images/logos/angular/angular_solidBlack.svg" alt="Black logo Angular">
</div> </div>
</div> </div>
<div> <div>
@ -61,7 +61,7 @@
<div class="presskit-inner"> <div class="presskit-inner">
<div class="presskit-image-container"> <div class="presskit-image-container">
<div> <div>
<img src="assets/images/logos/angular/angular_whiteTransparent.svg" class="transparent-img-bg"> <img src="assets/images/logos/angular/angular_whiteTransparent.svg" class="transparent-img-bg" alt="Transparent logo Angular">
</div> </div>
</div> </div>
<div> <div>

View File

@ -753,6 +753,10 @@
{ {
"title": "日本語版", "title": "日本語版",
"url": "https://angular.jp/" "url": "https://angular.jp/"
},
{
"title": "한국어",
"url": "https://angular.kr/"
} }
] ]
} }

View File

@ -112,7 +112,7 @@ Inject `HttpClient` into the constructor in a private property called `http`.
</code-example> </code-example>
Keep injecting the `MessageService`. You'll call it so frequently that Keep injecting the `MessageService`. You'll call it so frequently that
you'll wrap it in private `log` method. you'll wrap it in a private `log()` method.
<code-example <code-example
path="toh-pt6/src/app/hero.service.ts" path="toh-pt6/src/app/hero.service.ts"

View File

@ -17,7 +17,7 @@
"build": "yarn ~~build", "build": "yarn ~~build",
"prebuild-local": "yarn setup-local", "prebuild-local": "yarn setup-local",
"build-local": "yarn ~~build", "build-local": "yarn ~~build",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 02d2ec250", "extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 699743282",
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint", "lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
"test": "yarn check-env && ng test", "test": "yarn check-env && ng test",
"pree2e": "yarn check-env && yarn update-webdriver", "pree2e": "yarn check-env && yarn update-webdriver",
@ -71,7 +71,7 @@
}, },
"engines": { "engines": {
"node": ">=10.9.0 <11.0.0", "node": ">=10.9.0 <11.0.0",
"yarn": ">=1.10.1 <1.13.0" "yarn": ">=1.10.1 <1.14.0"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
@ -107,7 +107,7 @@
"canonical-path": "1.0.0", "canonical-path": "1.0.0",
"chalk": "^2.1.0", "chalk": "^2.1.0",
"cjson": "^0.5.0", "cjson": "^0.5.0",
"codelyzer": "~4.2.1", "codelyzer": "~4.5.0",
"cross-spawn": "^5.1.0", "cross-spawn": "^5.1.0",
"css-selector-parser": "^1.3.0", "css-selector-parser": "^1.3.0",
"dgeni": "^0.4.11", "dgeni": "^0.4.11",

View File

@ -9,7 +9,7 @@ const SRC_DIR = resolve(__dirname, '../src');
const DIST_DIR = resolve(__dirname, '../dist'); const DIST_DIR = resolve(__dirname, '../dist');
// Run // Run
_main(process.argv.slice(2)); _main();
// Functions - Definitions // Functions - Definitions
function _main() { function _main() {

View File

@ -23,7 +23,7 @@
<mat-sidenav-container class="sidenav-container mat-drawer-container mat-sidenav-container" role="main"> <mat-sidenav-container class="sidenav-container mat-drawer-container mat-sidenav-container" role="main">
<mat-sidenav-content class="mat-drawer-content mat-sidenav-content"> <mat-sidenav-content class="mat-drawer-content mat-sidenav-content">
<section class="sidenav-content" role="content"> <section class="sidenav-content" role="article">
<aio-doc-viewer> <aio-doc-viewer>
<div class="content"> <div class="content">
<div class="nf-container l-flex-wrap flex-center"> <div class="nf-container l-flex-wrap flex-center">

View File

@ -52,7 +52,7 @@
</div> </div>
</mat-sidenav> </mat-sidenav>
<section class="sidenav-content" [id]="pageId" role="content"> <main class="sidenav-content" [id]="pageId" role="main">
<aio-mode-banner [mode]="deployment.mode" [version]="versionInfo"></aio-mode-banner> <aio-mode-banner [mode]="deployment.mode" [version]="versionInfo"></aio-mode-banner>
<aio-doc-viewer [class.no-animations]="isStarting" <aio-doc-viewer [class.no-animations]="isStarting"
[doc]="currentDocument" [doc]="currentDocument"
@ -62,7 +62,7 @@
(docRendered)="onDocRendered()"> (docRendered)="onDocRendered()">
</aio-doc-viewer> </aio-doc-viewer>
<aio-dt [on]="dtOn" [(doc)]="currentDocument"></aio-dt> <aio-dt [on]="dtOn" [(doc)]="currentDocument"></aio-dt>
</section> </main>
</mat-sidenav-container> </mat-sidenav-container>

View File

@ -52,7 +52,7 @@ describe('AppComponent', () => {
await newDocPromise; // Wait for the new document to be fetched. await newDocPromise; // Wait for the new document to be fetched.
fixture.detectChanges(); // Propagate document change to the view (i.e to `DocViewer`). fixture.detectChanges(); // Propagate document change to the view (i.e to `DocViewer`).
await docRenderedPromise; // Wait for the `docRendered` event. await docRenderedPromise; // Wait for the `docRendered` event.
}; }
function initializeTest(waitForDoc = true) { function initializeTest(waitForDoc = true) {
fixture = TestBed.createComponent(AppComponent); fixture = TestBed.createComponent(AppComponent);
@ -73,7 +73,7 @@ describe('AppComponent', () => {
tocService = de.injector.get<TocService>(TocService); tocService = de.injector.get<TocService>(TocService);
return waitForDoc && awaitDocRendered(); return waitForDoc && awaitDocRendered();
}; }
describe('with proper DocViewer', () => { describe('with proper DocViewer', () => {
@ -169,6 +169,13 @@ describe('AppComponent', () => {
expect(component.tocMaxHeight).toMatch(/^\d+\.\d{2}$/); expect(component.tocMaxHeight).toMatch(/^\d+\.\d{2}$/);
}); });
it('should update `scrollService.updateScrollPositonInHistory()`', () => {
const scrollService = fixture.debugElement.injector.get<ScrollService>(ScrollService);
spyOn(scrollService, 'updateScrollPositionInHistory');
component.onScroll();
expect(scrollService.updateScrollPositionInHistory).toHaveBeenCalled();
});
}); });
describe('SideNav', () => { describe('SideNav', () => {
@ -461,11 +468,15 @@ describe('AppComponent', () => {
let scrollService: ScrollService; let scrollService: ScrollService;
let scrollSpy: jasmine.Spy; let scrollSpy: jasmine.Spy;
let scrollToTopSpy: jasmine.Spy; let scrollToTopSpy: jasmine.Spy;
let scrollAfterRenderSpy: jasmine.Spy;
let removeStoredScrollPositionSpy: jasmine.Spy;
beforeEach(() => { beforeEach(() => {
scrollService = fixture.debugElement.injector.get<ScrollService>(ScrollService); scrollService = fixture.debugElement.injector.get<ScrollService>(ScrollService);
scrollSpy = spyOn(scrollService, 'scroll'); scrollSpy = spyOn(scrollService, 'scroll');
scrollToTopSpy = spyOn(scrollService, 'scrollToTop'); scrollToTopSpy = spyOn(scrollService, 'scrollToTop');
scrollAfterRenderSpy = spyOn(scrollService, 'scrollAfterRender');
removeStoredScrollPositionSpy = spyOn(scrollService, 'removeStoredScrollPosition');
}); });
it('should not scroll immediately when the docId (path) changes', () => { it('should not scroll immediately when the docId (path) changes', () => {
@ -510,33 +521,24 @@ describe('AppComponent', () => {
expect(scrollSpy).toHaveBeenCalledTimes(1); expect(scrollSpy).toHaveBeenCalledTimes(1);
}); });
it('should scroll to top when call `onDocRemoved` directly', () => { it('should call `removeStoredScrollPosition` when call `onDocRemoved` directly', () => {
scrollToTopSpy.calls.reset();
component.onDocRemoved(); component.onDocRemoved();
expect(scrollToTopSpy).toHaveBeenCalled(); expect(removeStoredScrollPositionSpy).toHaveBeenCalled();
}); });
it('should scroll after a delay when call `onDocInserted` directly', fakeAsync(() => { it('should call `scrollAfterRender` when call `onDocInserted` directly', (() => {
component.onDocInserted(); component.onDocInserted();
expect(scrollSpy).not.toHaveBeenCalled(); expect(scrollAfterRenderSpy).toHaveBeenCalledWith(scrollDelay);
tick(scrollDelay);
expect(scrollSpy).toHaveBeenCalled();
})); }));
it('should scroll (via `onDocInserted`) when finish navigating to a new doc', fakeAsync(() => { it('should call `scrollAfterRender` (via `onDocInserted`) when navigate to a new Doc', fakeAsync(() => {
expect(scrollToTopSpy).not.toHaveBeenCalled();
locationService.go('guide/pipes'); locationService.go('guide/pipes');
tick(1); // triggers the HTTP response for the document tick(1); // triggers the HTTP response for the document
fixture.detectChanges(); // triggers the event that calls `onDocInserted` fixture.detectChanges(); // triggers the event that calls `onDocInserted`
expect(scrollToTopSpy).toHaveBeenCalled(); expect(scrollAfterRenderSpy).toHaveBeenCalledWith(scrollDelay);
expect(scrollSpy).not.toHaveBeenCalled();
tick(scrollDelay); tick(500); // there are other outstanding timers in the AppComponent that are not relevant
expect(scrollSpy).toHaveBeenCalled();
})); }));
}); });
@ -1071,7 +1073,7 @@ describe('AppComponent', () => {
it('should set the id of the doc viewer container based on the current doc', () => { it('should set the id of the doc viewer container based on the current doc', () => {
initializeTest(false); initializeTest(false);
const container = fixture.debugElement.query(By.css('section.sidenav-content')); const container = fixture.debugElement.query(By.css('main.sidenav-content'));
navigateTo('guide/pipes'); navigateTo('guide/pipes');
expect(component.pageId).toEqual('guide-pipes'); expect(component.pageId).toEqual('guide-pipes');
@ -1088,7 +1090,7 @@ describe('AppComponent', () => {
it('should not be affected by changes to the query', () => { it('should not be affected by changes to the query', () => {
initializeTest(false); initializeTest(false);
const container = fixture.debugElement.query(By.css('section.sidenav-content')); const container = fixture.debugElement.query(By.css('main.sidenav-content'));
navigateTo('guide/pipes'); navigateTo('guide/pipes');
navigateTo('guide/other?search=http'); navigateTo('guide/other?search=http');

View File

@ -127,7 +127,7 @@ export class AppComponent implements OnInit {
} }
if (path === this.currentPath) { if (path === this.currentPath) {
// scroll only if on same page (most likely a change to the hash) // scroll only if on same page (most likely a change to the hash)
this.autoScroll(); this.scrollService.scroll();
} else { } else {
// don't scroll; leave that to `onDocRendered` // don't scroll; leave that to `onDocRendered`
this.currentPath = path; this.currentPath = path;
@ -187,11 +187,6 @@ export class AppComponent implements OnInit {
.subscribe(() => this.updateShell()); .subscribe(() => this.updateShell());
} }
// Scroll to the anchor in the hash fragment or top of doc.
autoScroll() {
this.scrollService.scroll();
}
onDocReady() { onDocReady() {
// About to transition to new view. // About to transition to new view.
this.isTransitioning = true; this.isTransitioning = true;
@ -204,9 +199,7 @@ export class AppComponent implements OnInit {
} }
onDocRemoved() { onDocRemoved() {
// The previous document has been removed. this.scrollService.removeStoredScrollPosition();
// Scroll to top to restore a clean visual state for the new document.
this.scrollService.scrollToTop();
} }
onDocInserted() { onDocInserted() {
@ -216,9 +209,8 @@ export class AppComponent implements OnInit {
// (e.g. sidenav, host classes) needs to happen asynchronously. // (e.g. sidenav, host classes) needs to happen asynchronously.
setTimeout(() => this.updateShell()); setTimeout(() => this.updateShell());
// Scroll 500ms after the new document has been inserted into the doc-viewer. // Scroll the good position depending on the context
// The delay is to allow time for async layout to complete. this.scrollService.scrollAfterRender(500);
setTimeout(() => this.autoScroll(), 500);
} }
onDocRendered() { onDocRendered() {
@ -242,7 +234,7 @@ export class AppComponent implements OnInit {
@HostListener('window:resize', ['$event.target.innerWidth']) @HostListener('window:resize', ['$event.target.innerWidth'])
onResize(width: number) { onResize(width: number) {
this.isSideBySide = width > this.sideBySideWidth; this.isSideBySide = width >= this.sideBySideWidth;
this.showFloatingToc.next(width > this.showFloatingTocWidth); this.showFloatingToc.next(width > this.showFloatingTocWidth);
if (this.isSideBySide && !this.isSideNavDoc) { if (this.isSideBySide && !this.isSideNavDoc) {
@ -256,7 +248,6 @@ export class AppComponent implements OnInit {
@HostListener('click', ['$event.target', '$event.button', '$event.ctrlKey', '$event.metaKey', '$event.altKey']) @HostListener('click', ['$event.target', '$event.button', '$event.ctrlKey', '$event.metaKey', '$event.altKey'])
onClick(eventTarget: HTMLElement, button: number, ctrlKey: boolean, metaKey: boolean, altKey: boolean): boolean { onClick(eventTarget: HTMLElement, button: number, ctrlKey: boolean, metaKey: boolean, altKey: boolean): boolean {
// Hide the search results if we clicked outside both the "search box" and the "search results" // Hide the search results if we clicked outside both the "search box" and the "search results"
if (!this.searchElements.some(element => element.nativeElement.contains(eventTarget))) { if (!this.searchElements.some(element => element.nativeElement.contains(eventTarget))) {
this.hideSearchResults(); this.hideSearchResults();
@ -348,6 +339,9 @@ export class AppComponent implements OnInit {
// Dynamically change height of table of contents container // Dynamically change height of table of contents container
@HostListener('window:scroll') @HostListener('window:scroll')
onScroll() { onScroll() {
this.scrollService.updateScrollPositionInHistory();
if (!this.tocMaxHeightOffset) { if (!this.tocMaxHeightOffset) {
// Must wait until `mat-toolbar` is measurable. // Must wait until `mat-toolbar` is measurable.
const el = this.hostElement.nativeElement as Element; const el = this.hostElement.nativeElement as Element;

View File

@ -46,7 +46,7 @@ export interface Announcement {
template: ` template: `
<div class="homepage-container" *ngIf="announcement"> <div class="homepage-container" *ngIf="announcement">
<div class="announcement-bar"> <div class="announcement-bar">
<img [src]="announcement.imageUrl"> <img [src]="announcement.imageUrl" alt="">
<p [innerHTML]="announcement.message"></p> <p [innerHTML]="announcement.message"></p>
<a class="button" [href]="announcement.linkUrl">Learn More</a> <a class="button" [href]="announcement.linkUrl">Learn More</a>
</div> </div>

View File

@ -125,7 +125,7 @@ export class ApiListComponent implements OnInit {
return status === 'all' || return status === 'all' ||
status === item.stability || status === item.stability ||
(status === 'security-risk' && item.securityRisk); (status === 'security-risk' && item.securityRisk);
}; }
function matchesType() { function matchesType() {
return type === 'all' || type === item.docType; return type === 'all' || type === item.docType;

View File

@ -54,7 +54,7 @@ export class ApiService implements OnDestroy {
section.items.every(item => item.stability === 'deprecated'); section.items.every(item => item.stability === 'deprecated');
}); });
})); }));
}; }
constructor(private http: HttpClient, private logger: Logger) { } constructor(private http: HttpClient, private logger: Logger) { }

View File

@ -46,7 +46,7 @@ export interface TabInfo {
export class CodeTabsComponent implements OnInit, AfterViewInit { export class CodeTabsComponent implements OnInit, AfterViewInit {
tabs: TabInfo[]; tabs: TabInfo[];
@Input('linenums') linenums: string; @Input() linenums: string;
@ViewChild('content') content; @ViewChild('content') content;

View File

@ -79,7 +79,7 @@ describe('ContributorListComponent', () => {
return comp; return comp;
} }
interface SearchResult { [index: string]: string; }; interface SearchResult { [index: string]: string; }
class TestLocationService { class TestLocationService {
searchResult: SearchResult = {}; searchResult: SearchResult = {};

View File

@ -245,7 +245,7 @@ class FakeComponentFactory extends ComponentFactory<any> {
rootSelectorOrNode?: string | any, rootSelectorOrNode?: string | any,
ngModule?: NgModuleRef<any>): ComponentRef<any> { ngModule?: NgModuleRef<any>): ComponentRef<any> {
return jasmine.createSpy('ComponentRef') as any; return jasmine.createSpy('ComponentRef') as any;
}; }
} }
class FakeComponentFactoryResolver extends ComponentFactoryResolver { class FakeComponentFactoryResolver extends ComponentFactoryResolver {

View File

@ -37,6 +37,6 @@ describe('Getting Started NgFor Component', () => {
component.parseError$.subscribe(error => { component.parseError$.subscribe(error => {
expect(error).toBeTruthy(); expect(error).toBeTruthy();
}) });
}); });
}); });

View File

@ -46,6 +46,6 @@ describe('Getting Started NgIf Component', () => {
component.parseError$.subscribe(error => { component.parseError$.subscribe(error => {
expect(error).toBeTruthy(); expect(error).toBeTruthy();
}) });
}); });
}); });

View File

@ -26,7 +26,7 @@ export class ResourceService {
(categories as ConnectableObservable<Category[]>).connect(); (categories as ConnectableObservable<Category[]>).connect();
return categories; return categories;
}; }
} }
// Extract sorted Category[] from resource JSON data // Extract sorted Category[] from resource JSON data

View File

@ -100,9 +100,10 @@ export class DocViewerComponent implements OnDestroy {
if (needsToc && !embeddedToc) { if (needsToc && !embeddedToc) {
// Add an embedded ToC if it's needed and there isn't one in the content already. // Add an embedded ToC if it's needed and there isn't one in the content already.
titleEl!.insertAdjacentHTML('afterend', '<aio-toc class="embedded"></aio-toc>'); titleEl!.insertAdjacentHTML('afterend', '<aio-toc class="embedded"></aio-toc>');
} else if (!needsToc && embeddedToc) { } else if (!needsToc && embeddedToc && embeddedToc.parentNode !== null) {
// Remove the embedded Toc if it's there and not needed. // Remove the embedded Toc if it's there and not needed.
embeddedToc.remove(); // We cannot use ChildNode.remove() because of IE11
embeddedToc.parentNode.removeChild(embeddedToc);
} }
return () => { return () => {

View File

@ -15,7 +15,7 @@ import { DocumentContents } from 'app/documents/document.service';
export class DtComponent { export class DtComponent {
@Input() on = false; @Input() on = false;
@Input('doc') doc: DocumentContents; @Input() doc: DocumentContents;
@Output() docChange = new EventEmitter<DocumentContents>(); @Output() docChange = new EventEmitter<DocumentContents>();
@ViewChild('dt', { read: ElementRef }) @ViewChild('dt', { read: ElementRef })

View File

@ -14,4 +14,4 @@ export class Deployment {
mode: string = this.location.search()['mode'] || environment.mode; mode: string = this.location.search()['mode'] || environment.mode;
constructor(private location: LocationService) {} constructor(private location: LocationService) {}
}; }

View File

@ -1,6 +1,8 @@
import { ReflectiveInjector } from '@angular/core'; import { ReflectiveInjector } from '@angular/core';
import { PlatformLocation } from '@angular/common'; import { Location, LocationStrategy, PlatformLocation, ViewportScroller } from '@angular/common';
import { DOCUMENT } from '@angular/common'; import { DOCUMENT } from '@angular/common';
import { MockLocationStrategy, SpyLocation } from '@angular/common/testing';
import { fakeAsync, tick } from '@angular/core/testing';
import { ScrollService, topMargin } from './scroll.service'; import { ScrollService, topMargin } from './scroll.service';
@ -8,8 +10,9 @@ describe('ScrollService', () => {
const topOfPageElem = {} as Element; const topOfPageElem = {} as Element;
let injector: ReflectiveInjector; let injector: ReflectiveInjector;
let document: MockDocument; let document: MockDocument;
let location: MockPlatformLocation; let platformLocation: MockPlatformLocation;
let scrollService: ScrollService; let scrollService: ScrollService;
let location: SpyLocation;
class MockPlatformLocation { class MockPlatformLocation {
hash: string; hash: string;
@ -27,6 +30,11 @@ describe('ScrollService', () => {
scrollIntoView = jasmine.createSpy('Element scrollIntoView'); scrollIntoView = jasmine.createSpy('Element scrollIntoView');
} }
const viewportScrollerStub = jasmine.createSpyObj(
'viewportScroller',
['getScrollPosition', 'scrollToPosition']);
beforeEach(() => { beforeEach(() => {
spyOn(window, 'scrollBy'); spyOn(window, 'scrollBy');
}); });
@ -34,12 +42,24 @@ describe('ScrollService', () => {
beforeEach(() => { beforeEach(() => {
injector = ReflectiveInjector.resolveAndCreate([ injector = ReflectiveInjector.resolveAndCreate([
ScrollService, ScrollService,
{ provide: Location, useClass: SpyLocation },
{ provide: DOCUMENT, useClass: MockDocument }, { provide: DOCUMENT, useClass: MockDocument },
{ provide: PlatformLocation, useClass: MockPlatformLocation } { provide: PlatformLocation, useClass: MockPlatformLocation },
{ provide: ViewportScroller, useValue: viewportScrollerStub },
{ provide: LocationStrategy, useClass: MockLocationStrategy }
]); ]);
location = injector.get(PlatformLocation); platformLocation = injector.get(PlatformLocation);
document = injector.get(DOCUMENT); document = injector.get(DOCUMENT);
scrollService = injector.get(ScrollService); scrollService = injector.get(ScrollService);
location = injector.get(Location);
});
it('should set `scrollRestoration` to `manual` if supported', () => {
if (scrollService.supportManualScrollRestoration) {
expect(window.history.scrollRestoration).toBe('manual');
} else {
expect(window.history.scrollRestoration).toBeUndefined();
}
}); });
describe('#topOffset', () => { describe('#topOffset', () => {
@ -107,7 +127,7 @@ describe('ScrollService', () => {
describe('#scroll', () => { describe('#scroll', () => {
it('should scroll to the top if there is no hash', () => { it('should scroll to the top if there is no hash', () => {
location.hash = ''; platformLocation.hash = '';
const topOfPage = new MockElement(); const topOfPage = new MockElement();
document.getElementById.and document.getElementById.and
@ -118,7 +138,7 @@ describe('ScrollService', () => {
}); });
it('should not scroll if the hash does not match an element id', () => { it('should not scroll if the hash does not match an element id', () => {
location.hash = 'not-found'; platformLocation.hash = 'not-found';
document.getElementById.and.returnValue(null); document.getElementById.and.returnValue(null);
scrollService.scroll(); scrollService.scroll();
@ -128,7 +148,7 @@ describe('ScrollService', () => {
it('should scroll to the element whose id matches the hash', () => { it('should scroll to the element whose id matches the hash', () => {
const element = new MockElement(); const element = new MockElement();
location.hash = 'some-id'; platformLocation.hash = 'some-id';
document.getElementById.and.returnValue(element); document.getElementById.and.returnValue(element);
scrollService.scroll(); scrollService.scroll();
@ -139,7 +159,7 @@ describe('ScrollService', () => {
it('should scroll to the element whose id matches the hash with encoded characters', () => { it('should scroll to the element whose id matches the hash with encoded characters', () => {
const element = new MockElement(); const element = new MockElement();
location.hash = '%F0%9F%91%8D'; // 👍 platformLocation.hash = '%F0%9F%91%8D'; // 👍
document.getElementById.and.returnValue(element); document.getElementById.and.returnValue(element);
scrollService.scroll(); scrollService.scroll();
@ -210,4 +230,136 @@ describe('ScrollService', () => {
}); });
}); });
describe('#isLocationWithHash', () => {
it('should return true when the location has a hash', () => {
platformLocation.hash = 'anchor';
expect(scrollService.isLocationWithHash()).toBe(true);
});
it('should return false when the location has no hash', () => {
platformLocation.hash = '';
expect(scrollService.isLocationWithHash()).toBe(false);
});
});
describe('#needToFixScrollPosition', async() => {
it('should return true when popState event was fired after a back navigation if the browser supports ' +
'scrollRestoration`. Otherwise, needToFixScrollPosition() returns false', () => {
if (scrollService.supportManualScrollRestoration) {
location.go('/initial-url1');
// We simulate a scroll down
location.replaceState('/initial-url1', 'hack', {scrollPosition: [2000, 0]});
location.go('/initial-url2');
location.back();
expect(scrollService.popStateFired).toBe(true);
expect(scrollService.scrollPosition).toEqual([2000, 0]);
expect(scrollService.needToFixScrollPosition()).toBe(true);
} else {
location.go('/initial-url1');
location.go('/initial-url2');
location.back();
expect(scrollService.popStateFired).toBe(false); // popStateFired is always false
expect(scrollService.scrollPosition).toEqual([0, 0]); // scrollPosition always equals [0, 0]
expect(scrollService.needToFixScrollPosition()).toBe(false);
}
});
it('should return true when popState event was fired after a forward navigation if the browser supports ' +
'scrollRestoration`. Otherwise, needToFixScrollPosition() returns false', () => {
if (scrollService.supportManualScrollRestoration) {
location.go('/initial-url1');
location.go('/initial-url2');
// We simulate a scroll down
location.replaceState('/initial-url1', 'hack', {scrollPosition: [2000, 0]});
location.back();
scrollService.popStateFired = false;
scrollService.scrollPosition = [0, 0];
location.forward();
expect(scrollService.popStateFired).toBe(true);
expect(scrollService.scrollPosition).toEqual([2000, 0]);
expect(scrollService.needToFixScrollPosition()).toBe(true);
} else {
location.go('/initial-url1');
location.go('/initial-url2');
location.back();
location.forward();
expect(scrollService.popStateFired).toBe(false); // popStateFired is always false
expect(scrollService.scrollPosition).toEqual([0, 0]); // scrollPosition always equals [0, 0]
expect(scrollService.needToFixScrollPosition()).toBe(false);
}
});
});
describe('#scrollAfterRender', async() => {
let scrollSpy: jasmine.Spy;
let scrollToTopSpy: jasmine.Spy;
let needToFixScrollPositionSpy: jasmine.Spy;
let scrollToPosition: jasmine.Spy;
let isLocationWithHashSpy: jasmine.Spy;
let getStoredScrollPositionSpy: jasmine.Spy;
const scrollDelay = 500;
beforeEach(() => {
scrollSpy = spyOn(scrollService, 'scroll');
scrollToTopSpy = spyOn(scrollService, 'scrollToTop');
scrollToPosition = spyOn(scrollService, 'scrollToPosition');
needToFixScrollPositionSpy = spyOn(scrollService, 'needToFixScrollPosition');
getStoredScrollPositionSpy = spyOn(scrollService, 'getStoredScrollPosition');
isLocationWithHashSpy = spyOn(scrollService, 'isLocationWithHash');
});
it('should call `scroll` when we navigate to a location with anchor', fakeAsync(() => {
needToFixScrollPositionSpy.and.returnValue(false);
getStoredScrollPositionSpy.and.returnValue(null);
isLocationWithHashSpy.and.returnValue(true);
scrollService.scrollAfterRender(scrollDelay);
expect(scrollSpy).not.toHaveBeenCalled();
tick(scrollDelay);
expect(scrollSpy).toHaveBeenCalled();
}));
it('should call `scrollToTop` when we navigate to a location without anchor', fakeAsync(() => {
needToFixScrollPositionSpy.and.returnValue(false);
getStoredScrollPositionSpy.and.returnValue(null);
isLocationWithHashSpy.and.returnValue(false);
scrollService.scrollAfterRender(scrollDelay);
expect(scrollToTopSpy).toHaveBeenCalled();
tick(scrollDelay);
expect(scrollSpy).not.toHaveBeenCalled();
}));
it('should call `viewportScroller.scrollToPosition` when we reload a page', fakeAsync(() => {
getStoredScrollPositionSpy.and.returnValue([0, 1000]);
scrollService.scrollAfterRender(scrollDelay);
expect(viewportScrollerStub.scrollToPosition).toHaveBeenCalled();
expect(getStoredScrollPositionSpy).toHaveBeenCalled();
}));
it('should call `scrollToPosition` after a popState', fakeAsync(() => {
needToFixScrollPositionSpy.and.returnValue(true);
getStoredScrollPositionSpy.and.returnValue(null);
scrollService.scrollAfterRender(scrollDelay);
expect(scrollToPosition).toHaveBeenCalled();
tick(scrollDelay);
expect(scrollSpy).not.toHaveBeenCalled();
expect(scrollToTopSpy).not.toHaveBeenCalled();
}));
});
}); });

View File

@ -1,5 +1,5 @@
import { Injectable, Inject } from '@angular/core'; import { Injectable, Inject } from '@angular/core';
import { PlatformLocation } from '@angular/common'; import { Location, PlatformLocation, ViewportScroller } from '@angular/common';
import { DOCUMENT } from '@angular/common'; import { DOCUMENT } from '@angular/common';
import { fromEvent } from 'rxjs'; import { fromEvent } from 'rxjs';
@ -13,6 +13,13 @@ export class ScrollService {
private _topOffset: number | null; private _topOffset: number | null;
private _topOfPageElement: Element; private _topOfPageElement: Element;
// true when popState event has been fired.
popStateFired = false;
// scroll position which has to be restored after the popState event
scrollPosition: [number, number] = [0, 0];
// true when the browser supports `scrollTo`, `scrollX`, `scrollY` and `scrollRestoration`
supportManualScrollRestoration: boolean;
// Offset from the top of the document to bottom of any static elements // Offset from the top of the document to bottom of any static elements
// at the top (e.g. toolbar) + some margin // at the top (e.g. toolbar) + some margin
get topOffset() { get topOffset() {
@ -32,9 +39,37 @@ export class ScrollService {
constructor( constructor(
@Inject(DOCUMENT) private document: any, @Inject(DOCUMENT) private document: any,
private location: PlatformLocation) { private platformLocation: PlatformLocation,
private viewportScroller: ViewportScroller,
private location: Location) {
// On resize, the toolbar might change height, so "invalidate" the top offset. // On resize, the toolbar might change height, so "invalidate" the top offset.
fromEvent(window, 'resize').subscribe(() => this._topOffset = null); fromEvent(window, 'resize').subscribe(() => this._topOffset = null);
try {
this.supportManualScrollRestoration = !!window && !!window.scrollTo && 'scrollX' in window
&& 'scrollY' in window && !!history && !!history.scrollRestoration;
} catch {
this.supportManualScrollRestoration = false;
}
// Change scroll restoration strategy to `manual` if it's supported
if (this.supportManualScrollRestoration) {
history.scrollRestoration = 'manual';
// we have to detect forward and back navigation thanks to popState event
this.location.subscribe(event => {
// the type is `hashchange` when the fragment identifier of the URL has changed. It allows us to go to position
// just before a click on an anchor
if (event.type === 'hashchange') {
this.scrollToPosition();
} else {
// The popstate event is always triggered by doing a browser action such as a click on the back or forward button.
// It can be follow by a event of type `hashchange`.
this.popStateFired = true;
// we always should have a scrollPosition in our state history
this.scrollPosition = event.state ? event.state['scrollPosition'] : null;
}
});
}
} }
/** /**
@ -50,6 +85,44 @@ export class ScrollService {
this.scrollToElement(element); this.scrollToElement(element);
} }
/**
* test if the current location has a hash
*/
isLocationWithHash(): boolean {
return !!this.getCurrentHash();
}
/**
* When we load a document, we have to scroll to the correct position depending on whether this is a new location,
* a back/forward in the history, or a refresh
* @param delay before we scroll to the good position
*/
scrollAfterRender(delay: number) {
// If we do rendering following a refresh, we use the scroll position from the storage.
const storedScrollPosition = this.getStoredScrollPosition();
if (storedScrollPosition) {
this.viewportScroller.scrollToPosition(storedScrollPosition);
} else {
if (this.needToFixScrollPosition()) {
// The document was reloaded following a popState `event` (called by the forward/back button), so we manage
// the scroll position
this.scrollToPosition();
} else {
// The document was loaded either of the following cases: a direct navigation via typing the URL in the
// address bar or a click on a link. If the location contains a hash, we have to wait for async
// layout.
if (this.isLocationWithHash()) {
// Scroll 500ms after the new document has been inserted into the doc-viewer.
// The delay is to allow time for async layout to complete.
setTimeout(() => this.scroll(), delay);
} else {
// If the location doesn't contain a hash, we scroll to the top of the page.
this.scrollToTop();
}
}
}
}
/** /**
* Scroll to the element. * Scroll to the element.
* Don't scroll if no element. * Don't scroll if no element.
@ -79,10 +152,42 @@ export class ScrollService {
this.scrollToElement(this.topOfPageElement); this.scrollToElement(this.topOfPageElement);
} }
scrollToPosition() {
this.viewportScroller.scrollToPosition(this.scrollPosition);
this.popStateFired = false;
}
/**
* Update the state with scroll position into history.
*/
updateScrollPositionInHistory() {
if (this.supportManualScrollRestoration) {
const currentScrollPosition = this.viewportScroller.getScrollPosition();
this.location.replaceState(this.location.path(true), undefined, {scrollPosition: currentScrollPosition});
window.sessionStorage.setItem('scrollPosition', currentScrollPosition.toString());
}
}
getStoredScrollPosition(): [number, number] | null {
const position = window.sessionStorage.getItem('scrollPosition');
return position ? JSON.parse('[' + position + ']') : null;
}
removeStoredScrollPosition() {
window.sessionStorage.removeItem('scrollPosition');
}
/**
* Check if the scroll position need to be manually fixed after popState event
*/
needToFixScrollPosition(): boolean {
return this.popStateFired && this.scrollPosition && this.supportManualScrollRestoration;
}
/** /**
* Return the hash fragment from the `PlatformLocation`, minus the leading `#`. * Return the hash fragment from the `PlatformLocation`, minus the leading `#`.
*/ */
private getCurrentHash() { private getCurrentHash() {
return decodeURIComponent(this.location.hash.replace(/^#/, '')); return decodeURIComponent(this.platformLocation.hash.replace(/^#/, ''));
} }
} }

View File

@ -68,7 +68,10 @@ export class TocService {
} }
} }
// now remove the anchor // now remove the anchor
anchorLink.remove(); if (anchorLink.parentNode !== null) {
// We cannot use ChildNode.remove() because of IE11
anchorLink.parentNode.removeChild(anchorLink);
}
} }
// security: the document element which provides this heading content // security: the document element which provides this heading content
// is always authored by the documentation team and is considered to be safe // is always authored by the documentation team and is considered to be safe

View File

@ -93,7 +93,7 @@
<div class="background-sky hero"></div> <div class="background-sky hero"></div>
<section id="intro" style="text-shadow: 1px 1px #1976d2;"> <section id="intro" style="text-shadow: 1px 1px #1976d2;">
<div class="hero-logo"> <div class="hero-logo">
<img src="assets/images/logos/angular/angular.svg" width="250" height="250"> <img src="assets/images/logos/angular/angular.svg" width="250" height="250" alt="Angular">
</div> </div>
<div class="homepage-container"> <div class="homepage-container">
<div class="hero-headline">One framework.<br>Mobile &amp; desktop.</div> <div class="hero-headline">One framework.<br>Mobile &amp; desktop.</div>

View File

@ -268,13 +268,13 @@ section#intro {
aio-shell { aio-shell {
&.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute { &.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute {
section { main {
padding: 0rem 0rem 3rem; padding: 0rem 0rem 3rem;
} }
} }
&.page-home { &.page-home {
section { main {
padding: 0; padding: 0;
} }
} }

View File

@ -47,6 +47,7 @@ aio-shell.page-resources mat-toolbar.mat-toolbar {
// DOCS PAGES OVERRIDE: HAMBURGER // DOCS PAGES OVERRIDE: HAMBURGER
aio-shell.folder-api mat-toolbar.mat-toolbar, aio-shell.folder-api mat-toolbar.mat-toolbar,
aio-shell.folder-cli mat-toolbar.mat-toolbar,
aio-shell.folder-docs mat-toolbar.mat-toolbar, aio-shell.folder-docs mat-toolbar.mat-toolbar,
aio-shell.folder-guide mat-toolbar.mat-toolbar, aio-shell.folder-guide mat-toolbar.mat-toolbar,
aio-shell.folder-tutorial mat-toolbar.mat-toolbar { aio-shell.folder-tutorial mat-toolbar.mat-toolbar {

View File

@ -74,6 +74,12 @@
vertical-align: top; vertical-align: top;
} }
} }
&.property-table {
td {
vertical-align: top;
}
}
} }
.class-overview { .class-overview {
@ -87,19 +93,6 @@
.short-description { .short-description {
margin: 6px 0 0 10px; margin: 6px 0 0 10px;
} }
.properties-table {
font-size: 14px;
thead th {
&:nth-child(1) {
width: 20%;
}
&:nth-child(2) {
width: 20%;
}
}
}
} }
.breadcrumb-container { .breadcrumb-container {

View File

@ -89,7 +89,7 @@ aio-notification {
} }
&.page-home, &.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute { &.page-home, &.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute {
section { main {
padding-top: $notificationHeight; padding-top: $notificationHeight;
} }
} }

View File

@ -7,10 +7,14 @@ describe(browser.baseUrl, () => {
const stripQuery = (url: string) => url.replace(/\?.*$/, ''); const stripQuery = (url: string) => url.replace(/\?.*$/, '');
const stripTrailingSlash = (url: string) => url.replace(/\/$/, ''); const stripTrailingSlash = (url: string) => url.replace(/\/$/, '');
beforeAll(done => page.init().then(done)); beforeAll(() => page.init());
beforeEach(() => browser.waitForAngularEnabled(false)); beforeEach(() => browser.waitForAngularEnabled(false));
afterEach(() => browser.waitForAngularEnabled(true));
afterEach(async () => {
await page.unregisterSw();
await browser.waitForAngularEnabled(true);
});
describe('(with sitemap URLs)', () => { describe('(with sitemap URLs)', () => {
page.sitemapUrls.forEach((path, i) => { page.sitemapUrls.forEach((path, i) => {
@ -34,7 +38,7 @@ describe(browser.baseUrl, () => {
const actualUrl = await getCurrentUrl(); const actualUrl = await getCurrentUrl();
expect(actualUrl).toBe(expectedUrl); expect(actualUrl).toBe(expectedUrl);
}, 60000); }, 120000);
}); });
}); });

View File

@ -38,19 +38,14 @@ export class SitePage {
} }
/** /**
* Navigate to a URL, disable animations, unregister the ServiceWorker, and wait for Angular. * Navigate to a URL, disable animations, wait for Angular and unregister the ServiceWorker.
* (The SW is unregistered to ensure that subsequent requests are passed through to the server.) * (The SW is unregistered to ensure that subsequent requests are passed through to the server.)
*/ */
async goTo(url: string) { async goTo(url: string) {
const unregisterServiceWorker = (cb: () => void) => navigator.serviceWorker
.getRegistrations()
.then(regs => Promise.all(regs.map(reg => reg.unregister())))
.then(cb);
await browser.get(url || this.baseUrl); await browser.get(url || this.baseUrl);
await browser.executeScript('document.body.classList.add(\'no-animations\')'); await browser.executeScript('document.body.classList.add(\'no-animations\')');
await browser.executeAsyncScript(unregisterServiceWorker);
await browser.waitForAngular(); await browser.waitForAngular();
await this.unregisterSw();
}; };
/** /**
@ -60,4 +55,16 @@ export class SitePage {
// Make an initial request to unregister the ServiceWorker. // Make an initial request to unregister the ServiceWorker.
await this.goTo(''); await this.goTo('');
} }
/**
* Unregister the ServiceWorker (if registered).
*/
async unregisterSw() {
const unregisterSwFn = (cb: () => void) => navigator.serviceWorker
.getRegistrations()
.then(regs => Promise.all(regs.map(reg => reg.unregister())))
.then(cb);
await browser.executeAsyncScript(unregisterSwFn);
}
} }

View File

@ -4,10 +4,14 @@ import { SitePage } from './site.po';
describe(browser.baseUrl, () => { describe(browser.baseUrl, () => {
const page = new SitePage(); const page = new SitePage();
beforeAll(done => page.init().then(done)); beforeAll(() => page.init());
beforeEach(() => browser.waitForAngularEnabled(false)); beforeEach(() => browser.waitForAngularEnabled(false));
afterEach(() => browser.waitForAngularEnabled(true));
afterEach(async () => {
await page.unregisterSw();
await browser.waitForAngularEnabled(true);
});
describe('(smoke tests)', () => { describe('(smoke tests)', () => {
it('should show the home page', () => { it('should show the home page', () => {

View File

@ -12,7 +12,7 @@
}, },
"engines": { "engines": {
"node": ">=10.9.0 <11.0.0", "node": ">=10.9.0 <11.0.0",
"yarn": ">=1.10.1 <1.13.0" "yarn": ">=1.10.1 <1.14.0"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

View File

@ -1,10 +1,14 @@
module.exports = function processCliCommands() { module.exports = function processCliCommands(createDocMessage) {
return { return {
$runAfter: ['extra-docs-added'], $runAfter: ['extra-docs-added'],
$runBefore: ['rendering-docs'], $runBefore: ['rendering-docs'],
$process(docs) { $process(docs) {
const navigationDoc = docs.find(doc => doc.docType === 'navigation-json'); const navigationDoc = docs.find(doc => doc.docType === 'navigation-json');
const navigationNode = navigationDoc && navigationDoc.data['SideNav'].find(node => node.title === 'CLI Commands'); const navigationNode = navigationDoc && navigationDoc.data['SideNav'].find(node => node.children && node.children.length && node.children[0].url === 'cli');
if (!navigationNode) {
throw new Error(createDocMessage('Missing `cli` url - CLI Commands must include a first child node with url set at `cli`', navigationDoc));
}
docs.forEach(doc => { docs.forEach(doc => {
if (doc.docType === 'cli-command') { if (doc.docType === 'cli-command') {
@ -14,10 +18,8 @@ module.exports = function processCliCommands() {
processOptions(doc, doc.options); processOptions(doc, doc.options);
// Add to navigation doc // Add to navigation doc
if (navigationNode) {
navigationNode.children.push({ url: doc.path, title: `ng ${doc.name}` }); navigationNode.children.push({ url: doc.path, title: `ng ${doc.name}` });
} }
}
}); });
} }
}; };
@ -28,11 +30,6 @@ function processOptions(container, options) {
container.namedOptions = []; container.namedOptions = [];
options.forEach(option => { options.forEach(option => {
if (option.type === 'boolean' && option.default === undefined) {
option.default = false;
}
// Ignore any hidden options // Ignore any hidden options
if (option.hidden) { return; } if (option.hidden) { return; }

View File

@ -1,41 +1,51 @@
const testPackage = require('../../helpers/test-package'); const testPackage = require('../../helpers/test-package');
const processorFactory = require('./processCliCommands');
const Dgeni = require('dgeni'); const Dgeni = require('dgeni');
describe('processCliCommands processor', () => { describe('processCliCommands processor', () => {
let dgeni, injector, processor, createDocMessage;
const navigationStub = {
docType: 'navigation-json',
data: {
SideNav: [{
children: [{'url': 'cli'}]
}]
}
};
beforeEach(() => {
dgeni = new Dgeni([testPackage('cli-docs-package')]);
injector = dgeni.configureInjector();
processor = injector.get('processCliCommands');
createDocMessage = injector.get('createDocMessage');
});
it('should be available on the injector', () => { it('should be available on the injector', () => {
const dgeni = new Dgeni([testPackage('cli-docs-package')]);
const injector = dgeni.configureInjector();
const processor = injector.get('processCliCommands');
expect(processor.$process).toBeDefined(); expect(processor.$process).toBeDefined();
}); });
it('should run after the correct processor', () => { it('should run after the correct processor', () => {
const processor = processorFactory();
expect(processor.$runAfter).toEqual(['extra-docs-added']); expect(processor.$runAfter).toEqual(['extra-docs-added']);
}); });
it('should run before the correct processor', () => { it('should run before the correct processor', () => {
const processor = processorFactory();
expect(processor.$runBefore).toEqual(['rendering-docs']); expect(processor.$runBefore).toEqual(['rendering-docs']);
}); });
it('should collect the names (name + aliases)', () => { it('should collect the names (name + aliases)', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
commandAliases: ['alias1', 'alias2'], commandAliases: ['alias1', 'alias2'],
options: [], options: [],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.names).toEqual(['name', 'alias1', 'alias2']); expect(doc.names).toEqual(['name', 'alias1', 'alias2']);
}); });
describe('options', () => { describe('options', () => {
it('should remove the hidden options', () => { it('should remove the hidden options', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -47,7 +57,7 @@ describe('processCliCommands processor', () => {
{ name: 'option4', hidden: true }, { name: 'option4', hidden: true },
], ],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.namedOptions).toEqual([ expect(doc.namedOptions).toEqual([
jasmine.objectContaining({ name: 'option1' }), jasmine.objectContaining({ name: 'option1' }),
jasmine.objectContaining({ name: 'option3' }), jasmine.objectContaining({ name: 'option3' }),
@ -55,7 +65,6 @@ describe('processCliCommands processor', () => {
}); });
it('should collect the non-hidden positional and named options', () => { it('should collect the non-hidden positional and named options', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -67,7 +76,7 @@ describe('processCliCommands processor', () => {
{ name: 'positional2', hidden: true, positional: 1}, { name: 'positional2', hidden: true, positional: 1},
], ],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.positionalOptions).toEqual([ expect(doc.positionalOptions).toEqual([
jasmine.objectContaining({ name: 'positional1', positional: 0}), jasmine.objectContaining({ name: 'positional1', positional: 0}),
]); ]);
@ -77,7 +86,6 @@ describe('processCliCommands processor', () => {
}); });
it('should sort the named options into order by name', () => { it('should sort the named options into order by name', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -88,7 +96,7 @@ describe('processCliCommands processor', () => {
{ name: 'b' }, { name: 'b' },
], ],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.namedOptions).toEqual([ expect(doc.namedOptions).toEqual([
jasmine.objectContaining({ name: 'a' }), jasmine.objectContaining({ name: 'a' }),
jasmine.objectContaining({ name: 'b' }), jasmine.objectContaining({ name: 'b' }),
@ -99,7 +107,6 @@ describe('processCliCommands processor', () => {
describe('subcommands', () => { describe('subcommands', () => {
it('should convert subcommands hash into a collection', () => { it('should convert subcommands hash into a collection', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -124,7 +131,7 @@ describe('processCliCommands processor', () => {
}, },
}], }],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.options[0].subcommands).toEqual([ expect(doc.options[0].subcommands).toEqual([
jasmine.objectContaining({ name: 'subcommand1' }), jasmine.objectContaining({ name: 'subcommand1' }),
jasmine.objectContaining({ name: 'subcommand2' }), jasmine.objectContaining({ name: 'subcommand2' }),
@ -132,7 +139,6 @@ describe('processCliCommands processor', () => {
}); });
it('should remove the hidden subcommand options', () => { it('should remove the hidden subcommand options', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -157,7 +163,7 @@ describe('processCliCommands processor', () => {
}, },
}], }],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.options[0].subcommands[0].namedOptions).toEqual([ expect(doc.options[0].subcommands[0].namedOptions).toEqual([
jasmine.objectContaining({ name: 'subcommand1-option1' }), jasmine.objectContaining({ name: 'subcommand1-option1' }),
]); ]);
@ -167,7 +173,6 @@ describe('processCliCommands processor', () => {
}); });
it('should collect the non-hidden positional arguments and named options', () => { it('should collect the non-hidden positional arguments and named options', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -192,7 +197,7 @@ describe('processCliCommands processor', () => {
}, },
}], }],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.options[0].subcommands[0].positionalOptions).toEqual([ expect(doc.options[0].subcommands[0].positionalOptions).toEqual([
jasmine.objectContaining({ name: 'subcommand1-option2', positional: 0}), jasmine.objectContaining({ name: 'subcommand1-option2', positional: 0}),
]); ]);
@ -205,7 +210,6 @@ describe('processCliCommands processor', () => {
}); });
it('should sort the named subcommand options into order by name', () => { it('should sort the named subcommand options into order by name', () => {
const processor = processorFactory();
const doc = { const doc = {
docType: 'cli-command', docType: 'cli-command',
name: 'name', name: 'name',
@ -224,7 +228,7 @@ describe('processCliCommands processor', () => {
} }
}], }],
}; };
processor.$process([doc]); processor.$process([doc, navigationStub]);
expect(doc.options[0].subcommands[0].namedOptions).toEqual([ expect(doc.options[0].subcommands[0].namedOptions).toEqual([
jasmine.objectContaining({ name: 'a' }), jasmine.objectContaining({ name: 'a' }),
jasmine.objectContaining({ name: 'b' }), jasmine.objectContaining({ name: 'b' }),
@ -233,8 +237,7 @@ describe('processCliCommands processor', () => {
}); });
}); });
it('should add the command to the CLI node in the navigation doc', () => { it('should add the command to the CLI node in the navigation doc if there is a first child node with a `cli` url', () => {
const processor = processorFactory();
const command = { const command = {
docType: 'cli-command', docType: 'cli-command',
name: 'command1', name: 'command1',
@ -247,18 +250,55 @@ describe('processCliCommands processor', () => {
data: { data: {
SideNav: [ SideNav: [
{ url: 'some/page', title: 'Some Page' }, { url: 'some/page', title: 'Some Page' },
{ url: 'cli', title: 'CLI Commands', children: [ {
{ url: 'cli', title: 'Using the CLI' }, title: 'CLI Commands',
]}, tooltip: 'Angular CLI command reference',
{ url: 'other/page', title: 'Other Page' }, children: [
{
'title': 'Overview',
'url': 'cli'
}
]
},
{ url: 'other/page', title: 'Other Page' }
] ]
} }
}; };
processor.$process([command, navigation]); processor.$process([command, navigation]);
expect(navigation.data.SideNav[1].title).toEqual('CLI Commands'); expect(navigation.data.SideNav[1].title).toEqual('CLI Commands');
expect(navigation.data.SideNav[1].children).toEqual([ expect(navigation.data.SideNav[1].children).toEqual([
{ url: 'cli', title: 'Using the CLI' }, { url: 'cli', title: 'Overview' },
{ url: 'cli/command1', title: 'ng command1' }, { url: 'cli/command1', title: 'ng command1' },
]); ]);
}); });
it('should complain if there is no child with `cli` url', () => {
const command = {
docType: 'cli-command',
name: 'command1',
commandAliases: ['alias1', 'alias2'],
options: [],
path: 'cli/command1',
};
const navigation = {
docType: 'navigation-json',
data: {
SideNav: [
{ url: 'some/page', title: 'Some Page' },
{
title: 'CLI Commands',
tooltip: 'Angular CLI command reference',
children: [
{
'title': 'Overview',
'url': 'client'
}
]
},
{ url: 'other/page', title: 'Other Page' }
]
}
};
expect(() => processor.$process([command, navigation])).toThrowError(createDocMessage('Missing `cli` url - CLI Commands must include a first child node with url set at `cli`', navigation));
});
}); });

View File

@ -75,6 +75,7 @@
], ],
"radix": true, "radix": true,
"semicolon": [ "semicolon": [
true,
"always" "always"
], ],
"triple-equals": [ "triple-equals": [

View File

@ -798,9 +798,10 @@ anymatch@^2.0.0:
micromatch "^3.1.4" micromatch "^3.1.4"
normalize-path "^2.1.1" normalize-path "^2.1.1"
app-root-path@^2.0.1: app-root-path@^2.1.0:
version "2.0.1" version "2.1.0"
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a"
integrity sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=
append-transform@^0.4.0: append-transform@^0.4.0:
version "0.4.0" version "0.4.0"
@ -1976,16 +1977,17 @@ code-point-at@^1.0.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
codelyzer@~4.2.1: codelyzer@~4.5.0:
version "4.2.1" version "4.5.0"
resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.2.1.tgz#d56eaacefca7e8138aac0a630e484bdb09988544" resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.5.0.tgz#a65ddeeeca2894653253a89bfa229118ff9f59b1"
integrity sha512-oO6vCkjqsVrEsmh58oNlnJkRXuA30hF8cdNAQV9DytEalDwyOFRvHMnlKFzmOStNerOmPGZU9GAHnBo4tGvtiQ==
dependencies: dependencies:
app-root-path "^2.0.1" app-root-path "^2.1.0"
css-selector-tokenizer "^0.7.0" css-selector-tokenizer "^0.7.0"
cssauron "^1.4.0" cssauron "^1.4.0"
semver-dsl "^1.0.1" semver-dsl "^1.0.1"
source-map "^0.5.6" source-map "^0.5.7"
sprintf-js "^1.0.3" sprintf-js "^1.1.1"
coffee-script@^1.12.5: coffee-script@^1.12.5:
version "1.12.7" version "1.12.7"
@ -9291,9 +9293,10 @@ split-string@^3.0.1, split-string@^3.0.2:
dependencies: dependencies:
extend-shallow "^3.0.0" extend-shallow "^3.0.0"
sprintf-js@^1.0.3: sprintf-js@^1.1.1:
version "1.1.1" version "1.1.2"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
sprintf-js@~1.0.2: sprintf-js@~1.0.2:
version "1.0.3" version "1.0.3"

View File

@ -8,6 +8,15 @@
} }
} }
}, },
"cli-hello-world-ivy": {
"master": {
"uncompressed": {
"runtime": 1440,
"main": 507677,
"polyfills": 38390
}
}
},
"hello_world__closure": { "hello_world__closure": {
"master": { "master": {
"uncompressed": { "uncompressed": {

View File

@ -23,7 +23,7 @@
"src/assets" "src/assets"
], ],
"styles": [ "styles": [
"src/styles.css" "src/styles.scss"
], ],
"scripts": [] "scripts": []
}, },
@ -82,7 +82,7 @@
"tsConfig": "src/tsconfig.spec.json", "tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js", "karmaConfig": "src/karma.conf.js",
"styles": [ "styles": [
"src/styles.css" "src/styles.scss"
], ],
"scripts": [], "scripts": [],
"assets": [ "assets": [

View File

@ -1,20 +0,0 @@
import { AppPage } from './app.po';
import { browser } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to demo!');
});
afterEach(async () => {
const logs = await browser.manage().logs().get('browser');
expect(logs).toEqual([]);
});
});

View File

@ -1,11 +0,0 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/') as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}

View File

@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demo</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

View File

@ -7,18 +7,12 @@ function testBazel() {
bazel version bazel version
rm -rf demo rm -rf demo
# Create project # Create project
ng new demo --collection=@angular/bazel --defaults --skip-git ng new demo --collection=@angular/bazel --defaults --skip-git --style=scss
node replace_angular_repo.js "./demo/WORKSPACE" node replace_angular_repo.js "./demo/WORKSPACE"
cd demo cd demo
# TODO(kyliau) Remove this once the type annotations are added to AppPage
# https://github.com/angular/angular-cli/pull/13406
cp ../app.po.ts ./e2e/src/
cp ../package.json.replace ./package.json cp ../package.json.replace ./package.json
# Run build ng generate component widget --style=css
# TODO(kyliau): Use `bazel build` for now. Running `ng build` requires ng build
# node_modules to be available in project directory.
bazel build //src:bundle
# Run test
ng test ng test
ng e2e ng e2e
} }
@ -26,13 +20,7 @@ function testBazel() {
function testNonBazel() { function testNonBazel() {
# Replace angular.json that uses Bazel builder with the default generated by CLI # Replace angular.json that uses Bazel builder with the default generated by CLI
cp ../angular.json.original ./angular.json cp ../angular.json.original ./angular.json
# TODO(kyliau) Remove this once the additional assertion is added to CLI
cp ../app.e2e-spec.ts ./e2e/src/
# TODO(kyliau) Remove this once web_package rule is in use
cp ../index.html ./src/
rm -rf dist src/main.dev.ts src/main.prod.ts rm -rf dist src/main.dev.ts src/main.prod.ts
# Just make a symlink instead of full yarn install to expose node_modules
ln -s $(bazel info output_base)/external/npm/node_modules node_modules
ng build --progress=false ng build --progress=false
ng test --progress=false --watch=false ng test --progress=false --watch=false
ng e2e --configuration=ci ng e2e --configuration=ci

View File

@ -2,12 +2,12 @@
# yarn lockfile v1 # yarn lockfile v1
"@angular-devkit/architect@0.12.1": "@angular-devkit/architect@0.13.0-rc.0":
version "0.12.1" version "0.13.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.12.1.tgz#397768d1ccd0cef76db96d6b39db8aebad68c031" resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.13.0-rc.0.tgz#d9bc43a3811f293269cf488539b72ce27afc6cdb"
integrity sha512-1ozBP0ZAApkSfuPpZ7b9vShU8smNxb98jW+65S12cPOxv1bVVxCj5sTmC3sSfXapgq/pMzblbaVSKOG7Ajz0vQ== integrity sha512-abqtT5qyfTL29hf9be1MnaSVjIMJXJq+Oc+FZJ4RyQ+Sjs2zo+DjAJo62P1vS55JkLE1TFpEcjHkg118Cz7yOw==
dependencies: dependencies:
"@angular-devkit/core" "7.2.1" "@angular-devkit/core" "7.3.0-rc.0"
rxjs "6.3.3" rxjs "6.3.3"
"@angular-devkit/architect@^0.10.6": "@angular-devkit/architect@^0.10.6":
@ -40,12 +40,12 @@
rxjs "6.3.3" rxjs "6.3.3"
source-map "0.7.3" source-map "0.7.3"
"@angular-devkit/core@7.2.1": "@angular-devkit/core@7.3.0-rc.0":
version "7.2.1" version "7.3.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-7.2.1.tgz#8c6df59eab77bcc98a348c8cdf9eb217c8b751a5" resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-7.3.0-rc.0.tgz#e555a08d85259855ff1946f4268936a1aadd38f1"
integrity sha512-zOozPswSM1cTkltw5LeSPoZ/fJ2d3vN304IVgKgrM5/Fs54bd7nTaBcAK+HvjKS+5KmykYrXW47Q4CdFJikluQ== integrity sha512-0vHuw1gIMh79tI+gRxCMn89U1DnjmBnqybVktaf9YXi9xshxd+nnFb31v7n1tJQVQiQNzGxk3hviFnkzxLZipw==
dependencies: dependencies:
ajv "6.6.2" ajv "6.7.0"
chokidar "2.0.4" chokidar "2.0.4"
fast-json-stable-stringify "2.0.0" fast-json-stable-stringify "2.0.0"
rxjs "6.3.3" rxjs "6.3.3"
@ -59,16 +59,16 @@
"@angular-devkit/core" "7.1.3" "@angular-devkit/core" "7.1.3"
rxjs "6.3.3" rxjs "6.3.3"
"@angular-devkit/schematics@7.2.1": "@angular-devkit/schematics@7.3.0-rc.0":
version "7.2.1" version "7.3.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.2.1.tgz#9c1c784f4a81a3a840fa4a1435948c6203be6062" resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.3.0-rc.0.tgz#9f1e1f6942da36b12c81241398ed6ca8b2e65875"
integrity sha512-jEhwkeDn8exgJBfUwMc6rdtDkxHJkUmKPTn4M436bkMMMa9KFPFbPpzp9weKpB3SbRjM3Mu90JprO4C7qDtCcg== integrity sha512-noqcQIOvah2G126DTFKY5Kiga8UwI9cKzyhQdNlf+8hAZpnWwTURItQ5xuMJg/XfRQLUSg9gWS2h1cI9AD7mxQ==
dependencies: dependencies:
"@angular-devkit/core" "7.2.1" "@angular-devkit/core" "7.3.0-rc.0"
rxjs "6.3.3" rxjs "6.3.3"
"@angular/bazel@file:../../dist/packages-dist/bazel": "@angular/bazel@file:../../dist/packages-dist/bazel":
version "7.2.0" version "8.0.0-beta.0"
dependencies: dependencies:
"@angular-devkit/architect" "^0.10.6" "@angular-devkit/architect" "^0.10.6"
"@angular-devkit/core" "^7.0.4" "@angular-devkit/core" "^7.0.4"
@ -81,16 +81,20 @@
tsickle "0.34.0" tsickle "0.34.0"
"@angular/cli@file:../../node_modules/@angular/cli": "@angular/cli@file:../../node_modules/@angular/cli":
version "7.2.1" version "7.3.0-rc.0"
dependencies: dependencies:
"@angular-devkit/architect" "0.12.1" "@angular-devkit/architect" "0.13.0-rc.0"
"@angular-devkit/core" "7.2.1" "@angular-devkit/core" "7.3.0-rc.0"
"@angular-devkit/schematics" "7.2.1" "@angular-devkit/schematics" "7.3.0-rc.0"
"@schematics/angular" "7.2.1" "@schematics/angular" "7.3.0-rc.0"
"@schematics/update" "0.12.1" "@schematics/update" "0.13.0-rc.0"
"@yarnpkg/lockfile" "1.1.0"
ini "1.3.5"
inquirer "6.2.1" inquirer "6.2.1"
opn "5.3.0" npm-package-arg "6.1.0"
semver "5.5.1" opn "5.4.0"
pacote "9.4.0"
semver "5.6.0"
symbol-observable "1.2.0" symbol-observable "1.2.0"
"@bazel/bazel-darwin_x64@0.21.0": "@bazel/bazel-darwin_x64@0.21.0":
@ -125,13 +129,13 @@
source-map-support "0.5.9" source-map-support "0.5.9"
tsutils "2.27.2" tsutils "2.27.2"
"@schematics/angular@7.2.1": "@schematics/angular@7.3.0-rc.0":
version "7.2.1" version "7.3.0-rc.0"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-7.2.1.tgz#9eeab1354ec8d970121cc067e9636098ab84e152" resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-7.3.0-rc.0.tgz#7519aa692dcaed63b9caa7d824846511905b1bfc"
integrity sha512-UdqU8udVr693BZ6uaZ7+el/VFlTjrmp56OS+6YaziyAko84e1Q1Fcx+fwdHugy4V3YmQhTVsyOPSEsphnwSwOA== integrity sha512-yjCHgLSAqQKVZrZgf8F37cPQthhucIA10ofpIHPEZrvHwKBQhM9K3yfB7uYgkj4gzPTdREedb7Rm3/HY45L/1A==
dependencies: dependencies:
"@angular-devkit/core" "7.2.1" "@angular-devkit/core" "7.3.0-rc.0"
"@angular-devkit/schematics" "7.2.1" "@angular-devkit/schematics" "7.3.0-rc.0"
typescript "3.2.2" typescript "3.2.2"
"@schematics/angular@^7.0.4": "@schematics/angular@^7.0.4":
@ -143,18 +147,18 @@
"@angular-devkit/schematics" "7.1.3" "@angular-devkit/schematics" "7.1.3"
typescript "3.1.6" typescript "3.1.6"
"@schematics/update@0.12.1": "@schematics/update@0.13.0-rc.0":
version "0.12.1" version "0.13.0-rc.0"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.12.1.tgz#44d853321ae8a56c43a579c0639d26d625001037" resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.13.0-rc.0.tgz#3d5bb6ce7d8d1ea44a0e0a644022bc655b80ae80"
integrity sha512-P92tDxy0AA1NPhaThiJ7fIFxIC4jzlGK7sJlpbnRREBImsI/O9gmGaV8Kjy+75vaEjqpWaU2oj1hnWqkmxSK1A== integrity sha512-XoU3TnaDcIFX7TU37bfjfAW0tI1tRD5DYQFHDBNOgS+78InGvR9+1CVzRJ4uWOjk0i+ZzDaGbYyR0iA47jSOTA==
dependencies: dependencies:
"@angular-devkit/core" "7.2.1" "@angular-devkit/core" "7.3.0-rc.0"
"@angular-devkit/schematics" "7.2.1" "@angular-devkit/schematics" "7.3.0-rc.0"
"@yarnpkg/lockfile" "1.1.0" "@yarnpkg/lockfile" "1.1.0"
ini "1.3.5" ini "1.3.5"
pacote "9.1.1" pacote "9.4.0"
rxjs "6.3.3" rxjs "6.3.3"
semver "5.5.1" semver "5.6.0"
semver-intersect "1.4.0" semver-intersect "1.4.0"
"@types/node@6.0.84": "@types/node@6.0.84":
@ -204,10 +208,10 @@ ajv@6.5.3:
json-schema-traverse "^0.4.1" json-schema-traverse "^0.4.1"
uri-js "^4.2.2" uri-js "^4.2.2"
ajv@6.6.2: ajv@6.7.0:
version "6.6.2" version "6.7.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.7.0.tgz#e3ce7bb372d6577bb1839f1dfdfcbf5ad2948d96"
integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== integrity sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==
dependencies: dependencies:
fast-deep-equal "^2.0.1" fast-deep-equal "^2.0.1"
fast-json-stable-stringify "^2.0.0" fast-json-stable-stringify "^2.0.0"
@ -328,7 +332,7 @@ binary-extensions@^1.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14"
integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg== integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==
bluebird@^3.5.1, bluebird@^3.5.2: bluebird@^3.5.1, bluebird@^3.5.3:
version "3.5.3" version "3.5.3"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7"
integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==
@ -379,7 +383,7 @@ bytebuffer@~5:
dependencies: dependencies:
long "~3" long "~3"
cacache@^11.0.1, cacache@^11.2.0: cacache@^11.0.1:
version "11.3.1" version "11.3.1"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f"
integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==
@ -399,6 +403,26 @@ cacache@^11.0.1, cacache@^11.2.0:
unique-filename "^1.1.0" unique-filename "^1.1.0"
y18n "^4.0.0" y18n "^4.0.0"
cacache@^11.3.2:
version "11.3.2"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==
dependencies:
bluebird "^3.5.3"
chownr "^1.1.1"
figgy-pudding "^3.5.1"
glob "^7.1.3"
graceful-fs "^4.1.15"
lru-cache "^5.1.1"
mississippi "^3.0.0"
mkdirp "^0.5.1"
move-concurrently "^1.0.1"
promise-inflight "^1.0.1"
rimraf "^2.6.2"
ssri "^6.0.1"
unique-filename "^1.1.1"
y18n "^4.0.0"
cache-base@^1.0.1: cache-base@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
@ -877,7 +901,7 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3:
once "^1.3.0" once "^1.3.0"
path-is-absolute "^1.0.0" path-is-absolute "^1.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.2: graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
version "4.1.15" version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
@ -1260,6 +1284,13 @@ lru-cache@^4.1.2, lru-cache@^4.1.3:
pseudomap "^1.0.2" pseudomap "^1.0.2"
yallist "^2.1.2" yallist "^2.1.2"
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
dependencies:
yallist "^3.0.2"
make-fetch-happen@^4.0.1: make-fetch-happen@^4.0.1:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083"
@ -1489,7 +1520,7 @@ npm-bundled@^1.0.1:
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979"
integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==
npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: npm-package-arg@6.1.0, npm-package-arg@^6.0.0, npm-package-arg@^6.1.0:
version "6.1.0" version "6.1.0"
resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1"
integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==
@ -1507,7 +1538,7 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6:
ignore-walk "^3.0.1" ignore-walk "^3.0.1"
npm-bundled "^1.0.1" npm-bundled "^1.0.1"
npm-pick-manifest@^2.1.0: npm-pick-manifest@^2.2.3:
version "2.2.3" version "2.2.3"
resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40"
integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==
@ -1585,10 +1616,10 @@ onetime@^2.0.0:
dependencies: dependencies:
mimic-fn "^1.0.0" mimic-fn "^1.0.0"
opn@5.3.0: opn@5.4.0:
version "5.3.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==
dependencies: dependencies:
is-wsl "^1.1.0" is-wsl "^1.1.0"
@ -1622,17 +1653,17 @@ osenv@^0.1.4, osenv@^0.1.5:
os-homedir "^1.0.0" os-homedir "^1.0.0"
os-tmpdir "^1.0.0" os-tmpdir "^1.0.0"
pacote@9.1.1: pacote@9.4.0:
version "9.1.1" version "9.4.0"
resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.1.1.tgz#25091f75a25021de8be8d34cc6408728fca3579b" resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.4.0.tgz#af979abdeb175cd347c3e33be3241af1ed254807"
integrity sha512-f28Rq5ozzKAA9YwIKw61/ipwAatUZseYmVssDbHHaexF0wRIVotapVEZPAjOT7Eu3LYVqEp0NVpNizoAnYBUaA== integrity sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==
dependencies: dependencies:
bluebird "^3.5.2" bluebird "^3.5.3"
cacache "^11.2.0" cacache "^11.3.2"
figgy-pudding "^3.5.1" figgy-pudding "^3.5.1"
get-stream "^4.1.0" get-stream "^4.1.0"
glob "^7.1.3" glob "^7.1.3"
lru-cache "^4.1.3" lru-cache "^5.1.1"
make-fetch-happen "^4.0.1" make-fetch-happen "^4.0.1"
minimatch "^3.0.4" minimatch "^3.0.4"
minipass "^2.3.5" minipass "^2.3.5"
@ -1641,7 +1672,7 @@ pacote@9.1.1:
normalize-package-data "^2.4.0" normalize-package-data "^2.4.0"
npm-package-arg "^6.1.0" npm-package-arg "^6.1.0"
npm-packlist "^1.1.12" npm-packlist "^1.1.12"
npm-pick-manifest "^2.1.0" npm-pick-manifest "^2.2.3"
npm-registry-fetch "^3.8.0" npm-registry-fetch "^3.8.0"
osenv "^0.1.5" osenv "^0.1.5"
promise-inflight "^1.0.1" promise-inflight "^1.0.1"
@ -1651,7 +1682,7 @@ pacote@9.1.1:
safe-buffer "^5.1.2" safe-buffer "^5.1.2"
semver "^5.6.0" semver "^5.6.0"
ssri "^6.0.1" ssri "^6.0.1"
tar "^4.4.6" tar "^4.4.8"
unique-filename "^1.1.1" unique-filename "^1.1.1"
which "^1.3.1" which "^1.3.1"
@ -1913,11 +1944,6 @@ semver-intersect@1.4.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
semver@5.5.1:
version "5.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==
set-blocking@~2.0.0: set-blocking@~2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
@ -2170,7 +2196,7 @@ symbol-observable@1.2.0:
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==
tar@^4, tar@^4.4.6: tar@^4, tar@^4.4.8:
version "4.4.8" version "4.4.8"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d"
integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==

View File

@ -13,3 +13,6 @@ build --local_resources=14336,8.0,1.0
# Use the Angular 6 compiler # Use the Angular 6 compiler
build --define=compile=legacy build --define=compile=legacy
# Don't create symlinks
build --symlink_prefix=/

View File

@ -37,9 +37,14 @@ ts_devserver(
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle") load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
filegroup(
name = "empty_node_modules",
)
rollup_bundle( rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "src/main", entry_point = "src/main",
node_modules = ":empty_node_modules",
deps = ["//src"], deps = ["//src"],
) )

View File

@ -2,24 +2,24 @@
# yarn lockfile v1 # yarn lockfile v1
"@bazel/bazel-darwin_x64@0.18.0": "@bazel/bazel-darwin_x64@0.20.0":
version "0.18.0" version "0.20.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.18.0.tgz#bab437605a702279d42f59caa4741bb327eb7dbc" resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.20.0.tgz#648d61c32a3c5fccb7bf70b753071b6e54b11f21"
integrity sha512-um2OzgLL2Gd/W6joOpvrSTcqpnupliPNpwe/uE7sB0huBSJ/4Im0w2IlCTI6C7OfgMcbpUj4YxgUa9T6u6WY6w== integrity sha512-zeoeVK504341GfnaxdaB4pFzQV0YOK1HLiYj3/ocamPFxAJRh9abvKB8iOpqD5Oal0j7VsINxnXCjovp9a4urA==
"@bazel/bazel-linux_x64@0.18.0": "@bazel/bazel-linux_x64@0.20.0":
version "0.18.0" version "0.20.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.18.0.tgz#0c02b2404ec95c180e17615cc7079ee07df48a69" resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.20.0.tgz#2568628a0d0b85dcc69d0ab701b1d6e10551357d"
integrity sha512-Rq8X8bL6SgQvbOHnfPhSgF6hp+f6Fbt2w6pRmBlFvV1J+CeUyrSrrRXfnnO1bjIuq05Ur3mV8ULA0qK6rtA5lQ== integrity sha512-PpHzoEqfXty8dc1/p1tVFXtbPyrE1n0N79QmYePjJ5mJMyW7uBF/zV4IajYY8+IpJEcDVq5v4BavSexOmVJRmA==
"@bazel/bazel-win32_x64@0.18.0": "@bazel/bazel-win32_x64@0.20.0":
version "0.18.0" version "0.20.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.18.0.tgz#aa4575fb00066dcf59a6d464971774dea6a0bafd" resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.20.0.tgz#af7d041dae4c066e7aa8618949e2de1aad07495e"
integrity sha512-U2TbfK8B7dc3JqXSFwj2oXCQrxEaSzCCUkAHjAOIGOKzx/HLKIKs+NJj9IQkLLr7BsMU+Qqzo8aqo11E+Vs+aA== integrity sha512-3bqHXFBvLnbvNzr1KCQ1zryTYvHMoQffaWVekbckgPyT2VPEj3abuB91+DrRYmZdPjcgPYnjnyanxZHDkKuF2g==
"@bazel/bazel@file:../../node_modules/@bazel/bazel": "@bazel/bazel@file:../../node_modules/@bazel/bazel":
version "0.18.0" version "0.20.0"
optionalDependencies: optionalDependencies:
"@bazel/bazel-darwin_x64" "0.18.0" "@bazel/bazel-darwin_x64" "0.20.0"
"@bazel/bazel-linux_x64" "0.18.0" "@bazel/bazel-linux_x64" "0.20.0"
"@bazel/bazel-win32_x64" "0.18.0" "@bazel/bazel-win32_x64" "0.20.0"

View File

@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org # Editor configuration, see https://editorconfig.org
root = true root = true
[*] [*]

View File

@ -1,6 +1,6 @@
# CliHelloWorld # CliHelloWorldIvy
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.6. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0-rc.0.
## Development server ## Development server
@ -12,7 +12,7 @@ Run `ng generate component component-name` to generate a new component. You can
## Build ## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests ## Running unit tests

View File

@ -1,14 +1,17 @@
{ {
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1, "version": 1,
"cli": { "cli": {
"packageManager": "yarn" "packageManager": "yarn"
}, },
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"cli-hello-world": { "cli-hello-world-ivy": {
"root": "", "root": "",
"sourceRoot": "src",
"projectType": "application", "projectType": "application",
"prefix": "app",
"schematics": {},
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
@ -19,47 +22,36 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"assets": [ "assets": [
{ "src/favicon.ico",
"glob": "assets", "src/assets"
"input": "/src",
"output": "/"
},
{
"glob": "favicon.ico",
"input": "/src",
"output": "/"
}
], ],
"styles": [ "styles": [
{ "src/styles.css"
"input": "src/styles.css"
}
], ],
"scripts": [] "scripts": []
}, },
"configurations": { "configurations": {
"dev": { "production": {
"fileReplacements": [ "fileReplacements": [
{ {
"from": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
"to": "dist/environments/environment.ts" "with": "src/environments/environment.prod.ts"
} }
] ],
},
"production": {
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": true, "sourceMap": false,
"extractCss": true, "extractCss": true,
"namedChunks": false, "namedChunks": false,
"aot": true, "aot": true,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
"fileReplacements": [ "budgets": [
{ {
"src": "src/environments/environment.ts", "type": "initial",
"replaceWith": "src/environments/environment.prod.ts" "maximumWarning": "2mb",
"maximumError": "5mb"
} }
] ]
} }
@ -68,20 +60,17 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "cli-hello-world:build" "browserTarget": "cli-hello-world-ivy:build"
}, },
"configurations": { "configurations": {
"dev": {
"browserTarget": "cli-hello-world:build:dev"
},
"production": { "production": {
"browserTarget": "cli-hello-world:build:production" "browserTarget": "cli-hello-world-ivy:build:production"
}, },
"ci": { "ci": {
"progress": false "progress": false
}, },
"ci-production": { "ci-production": {
"browserTarget": "cli-hello-world:build:production", "browserTarget": "cli-hello-world-ivy:build:production",
"progress": false "progress": false
} }
} }
@ -89,7 +78,7 @@
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "cli-hello-world:build" "browserTarget": "cli-hello-world-ivy:build"
} }
}, },
"test": { "test": {
@ -97,25 +86,15 @@
"options": { "options": {
"main": "src/test.ts", "main": "src/test.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"karmaConfig": "./karma.conf.js",
"tsConfig": "src/tsconfig.spec.json", "tsConfig": "src/tsconfig.spec.json",
"scripts": [], "karmaConfig": "src/karma.conf.js",
"styles": [ "styles": [
{ "src/styles.css"
"input": "src/styles.css"
}
], ],
"scripts": [],
"assets": [ "assets": [
{ "src/favicon.ico",
"glob": "assets", "src/assets"
"input": "/src",
"output": "/"
},
{
"glob": "favicon.ico",
"input": "/src",
"output": "/"
}
] ]
} }
}, },
@ -133,36 +112,33 @@
} }
} }
}, },
"cli-hello-world-e2e": { "cli-hello-world-ivy-e2e": {
"root": "", "root": "e2e/",
"projectType": "application", "projectType": "application",
"cli": {}, "prefix": "",
"schematics": {},
"architect": { "architect": {
"e2e": { "e2e": {
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
"protractorConfig": "./protractor.conf.js", "protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "cli-hello-world:serve" "devServerTarget": "cli-hello-world-ivy:serve"
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "cli-hello-world:serve:production" "devServerTarget": "cli-hello-world-ivy:serve:production"
}, },
"ci": { "ci": {
"devServerTarget": "cli-hello-world:serve:ci" "devServerTarget": "cli-hello-world-ivy:serve:ci"
}, },
"ci-production": { "ci-production": {
"devServerTarget": "cli-hello-world:serve:ci-production" "devServerTarget": "cli-hello-world-ivy:serve:ci-production"
} }
} }
}, },
"lint": { "lint": {
"builder": "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options": { "options": {
"tsConfig": [ "tsConfig": "e2e/tsconfig.e2e.json",
"e2e/tsconfig.e2e.json"
],
"exclude": [ "exclude": [
"**/node_modules/**" "**/node_modules/**"
] ]
@ -171,13 +147,5 @@
} }
} }
}, },
"schematics": { "defaultProject": "cli-hello-world-ivy"
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
} }

View File

@ -6,7 +6,7 @@ const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
specs: [ specs: [
'./e2e/**/*.e2e-spec.ts' './src/**/*.e2e-spec.ts'
], ],
capabilities: { capabilities: {
browserName: 'chrome', browserName: 'chrome',
@ -25,7 +25,7 @@ exports.config = {
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: 'e2e/tsconfig.e2e.json' project: require('path').join(__dirname, './tsconfig.e2e.json')
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
} }

View File

@ -9,7 +9,7 @@ describe('cli-hello-world App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!'); expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy!');
}); });
it('the percent pipe should work', () => { it('the percent pipe should work', () => {

View File

@ -1,8 +1,7 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/e2e", "outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es5",
"types": [ "types": [

View File

@ -1,5 +1,5 @@
{ {
"name": "cli-hello-world", "name": "cli-hello-world-ivy",
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@ -29,24 +29,24 @@
"zone.js": "file:../../node_modules/zone.js" "zone.js": "file:../../node_modules/zone.js"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.10.3", "@angular-devkit/build-angular": "~0.12.0-rc.0",
"@angular/cli": "7.0.3", "@angular/cli": "file:../../node_modules/@angular/cli",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../../dist/packages-dist/language-service", "@angular/language-service": "file:../../dist/packages-dist/language-service",
"@types/jasmine": "~2.8.3", "@types/node": "~8.9.4",
"@types/jasminewd2": "~2.0.4", "@types/jasmine": "~2.8.8",
"@types/node": "~6.0.60", "@types/jasminewd2": "~2.0.3",
"codelyzer": "^4.3.0", "codelyzer": "~4.5.0",
"jasmine-core": "~2.8.0", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0", "karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.0", "karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"protractor": "file:../../node_modules/protractor", "protractor": "file:../../node_modules/protractor",
"ts-node": "~4.1.0", "ts-node": "~7.0.0",
"tslint": "~5.9.1", "tslint": "~5.11.0",
"typescript": "file:../../node_modules/typescript" "typescript": "file:../../node_modules/typescript"
} }
} }

View File

@ -12,7 +12,7 @@
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li> </li>
<li> <li>
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2> <h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
</li> </li>
<li> <li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>

View File

@ -1,5 +1,6 @@
import { TestBed, async } from '@angular/core/testing'; import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
describe('AppComponent', () => { describe('AppComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
@ -8,20 +9,23 @@ describe('AppComponent', () => {
], ],
}).compileComponents(); }).compileComponents();
})); }));
it('should create the app', async(() => {
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance; const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy(); expect(app).toBeTruthy();
})); });
it(`should have as title 'app'`, async(() => {
it(`should have as title 'cli-hello-world-ivy'`, () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance; const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app'); expect(app.title).toEqual('cli-hello-world-ivy');
})); });
it('should render title in a h1 tag', async(() => {
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges(); fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement; const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); expect(compiled.querySelector('h1').textContent).toContain('Welcome to cli-hello-world-ivy!');
})); });
}); });

View File

@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css'] styleUrls: ['./app.component.css']
}) })
export class AppComponent { export class AppComponent {
title = 'app'; title = 'cli-hello-world-ivy';
} }

View File

@ -0,0 +1,11 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11

View File

@ -1,8 +1,16 @@
// The file contents for the current environment will overwrite these during build. // This file can be replaced during build by using the `fileReplacements` array.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of file replacements can be found in `angular.json`.
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = { export const environment = {
production: false production: false
}; };
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.

View File

@ -2,12 +2,11 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CliHelloWorld</title> <title>CliHelloWorldIvy</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">
<script>window['ngDevMode'] = true;</script>
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>

View File

@ -16,12 +16,10 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], dir: require('path').join(__dirname, 'coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'], reporters: ['progress', 'kjhtml'],
port: 9876, port: 9876,
colors: true, colors: true,

View File

@ -9,4 +9,4 @@ if (environment.production) {
} }
platformBrowserDynamic().bootstrapModule(AppModule) platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err)); .catch(err => console.error(err));

View File

@ -11,14 +11,17 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
* *
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html * Learn more in https://angular.io/guide/browser-support
*/ */
/*************************************************************************************************** /***************************************************************************************************
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/** IE9, IE10 and IE11 requires all of the following polyfills. **/ /** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills.
* This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot
*/
// import 'core-js/es6/symbol'; // import 'core-js/es6/symbol';
// import 'core-js/es6/object'; // import 'core-js/es6/object';
// import 'core-js/es6/function'; // import 'core-js/es6/function';
@ -40,19 +43,36 @@
/** IE10 and IE11 requires the following for the Reflect API. */ /** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect'; // import 'core-js/es6/reflect';
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';
/** /**
* Required to support Web Animations `@angular/platform-browser/animations`. * Web Animations `@angular/platform-browser/animations`
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
**/ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
@ -60,7 +80,6 @@ import 'core-js/es7/reflect';
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js/dist/zone'; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS
*/ */

View File

@ -2,12 +2,13 @@
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": [] "types": []
}, },
"exclude": [ "exclude": [
"test.ts", "test.ts",
"**/*.spec.ts" "**/*.spec.ts"
] ],
"angularCompilerOptions": {
"enableIvy": "ngtsc"
}
} }

View File

@ -2,8 +2,6 @@
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/spec", "outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"types": [ "types": [
"jasmine", "jasmine",
"node" "node"

View File

@ -0,0 +1,17 @@
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}

View File

@ -1,21 +1,21 @@
{ {
"angularCompilerOptions": {
"enableIvy": "ngtsc",
},
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"module": "es2015",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true,
"target": "es5", "target": "es5",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
"lib": [ "lib": [
"es2017", "es2018",
"dom" "dom"
] ]
} }

View File

@ -1,6 +1,6 @@
{ {
"rulesDirectory": [ "rulesDirectory": [
"node_modules/codelyzer" "codelyzer"
], ],
"rules": { "rules": {
"arrow-return-shorthand": true, "arrow-return-shorthand": true,
@ -18,7 +18,6 @@
"forin": true, "forin": true,
"import-blacklist": [ "import-blacklist": [
true, true,
"rxjs",
"rxjs/Rx" "rxjs/Rx"
], ],
"import-spacing": true, "import-spacing": true,
@ -66,6 +65,7 @@
], ],
"no-misused-new": true, "no-misused-new": true,
"no-non-null-assertion": true, "no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true, "no-shadowed-variable": true,
"no-string-literal": false, "no-string-literal": false,
"no-string-throw": true, "no-string-throw": true,
@ -117,18 +117,6 @@
"check-separator", "check-separator",
"check-type" "check-type"
], ],
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"no-output-on-prefix": true, "no-output-on-prefix": true,
"use-input-property-decorator": true, "use-input-property-decorator": true,
"use-output-property-decorator": true, "use-output-property-decorator": true,

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.10.3", "@angular-devkit/build-angular": "~0.10.3",
"@angular/cli": "7.0.3", "@angular/cli": "file:../../node_modules/@angular/cli",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../../dist/packages-dist/language-service", "@angular/language-service": "file:../../dist/packages-dist/language-service",
"@types/jasmine": "~2.8.3", "@types/jasmine": "~2.8.3",

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,11 @@
import nodeResolve from 'rollup-plugin-node-resolve'; import nodeResolve from 'rollup-plugin-node-resolve';
export default { export default {
entry: 'dist/src/main.js', input: 'dist/src/main.js',
output: {
sourceMap: true, sourceMap: true,
},
treeshake: true, treeshake: true,
moduleName: 'main',
plugins: [ plugins: [
nodeResolve() nodeResolve()
] ]

View File

@ -4,10 +4,11 @@ import commonjs from 'rollup-plugin-commonjs';
// a real app should make a common bundle for libraries instead of bundling them // a real app should make a common bundle for libraries instead of bundling them
// in both the main module & the lazy module, but we don't care about size here // in both the main module & the lazy module, but we don't care about size here
export default { export default {
entry: 'dist/src/lazy.module.js', input: 'dist/src/lazy.module.js',
output: {
sourceMap: true, sourceMap: true,
},
treeshake: true, treeshake: true,
moduleName: 'lazy',
plugins: [ plugins: [
nodeResolve() nodeResolve()
] ]

File diff suppressed because it is too large Load Diff

View File

@ -61,9 +61,9 @@ for testDir in ${TEST_DIRS}; do
yarn install --cache-folder ../$cache yarn install --cache-folder ../$cache
yarn test || exit 1 yarn test || exit 1
# Track payload size for cli-hello-world and hello_world__closure and the render3 tests # Track payload size for cli-hello-world, cli-hello-world-ivy and hello_world__closure
if $CI && ([[ $testDir == cli-hello-world ]] || [[ $testDir == hello_world__closure ]]); then if $CI && ([[ $testDir == cli-hello-world ]] || [[ $testDir == cli-hello-world-ivy ]] || [[ $testDir == hello_world__closure ]]); then
if [[ $testDir == cli-hello-world ]]; then if ([[ $testDir == cli-hello-world ]] || [[ $testDir == cli-hello-world-ivy ]]); then
yarn build yarn build
fi fi

View File

@ -1,6 +1,6 @@
{ {
"name": "angular-srcs", "name": "angular-srcs",
"version": "7.2.0", "version": "7.2.3",
"private": true, "private": true,
"branchPattern": "2.0.*", "branchPattern": "2.0.*",
"description": "Angular - a web framework for modern web apps", "description": "Angular - a web framework for modern web apps",
@ -9,7 +9,7 @@
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=10.9.0 <11.0.0", "node": ">=10.9.0 <11.0.0",
"yarn": ">=1.10.1 <1.13.0" "yarn": ">=1.10.1 <1.14.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -32,8 +32,9 @@
"// 1": "dependencies are used locally and by bazel", "// 1": "dependencies are used locally and by bazel",
"dependencies": { "dependencies": {
"@angular-devkit/architect": "^0.10.6", "@angular-devkit/architect": "^0.10.6",
"@angular-devkit/build-optimizer": "^0.12.2",
"@angular-devkit/core": "^7.0.4", "@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.0.4", "@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/karma": "~0.22.1", "@bazel/karma": "~0.22.1",
"@bazel/typescript": "~0.22.1", "@bazel/typescript": "~0.22.1",
"@schematics/angular": "^7.0.4", "@schematics/angular": "^7.0.4",
@ -73,6 +74,9 @@
"node-uuid": "1.4.8", "node-uuid": "1.4.8",
"protractor": "^5.4.2", "protractor": "^5.4.2",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rollup": "^1.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"selenium-webdriver": "3.5.0", "selenium-webdriver": "3.5.0",
"shelljs": "^0.8.1", "shelljs": "^0.8.1",
"source-map": "^0.6.1", "source-map": "^0.6.1",
@ -90,8 +94,8 @@
"// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.", "// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.",
"// 3": "when updating @bazel/bazel version you also need to update the RBE settings in .bazelrc (see https://github.com/angular/angular/pull/27935)", "// 3": "when updating @bazel/bazel version you also need to update the RBE settings in .bazelrc (see https://github.com/angular/angular/pull/27935)",
"devDependencies": { "devDependencies": {
"@angular/cli": "^7.2.1", "@angular/cli": "^7.3.0-rc.0",
"@bazel/bazel": "~0.21.0", "@bazel/bazel": "~0.22.0",
"@bazel/buildifier": "^0.19.2", "@bazel/buildifier": "^0.19.2",
"@bazel/ibazel": "~0.9.0", "@bazel/ibazel": "~0.9.0",
"@types/angular": "^1.6.47", "@types/angular": "^1.6.47",
@ -129,12 +133,9 @@
"madge": "0.5.0", "madge": "0.5.0",
"mutation-observer": "^1.0.3", "mutation-observer": "^1.0.3",
"rewire": "2.5.2", "rewire": "2.5.2",
"rollup": "0.47.4",
"rollup-plugin-commonjs": "8.1.0", "rollup-plugin-commonjs": "8.1.0",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-sourcemaps": "0.4.2",
"rxjs": "^6.3.0", "rxjs": "^6.3.0",
"sauce-connect": "https://saucelabs.com/downloads/sc-4.5.2-linux.tar.gz", "sauce-connect": "https://saucelabs.com/downloads/sc-4.5.3-linux.tar.gz",
"semver": "5.4.1", "semver": "5.4.1",
"systemjs": "0.18.10", "systemjs": "0.18.10",
"tslint": "5.7.0", "tslint": "5.7.0",
@ -145,5 +146,9 @@
"vlq": "0.2.2", "vlq": "0.2.2",
"vrsource-tslint-rules": "5.1.1", "vrsource-tslint-rules": "5.1.1",
"webpack": "1.12.9" "webpack": "1.12.9"
},
"// 4": "natives is needed for gulp to work with node >= 10.13, see #28213",
"resolutions": {
"natives": "1.1.6"
} }
} }

View File

@ -10,7 +10,6 @@ ng_module(
"src/**/*.ts", "src/**/*.ts",
], ],
), ),
module_name = "@angular/animations",
deps = [ deps = [
"//packages/core", "//packages/core",
], ],
@ -30,6 +29,7 @@ ng_package(
# Do not add more to this list. # Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds. # Dependencies on the full npm_package cause long re-builds.
visibility = [ visibility = [
"//packages/compiler-cli/integrationtest:__pkg__",
"//packages/compiler/test:__pkg__", "//packages/compiler/test:__pkg__",
], ],
deps = [ deps = [

View File

@ -12,7 +12,6 @@ ng_module(
"src/**/*.ts", "src/**/*.ts",
], ],
), ),
module_name = "@angular/animations/browser",
deps = [ deps = [
"//packages/animations", "//packages/animations",
"//packages/core", "//packages/core",

View File

@ -26,7 +26,7 @@ const SELF_TOKEN_REGEX = new RegExp(`\s*${SELF_TOKEN}\s*,?`, 'g');
* *
* 1. Overlap of animations * 1. Overlap of animations
* Given that a CSS property cannot be animated in more than one place at the same time, it's * Given that a CSS property cannot be animated in more than one place at the same time, it's
* important that this behaviour is detected and validated. The way in which this occurs is that * important that this behavior is detected and validated. The way in which this occurs is that
* each time a style property is examined, a string-map containing the property will be updated with * each time a style property is examined, a string-map containing the property will be updated with
* the start and end times for when the property is used within an animation step. * the start and end times for when the property is used within an animation step.
* *

View File

@ -23,7 +23,7 @@ export function supportsAnimationEventCreation() {
try { try {
makeAnimationEvent('end', 'test', 0); makeAnimationEvent('end', 'test', 0);
supported = true; supported = true;
} catch (e) { } catch {
} }
return supported; return supported;
} }

View File

@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
ng_module( ng_module(
name = "testing", name = "testing",
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
module_name = "@angular/animations/browser/testing",
deps = [ deps = [
"//packages/animations", "//packages/animations",
"//packages/animations/browser", "//packages/animations/browser",

View File

@ -671,8 +671,8 @@ export function animate(
* *
* ```typescript * ```typescript
* group([ * group([
* animate("1s", { background: "black" })) * animate("1s", style({ background: "black" })),
* animate("2s", { color: "white" })) * animate("2s", style({ color: "white" }))
* ]) * ])
* ``` * ```
* *
@ -708,7 +708,7 @@ export function group(
* ```typescript * ```typescript
* sequence([ * sequence([
* style({ opacity: 0 })), * style({ opacity: 0 })),
* animate("1s", { opacity: 1 })) * animate("1s", style({ opacity: 1 }))
* ]) * ])
* ``` * ```
* *

Some files were not shown because too many files have changed in this diff Show More