Compare commits

..

309 Commits

Author SHA1 Message Date
a73b8a62c8 release: cut the v8.0.2 release 2019-06-19 10:33:28 -07:00
2fe8f2b1e0 build: update buildifier to version that supports windows (#31129)
* Updates buildifier to a version that also comes with windows binaries.
* Fixes a few new formatting/lint warnings
* Removes the `args-order` warning because it is no longer a warning.. and is now part of the formatter.

Patch version of #31112

PR Close #31129
2019-06-19 08:50:43 -07:00
f1c08c6918 docs: add core and cli version alignment note (#30976)
docs: add core and cli version alignment note
PR Close #30976
2019-06-19 08:49:25 -07:00
bf9de8ca53 test: update side-effects test to be more descriptive (#31005)
This test will now list diffs for failed expectations and the full command to update them.

Fix #30570

PR Close #31005
2019-06-18 13:58:59 -07:00
df37c47ac5 ci: add jasonaden to forms owners (#31117)
PR Close #31117
2019-06-18 13:58:30 -07:00
788d19c036 build: enable shard_count for some jasmine tests that have many specs (#31009)
This partitions the spects across multiple processes so they run in parallel.

PR Close #31009
2019-06-18 12:11:31 -07:00
8492499fe7 docs: add missing word in build and deploy guide to clarify sentence (#31093)
PR Close #31093
2019-06-18 11:00:28 -07:00
48174010a1 docs: update group() link to point to the animations group API (#30618)
PR Close #30618
2019-06-18 10:49:46 -07:00
1460e46ba1 build: ts-api-guardian npm package contains invalid references (#31096)
Currently when building the `ts-api-guardian` npm package,
the labels are not properly replaced after recent changes to
the `entry_point` attribute. This means that the `ts-api-guardian`
package is currently not usable externally.

PR Close #31096
2019-06-18 09:50:42 -07:00
a7ff7d8d27 docs: refresh TypeScript configuration guide with updated info and files (#31097)
This removes the hard-coded tsconfig.json to use a separate file.
The tsconfig.0.json is added to the getting-started example folder
because have to check it with every major release
Also updates the text regarding defaults for TypeScript compilation targets
and typings

PR Close #31097
2019-06-18 09:47:49 -07:00
eb970b4626 docs: rewrite Observable examples with pipable operators (#31074)
PR Close #31074
2019-06-18 09:47:07 -07:00
18d301258a docs: change interceptor documentation (#30969)
PR Close #30969
2019-06-18 09:46:35 -07:00
6a01fa532c docs: add mock heroes to the code review tabs for TOH pt. 2 (#31080)
PR Close #31080
2019-06-17 16:34:39 -07:00
e190a7e9de fix(docs-infra): fix search result header color (#30924)
PR Close #30924
2019-06-17 16:33:54 -07:00
53c6425954 ci: publish snapshots job is unable to decode github token (#31099)
The publish_snapshots job is currently not able to decode the Github
token because the openssl version changed. This is because the default
digest for more recent openssl version has been updated and the github
token file has been encrypted with an old digest. We need to ensure
that the md5 digest is used for decryption as that matches the
digest used for encryption.

PR Close #31099
2019-06-17 13:56:13 -07:00
c198dc6c19 fix(bazel): builder workspace should use nodejs v10.16.0 (#31088)
The generated Bazel workspace by the `@angular/bazel` builder should
use the latest stable NodeJS version. This is necessary because some
packages like `selenium-webdriver` which are part of the default bazel
setup in order to support `ng e2e` depend on a minimum NodeJS version
of `10.15.0`.. This means that running e2e tests in a plain new bazel CLI
project (`ng new {projectName} --collection=@angular/bazel`) errors.

```
command.
 (error selenium-webdriver@4.0.0-alpha.3: The engine "node" is incompatible with
 this module. Expected version ">= 10.15.0". Got "10.13.0"
error Found incompatible module
)
```

PR Close #31088
2019-06-17 13:07:28 -07:00
d1b26dd3a1 ci: update nodejs version to v10.16.0 (#31088)
Updates the NodeJS version to the latest stable version at the time of
writing (v10.16.0). We need to update our image to use a minimum NodeJS
version of v10.15.0 because new CLI apps automatically install a non-locked
version of selenium-webdriver that now requires NodeJS >= 10.15.0 since the
latest release of 17th June 2019 (4.0.0-alpha.3).

See CI failures: https://circleci.com/gh/angular/angular/359077

PR Close #31088
2019-06-17 13:07:28 -07:00
ce7131f3fb ci(docs-infra): disable payload size tracking for test_aio_local and test_aio_local_ivy (#31064)
Payload size tracking for AIO introduced in the previous commit (c596795e64) works fine for master branch, but fails in patch branch. In order to keep CI for patch branch healthy, the size tracking is temporary disabled and will be turned on again after additional investigation.

PR Close #31064
2019-06-14 16:03:39 -07:00
934702892e ci(docs-infra): check and track payload sizes for test_aio_local and test_aio_local_ivy (#31047)
PR Close #31047
2019-06-14 14:38:11 -07:00
8a830a72e2 ci(docs-infra): run PWA score tests after unit/e2e tests (#31047)
Previously, we run the PWA score tests before unit/e2e tests, because
the latter would destroy the `dist/` directory required by the former.

Since cli@6, unit/e2e tests no longer detroy the `dist/` directory, so
it is now safe to run the unit/e2e tests first. This is preferrable,
since they are conceptually lower-level and any error messages (in case
of breakage) are more specific/actionable.

Related discussion about cli behavior:
- angular/angular-cli#4366
- angular/angular-cli#14701

PR Close #31047
2019-06-14 14:38:11 -07:00
2abb54c4a1 docs: rewrite attribute binding section and add example (#26004)
PR Close #26004
2019-06-14 12:21:28 -07:00
44632bb700 docs: edit codeowners for new Template Syntax examples (#31060)
PR Close #31060
2019-06-14 11:54:30 -07:00
e33b382ab4 docs: edit and add example for Template Expression Operators section of Template Syntax (#28087)
PR Close #28087
2019-06-14 11:53:51 -07:00
c4da400db4 docs: rewrite inputs/outputs section of Template Syntax (#27685)
PR Close #27685
2019-06-14 11:53:14 -07:00
c40e6b2edc docs: edit template ref vars copy and example (#27371)
PR Close #27371
2019-06-14 11:52:34 -07:00
978fc27314 docs: rewrite built-in directives section (#27273)
PR Close #27273
2019-06-14 11:51:47 -07:00
b9f2bbb7d1 docs: add example and edit two-way-binding section of Template Syntax (#26278)
PR Close #26278
2019-06-14 11:50:04 -07:00
9654d646ae docs: rewrite property binding section and add example (#25770)
PR Close #25770
2019-06-14 11:47:35 -07:00
7f214499e8 fix(language-service): Remove 'any' in getQuickInfoAtPosition (#31014)
PR Close #31014
2019-06-14 10:46:17 -07:00
a3d55a9d27 build(docs-infra): update browserlist configuration file (#31045)
More specifically:
- Remove Chrome 41, which was needed for googlebot support but not any
  more.
- Remove IE 9-10, because we don't expect developers to be using them.
- Expand support from _last 2 versions_ to _last 2 **major** versions_.

PR Close #31045
2019-06-14 10:43:22 -07:00
e222b8761e docs: minor fix in get-commit-range.js docs (#31049)
PR Close #31049
2019-06-14 10:41:43 -07:00
1435c0b3a9 docs(aio): add missing description to dev.to link (#30960)
PR Close #30960
2019-06-14 10:41:13 -07:00
0a7aebbcf5 fix(core): temporarily remove @deprecated jsdoc tag for a TextBedStatic.get overload (#30714)
Followup to #30514 which did the same for `TestBed`, but `TestBedStatic` was necessary too.

PR Close #30714
2019-06-14 10:40:43 -07:00
bd7f91feac docs: rewrite binding-syntax section in template-syntax.md (#25561)
PR Close #25561
2019-06-14 10:25:07 -07:00
3bbc89b958 ci: temporarily disable payload size tracking (#31057)
The `CIRCLE_COMPARE_URL` is not available in builds any more since we
enabled `Pipelines` on CircleCI. We have contected CircleCI, but until
this is solved we cannot get the commit range and thus disabling
uploading of payload size data to avoid broken builds.

PR Close #31057
2019-06-14 09:19:18 -07:00
52d98e563d docs: fix broken link in singleton services doc (#31007)
PR Close #31007
2019-06-13 17:05:21 -07:00
b279f8bd62 docs: add no-auto-link instructions to docs style guide (#30980)
PR Close #30980
2019-06-13 17:00:47 -07:00
954e34cc91 docs: add angular.tw (Traditional Chinese) site to navigation.json (#30723)
PR Close #30723
2019-06-13 16:04:41 -07:00
e1f6d15387 release: cut the v8.0.1 release 2019-06-13 15:22:16 -07:00
cbb3794931 fix(docs-infra): enable only vertical scrolling for contributors bio (#30991)
- `auto` will enable scrolling only when needed
- `overflow-y` will ensure to keep the scrolling horizontally only

PR Close #30991
2019-06-12 11:47:13 -07:00
77a5790a9d docs: add platform to glossary (#30731)
PR Close #30731
2019-06-12 11:46:25 -07:00
4ca401c394 build(docs-infra): upgrade cli command docs sources to 7da10691d (#30999)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](e567d15ae...7da10691d):

**Modified**
- help/build.json

##

PR Close #30999
2019-06-12 11:45:07 -07:00
3dcd5ebdbc fix(ivy): unable to bind to implicit receiver in embedded views (#30994)
To provide some context: The implicit receiver is part of the
parsed Angular template AST. Any property reads in bindings,
interpolations etc. read from a given object (usually the component
instance). In that case there is an _implicit_ receiver which can also
be specified explicitly by just using `this`.

e.g.

```html
<ng-template>{{this.myProperty}}</ng-template>
```

This works as expected in Ivy and View Engine, but breaks in case the
implicit receiver is not used for property reads. For example:

```html
<my-dir [myFn]="greetFn.bind(this)"></my-dir>
```

In that case the `this` will not be properly translated into the generated
template function code because the Ivy compiler currently always treats
the `ctx` variable as the implicit receiver. This is **not correct** and breaks
compatibility with View Engine. Rather we need to ensure that we retrieve
the root context for the standalone implicit receiver similar to how it works
for property reads (as seen in the example above with `this.myProperty`)

Note that this requires some small changes to the `expression_converter`
because we only want to generate the `eenextContent()` instruction if the
implicit receiver is _actually_ used/needed. View Engine determines if that is the case by recursively walking through the converted output AST and
checking for usages of the `o.variable('_co')` variable ([see here][ve_check]). This would work too for Ivy, but involves most likely more code duplication
since templates are isolated in different functions and it another pass
through the output AST for every template expression.

[ve_check]: 0d6c9d36a1/packages/compiler/src/view_compiler/view_compiler.ts (L206-L208)

Resolves FW-1366.

**NOTE**: Patch version of 58be2ff884
(#30897)

PR Close #30994
2019-06-12 11:44:11 -07:00
49307f0595 fix(bazel): do not modify tsconfig.json (#30984)
This is a patch PR for https://github.com/angular/angular/pull/30877

PR Close #30984
2019-06-11 15:40:39 -07:00
762fc28fee feat(docs-infra): layout ui polish (#30883)
PR Close #30883
2019-06-11 14:20:36 -07:00
338e58c278 docs: use const in dynamic-component-loader example (#30888)
Use const instead of let. Some of the variables are never reassigned, so it is preferred to use const over let

PR Close #30888
2019-06-11 14:20:00 -07:00
7e2ed89208 docs: fix a grammar mistake (#30949)
Grammar mistake is in the JsonPipe section
PR Close #30949
2019-06-11 14:19:17 -07:00
56a3dcf44c build(docs-infra): upgrade cli command docs sources to e567d15ae (#30971)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](d09f130ce...e567d15ae):

**Modified**
- help/build.json
- help/generate.json
- help/new.json
- help/serve.json
- help/test.json

##

PR Close #30971
2019-06-11 14:17:32 -07:00
501bacdcf6 build: update golden for //packages/core/test/bundling/injection:symbol_test (#30965)
PR Close #30965
2019-06-11 10:54:28 -07:00
c5f2979a87 build(bazel): update to nodejs rules 0.31.1 & bazel 0.26.1 (#30965)
* entry_point attribute of nodejs_binary & rollup_bundle is now a label
* nodejs rules 0.30.1 has new feature to symlink node_modules with yarn_install and bazel 0.26.0 includes new managed_directories feature which enables this
* Symlinking of node_modules for yarn_install temporarily disabled (except for integration/bazel) until the fix for https://github.com/bazelbuild/bazel/issues/8487 makes it into a future bazel release. This is needed to work-around issue: yarn_install & npm_install with managed directories can't handle deleted or manually regenerated node_modules folder [https://github.com/bazelbuild/rules_nodejs/issues/802]. Underlying issue has been fixed in Bazel https://github.com/bazelbuild/bazel/issues/8487 but hasn't landed in a release yet

PR Close #30965
2019-06-11 10:54:28 -07:00
fe02462b5f build(docs-infra): update @angular/* to v8.1.0-next.1 and @angular/material to v8.0.0 (#30935)
PR Close #30935
2019-06-11 00:11:36 +00:00
3000d19ad1 build(docs-infra): update @angular/cli to v8.0.2 (#30935)
This restores named lazy chunks, which were broken during beta/rc (i.e.
the lazy chunks were named 0/1/2/...).

PR Close #30935
2019-06-11 00:11:36 +00:00
dcf9f05c9a docs: use Node.js consistently (#30934)
PR Close #30934
2019-06-11 00:09:49 +00:00
ba56f3c15b refactor(docs-infra): avoid hard-coding URLs to redirect on archive mode (#30894)
Related discussion:
https://github.com/angular/angular/pull/30894#pullrequestreview-246731995

PR Close #30894
2019-06-11 00:07:43 +00:00
865ad56e9a fix(docs-infra): do not redirect docs URLs on archive deployments (#30894)
To avoid showing outdated info (such as events, resources, etc.) but
still allow people to see docs for older versions, we redirect
non-documentation URLs to `/docs`. Recently(-ish) we have added
documentation content under the `/cli/...` and `/start/...`
path-prefixes, but we haven't added them to the list of documentation
URLs that should not be redirected. As a result, on archive deployments
(e.g. https://v7.angular.io/cli), they are redirected to `/docs`, making
it impossible to see the documentation for these versions (unless you
know about the `?mode=stable` work-around).

This commit fixes it by adding `cli` and `start` to the list of
documentation URLs that are excluded from redirection.

PR Close #30894
2019-06-11 00:07:43 +00:00
5cda2a041b refactor(docs-infra): make archive redirection tests DRY (#30894)
PR Close #30894
2019-06-11 00:07:43 +00:00
6a484853a9 build: update rules_nodejs and clean up bazel warnings (#30370) (#30763)
Preserve compatibility with rollup_bundle rule.
Add missing npm dependencies, which are now enforced by the strict_deps plugin in tsc_wrapped

PR Close #30370

PR Close #30763
2019-06-10 23:58:54 +00:00
e6ac289518 build: update to Bazel 0.26 (#30370) (#30763)
PR Close #30370

PR Close #30763
2019-06-10 23:58:54 +00:00
4e8614bb92 fix(common): expose the HttpUploadProgressEvent interface as public API (#30852)
Fixes #30814

PR Close #30852
2019-06-07 08:47:48 -07:00
9ace748d3a docs: add dev.to link to the help section (#30873)
PR Close #30873
2019-06-07 08:47:02 -07:00
08c38a1f99 fix(service-worker): avoid uncaught rejection warning when registration fails (#30876)
Service worker API `navigator.serviceWorker.register` can fail in multiple ways.
For example, in Chrome, with an unstable network connection you can have the
following error: `An unknown error occurred when fetching the script.`

In the current state, it creates an `Uncaught (in promise) TypeError:` style of
error, which cannot be caught by the user on his own.

I think it's better to log the error over raising an error that cannot be
caught.

PR Close #30876
2019-06-07 08:46:26 -07:00
9aeef0afdb build(docs-infra): fail hard if the CLI source is not what we expect (#30901)
Previously we just logged a warning but we should fail
to prevent silently allowing the docs to look wrong if
something changes on the CLI side of things.

PR Close #30901
2019-06-07 08:45:48 -07:00
8aef446373 build(docs-infra): upgrade cli command docs sources to d09f130ce (#30909)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](e8bdfe6b9...d09f130ce):

**Modified**
- help/serve.json

##

PR Close #30909
2019-06-07 08:44:42 -07:00
f7ee91a17c build(docs-infra): remove unneeded allowEmptyCodegenFiles option in Ivy mode (#30911)
Previously, when switching to Ivy mode (e.g. to run tests on CI), we had
to add `allowEmptyCodegenFiles: true` to the `angularCompilerOptions` in
`tsconfig.app.json`.

This isn't necessary any more (potentially since we switched to dynamic
imports for loading lazy modules in #30704), so this commit removes it
from the `switch-to-ivy.js` script.

PR Close #30911
2019-06-07 08:43:50 -07:00
8ae0afd3f8 fix(ivy): ngcc - remove unused import to make linting pass (#30914)
The failure is caused by 65f20107f. The unused [`writeFile` import][1]
seems to be a result of merge conflict resolution (since it is not
present on the original PR (#30831).

[1]: 65f20107fe (diff-4840f884874632c2fbfdb64a26213396R9)

PR Close #30914
2019-06-07 08:43:19 -07:00
be82270493 feat(docs-infra): white background and corresponding figure updates (#28396)
PR Close #28396
2019-06-06 13:48:16 -07:00
4cef2c1236 build(docs-infra): fix CLI command github links (#30889)
The "view" links were broken because the version used to
compute the git tag for the GitHub URL included a build SHA.
Now we clean that off before using it in the URL.

The links are to the JSON schema that defines the documentation for
the command. This is accurate but confusing because the content for the
long description is stored in a separate markdown file referenced from this
schema file.
This commit adds a second set of links for the long description, if it exists,
which links directly to the markdown file.

Closes #30700

PR Close #30889
2019-06-06 08:49:38 -07:00
26e3615e19 fix(core): TypeScript related migrations should cater for BOM (#30719)
fix(@schematics/angular): TypeScript related migrations should cater for BOM

In the CLI `UpdateRecorder` methods such as `insertLeft`, `remove` etc.. accepts positions which are not offset by a BOM. This is because when a file has a BOM a different recorder will be used https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72 which caters for an addition offset/delta.

The main reason for this is that when a developer is writing a schematic they shouldn't need to compute the offset based if a file has a BOM or not and is handled out of the box.

Example
```ts
recorder.insertLeft(5, 'true');
```

However this is unfortunate in the case if a ts SourceFile is used and one uses `getWidth` and `getStart` method they will already be offset by 1, which at the end it results in a double offset and hence the problem.

Fixes #30713

PR Close #30719
2019-06-06 08:44:56 -07:00
65f20107fe fix(ivy): ngcc - use spaces in overwritten package.json content for readability (#30831)
When ngcc processes an entrypoint, it updates `package.json` with
metadata about the processed format. Previously, it overwrote the
`package.json` with the stringified JSON object without spaces. This
made the file difficult to read (for example when looking at the file
while debugging an ngcc failure).

This commit fixes it by using spaces in the new `package.json` content.

PR Close #30831
2019-06-05 21:24:47 -07:00
5a7bcd1862 fix(bazel): Load global stylesheet in dev and prod (#30879)
Global stylesheet should be injected as a <link> tag in index.html for
both dev and prod app.

PR Close #30879
2019-06-05 21:20:59 -07:00
152ea36c80 build: unable to run build-packages-dist script on windows (#30853)
Currently it's not possible to run the `./scripts/build-packages-dist.sh` script on Windows because
`bazel query` returns CRLF line-endings which result on array expansion in Bazel target names
that end with a carriage return (e.g. `//packages/core\r`). This then results in a build failure where
Bazel complains that target names should not end with a carriage return.

In order to fix this, we just strip off the carriage return line-endings from the bazel query stdout. Ideally
the script will be ported to a plain Node script eventually, but for now it prevents Windows users from
building the release packages and the simple workaround seems reasonable and sufficient.

PR Close #30853
2019-06-05 09:05:29 -07:00
ea2adb104b docs: correct typos and formatting in the Getting Started guide (#30758)
PR Close #30758
2019-06-04 13:37:27 -07:00
19caace2ab docs(service-worker): mention that HTTPS is required, unless on localhost (#30847)
Fixes #30823

PR Close #30847
2019-06-04 12:03:12 -07:00
ccc1c27461 refactor: Move away from index signature based "updateCache". (#30518)
We're deprecating the index signature overloads in favor of using a Map.

PR Close #30518
2019-06-04 12:02:13 -07:00
97268b95f7 docs: update example dependencies to 8.x release (#30755)
PR Close #30755
2019-06-04 11:53:56 -07:00
7c41abe64a docs: rename component for constructor example (#30845)
PR Close #30845
2019-06-04 11:52:58 -07:00
991e138650 fix(ivy): unable to project into multiple slots with default selector (#30803)
With View engine it was possible to declare multiple projection
definitions and to programmatically project nodes into the slots.

e.g.

```html
<ng-content></ng-content>
<ng-content></ng-content>
```

Using `ViewContainerRef#createComponent` allowed projecting
nodes into one of the projection defs (through index)

This no longer works with Ivy as the `projectionDef` instruction only
retrieves a list of selectors instead of also retrieving entries for
reserved projection slots which appear when using the default
selector multiple times (as seen above).

In order to fix this issue, the Ivy compiler now passes all
projection slots to the `projectionDef` instruction. Meaning that
there can be multiple projection slots with the same wildcard
selector. This allows multi-slot projection as seen in the
example above, and it also allows us to match the multi-slot node
projection order from View Engine (to avoid breaking changes).

It basically ensures that Ivy fully matches the View Engine behavior
except of a very small edge case that has already been discussed
in FW-886 (with the conclusion of working as intended).

Read more here: https://hackmd.io/s/Sy2kQlgTE

NOTE: This is the patch version of #30561

PR Close #30803
2019-06-03 11:44:44 -07:00
d00b421402 docs: fix quickstart link in readme (#30807)
PR Close #30807
2019-06-03 11:43:59 -07:00
06ffed5141 docs: document UrlTree in guard return type in cheatsheet (#30822)
Add UrlTree to the types of returned values in guard methods

PR Close #30822
2019-06-03 11:43:26 -07:00
5a15126520 docs(core): fix typo in style bindings comment (#30661)
PR Close #30661
2019-06-03 09:01:06 -07:00
9e4b2f1a4f docs: fix a small typo in injectable decorator description (#30785)
PR Close #30785
2019-06-03 08:56:22 -07:00
393529d3b5 docs: update example references from "my-app" to "app-root" (#30789)
"app" is the default prefix for CLI projects when generating components.
This updates our examples to conform that that default

Closes #19778

PR Close #30789
2019-06-03 08:55:39 -07:00
81b75590d7 docs(docs-infra): compile module first for Ivy when loading element modules (#30704)
In View Engine, NgModule factories are created for each NgModule and loaded when the module is requested. Ivy doesn't generate the
factories by design and only loads the module class, so it must be compiled after being loaded.

PR Close #30704
2019-05-31 15:24:23 -07:00
151f0f4b2c refactor(docs-infra): update loading of custom elements to use dynamic import syntax (#30704)
Removes the usage of `NgModuleFactoryLoader` and string-based imports for lazy loading.

PR Close #30704
2019-05-31 15:24:23 -07:00
f88f941008 docs: increase color contrast on elements in tutorial
This increases the color contrast of elements in the tutorial (parts 1-6)
in order to meet WCAG 2.0 AA standards.
2019-05-31 15:23:33 -07:00
0e17958640 fix(docs-infra): add v7 in versions dropdown (#30775)
Fixes #30769

PR Close #30775
2019-05-31 15:19:54 -07:00
e82b45c8a7 docs(docs-infra): remove deprecated Buffer usage from stackblitz builder (#30369)
Fixes #30364

PR Close #30369
2019-05-31 09:56:23 -07:00
8422ef2a93 fix(docs-infra): update tooltip of events link (#30643)
PR Close #30643
2019-05-31 09:50:45 -07:00
cdf586d0d2 build(docs-infra): upgrade cli command docs sources to e8bdfe6b9 (#30777)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](9a3d36c98...e8bdfe6b9):

**Modified**
- help/update.json

##

PR Close #30777
2019-05-31 09:45:09 -07:00
3828c89792 ci: add reviewer group for deprecations guide (#30722)
PR Close #30722
2019-05-30 20:45:59 -07:00
0f352b6350 docs: add final release date and update future schedule (#30712)
PR Close #30712
2019-05-30 19:39:24 -07:00
06bdecffb9 docs: remove mention of project settings from analytics (#30701)
This settings are not yet implemented and will be available in 8.1.

PR Close #30701
2019-05-30 13:42:35 -04:00
99ddec152b docs(ivy): fix symbol in example AST (#30745)
PR Close #30745
2019-05-30 13:41:52 -04:00
31aba96fcb docs: improve glossary for entry-point. (#29433)
PR Close #29433
2019-05-30 13:40:55 -04:00
facce2c9fd docs: fix typo in upgrade guide example (#30428)
An code snippet from a `package.json` file used `script`
rather than `scripts`.

Fixes #30418

PR Close #30428
2019-05-30 13:40:07 -04:00
edaf058548 docs: fix closing tags in deprecation summary (#30735)
fix closing tags in "Cannot assign to template variables" section

PR Close #30735
2019-05-30 13:38:54 -04:00
4bff2d0c8c docs: fix deprecation information (#30717)
PR Close #30717
2019-05-30 13:38:34 -04:00
cfc608aaf3 docs: merge duplicated platform-webworker content in Deprecation Guide (#30651)
fix issue of duplicate anchors/ids

PR Close #30651
2019-05-30 13:36:30 -04:00
6d9f5fcddb docs(elements): move clarification about custom elements (#30594)
Moved clarification that "custom elements" are a subtype of Web Components to the first use of the term "custom elements"

PR Close #30594
2019-05-30 13:35:15 -04:00
b19a05c25a docs(common): fix typo in ngSwitch directive description (#30483)
PR Close #30483
2019-05-30 13:34:22 -04:00
bd75b3b7b3 docs: fix the sequence of creating class in HTTP tutorial (#30566)
For more accurate procedure of creating a class in the "Tour of Heroes" app, updated the sequence of creating one class.

PR Close #30566
2019-05-30 13:32:53 -04:00
1c67b9063b docs: clarify usage of using /deep/ in component styles guide (#30452)
Updated the description regarding the (deprecated) /deep/ pseudo-selector to clarify its propensity to bleed styles across components and its solution

closes #29967

PR Close #30452
2019-05-30 13:32:32 -04:00
9a9ae60e0e docs: code sample closing in ivy.md (#30711)
PR Close #30711
2019-05-30 13:32:11 -04:00
ae6fa9260a docs: change wording for more clarity in TypeScript Configuration guide (#30748)
"You need to do nothing" indicates the presence of an action (the action of doing nothing) while the goal is to tell the user that no action is required from them. I think "You don’t need to do anything" is better suitable in this context.

PR Close #30748
2019-05-30 13:31:24 -04:00
f8fa2f2a6c docs(core): template-var-assignment schematic should link to deprecation guide (#30702)
Instead of linking to a markdown file explaining what the migration warnings
are about, we should link to the deprecation guide which now also contains
an entry for that schematic. This makes the deprecation explanations
consistent and more centralized.

PR Close #30702
2019-05-29 13:50:35 -04:00
f3ee9a6144 docs: add note to platform-webworker deprecation (#30705)
PR Close #30705
2019-05-28 16:37:58 -07:00
d076c51455 test: improve language service tests performance (#30683)
With this change we reduce the amount of IO operations. This is especially a huge factor in windows since IO ops are slower.

With this change mainly we cache `existsSync` and `readFileSync` calls

Here's the results

Before
```
//packages/language-service/test:test
INFO: Elapsed time: 258.755s, Critical Path: 253.91s
```

After
```
//packages/language-service/test:test
INFO: Elapsed time: 66.403s, Critical Path: 63.13s
```

PR Close #30683
2019-05-28 16:15:02 -07:00
38a7e2a775 release: cut the v8.0.0 release 2019-05-28 10:14:07 -07:00
c61c14a127 docs: remove core.module.ts from file tree in style guide (#30679)
PR Close #30679
2019-05-28 09:27:49 -07:00
652b0959a8 docs: add missing preposition (#30691)
You need do nothing -> You need to do nothing
PR Close #30691
2019-05-28 09:27:24 -07:00
002fbddcf1 docs: add default AOT to migrating projects to Ivy (#30697)
Followup to https://github.com/angular/angular/pull/29380, https://github.com/angular/angular/pull/30238, https://github.com/angular/angular-cli/pull/14537.

PR Close #30697
2019-05-28 09:27:02 -07:00
4761d40a41 docs: fix typo in a declaration alert (#30545)
Co-Authored-By: CaerusKaru <caerus.karu@gmail.com>
PR Close #30545
2019-05-28 09:25:10 -07:00
608e0f0d67 docs: add dynamic import allowed syntax to the deprecation guide (#30545)
PR Close #30545
2019-05-28 09:25:10 -07:00
45718b3b21 build(docs-infra): upgrade cli command docs sources to 9a3d36c98 (#30609)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](fa429865e...9a3d36c98):

**Modified**
- help/analytics.json
- help/build.json
- help/e2e.json
- help/serve.json
- help/test.json
- help/xi18n.json

##

PR Close #30609
2019-05-24 18:19:17 -04:00
b5756bcc39 docs(bazel): remove out of date known issue with Webstorm (#30650)
https://github.com/bazelbuild/intellij/issues/246 was resolved in 2018

PR Close #30650
2019-05-24 13:51:29 -04:00
60f0462049 docs: drop coding conventions from style guide (#30334)
PR Close #30334
2019-05-24 13:46:12 -04:00
9fd22959d3 docs: add Michael Hladky to GDE resources (#30596)
PR Close #30596
2019-05-24 13:40:34 -04:00
d5dd907396 docs(core): static-query migration should use permalink for migration guide (#30649)
8479cb4233 updated the static-query migration
to refer to the new guide on AIO. Unfortunately these URLs are currently not
valid as the guide is only available on `next.angular.io` right now. In order to
make the link work permanently (e.g. if we eventually remove the guide in future
major versions), we use the permalink from the `v8` subdomain.

PR Close #30649
2019-05-24 10:08:17 -05:00
5a6bf7de0e docs: update link to static queries in changelog (#30649)
PR Close #30649
2019-05-24 10:08:16 -05:00
d135bb5e6e release: cut the v8.0.0-rc.5 release 2019-05-23 22:32:48 -07:00
8b9a3e49f2 docs(core): add more info to static query guide (#30646)
PR Close #30646
2019-05-23 22:14:50 -07:00
44e55fe2e4 docs(core): update static query schematic with guide link (#30646)
PR Close #30646
2019-05-23 22:14:50 -07:00
063cc308b6 docs(core): update deprecations guide (#30644)
PR Close #30644
2019-05-23 16:25:49 -07:00
c567135dd5 docs(core): add migration guide for static queries (#30644)
PR Close #30644
2019-05-23 16:25:49 -07:00
361f181c8c feat(platform-webworker): deprecate platform-webworker (#30642)
DEPRECATION:

platform-webworker has been around since the initial release of Angular
version 2. It began as an experiment to leverage Angular's rendering
architecture and try something different: to run an entire web application
in a web worker.

We've learned a lot from this experiment, and have come to the conclusion
that pushing entire applications to run in a web worker is not a recipe for
success for most applications. This is due to a number of unresolved issues,
including:

* Poor or non-existent support for web worker APIs in web crawlers/indexers.
* Poor support in build and bundling tooling.

As a result, as of Angular version 8, we are deprecating the
`platform-webworker` APIs in Angular. This consists of both NPM packages,
`@angular/platform-webworker` and `@angular/platform-webworker-dynamic`.

Going forward, we will focus our efforts related to web workers around their
primary use case of offloading CPU-intensive but not critical work.

FW-1339 #resolve

PR Close #30642
2019-05-23 15:09:49 -07:00
b40844523b feat(core): deprecate integration with the Web Tracing Framework (WTF) (#30642)
DEPRECATION:

Angular previously has supported an integration with the Web Tracing
Framework (WTF) for performance testing of Angular applications. This
integration has not been maintained and likely does not work for the
majority of Angular applications today. As a result, we are deprecating
the integration in Angular version 8.

This deprecation covers the following public APIs:
* `WtfScopeFn`
* `wtfCreateScope`
* `wtfStartTimeRange`
* `wtfEndTimeRange`
* `wtfLeave`

FW-1338 #resolve

PR Close #30642
2019-05-23 15:09:49 -07:00
c8af830ec8 fix(core): require 'static' flag on queries in typings (#30641)
This commit makes the static flag on @ViewChild and @ContentChild required.

BREAKING CHANGE:

In Angular version 8, it's required that all @ViewChild and @ContentChild
queries have a 'static' flag specifying whether the query is 'static' or
'dynamic'. The compiler previously sorted queries automatically, but in
8.0 developers are required to explicitly specify which behavior is wanted.
This is a temporary requirement as part of a migration; see
https://angular.io/guide/static-query-migration for more details.

@ViewChildren and @ContentChildren queries are always dynamic, and so are
unaffected.

PR Close #30641
2019-05-23 15:09:20 -07:00
e2c9ddb33e test(core): update query-specific tests in core (#30626) (#30641)
PR Close #30626

PR Close #30641
2019-05-23 15:09:20 -07:00
04196ec2d0 test(compiler): update examples and compiler tests (#30626) (#30641)
PR Close #30626

PR Close #30641
2019-05-23 15:09:20 -07:00
7323072c5c test(common): update common tests to use static flag (#30626) (#30641)
PR Close #30626

PR Close #30641
2019-05-23 15:09:20 -07:00
f0c5400cab test(core): update core tests (unrelated to queries) to use static flag (#30626) (#30641)
PR Close #30626

PR Close #30641
2019-05-23 15:09:19 -07:00
3f2f937c9f docs: add v8 deprecations (#30598)
PR Close #30598
2019-05-23 13:31:14 -07:00
256fe2421a refactor(core): static-query migration should warn about syntax failures (#30628)
Currently if a project has source-files with syntax failures and the migration
has been started on a broken project, we silently migrate *as much as possible*,
but never notify the developer that the project was in a broken state and that
he can re-run the migration after the failures are fixed.

Additionally the template strategy does not need to exit gracefully if it detects
Angular semantic diagnostics on generated files (template type checking). These
diagnostics are not relevant for the query timing analysis.

PR Close #30628
2019-05-23 10:31:49 -07:00
e6f27bcb0c refactor(core): static-query migration should always use template strategy (#30628)
We are removing the prompt for the `static-query` migration and make the
template strategy the migration strategy for the migration. The usage
strategy is good for best-practices, but for now we want to ensure that
the migration is a seamless as possible and that is only achievable my
re-using the same logic that View Engine uses for determining the
timing of a query.

PR Close #30628
2019-05-23 10:31:48 -07:00
8abcf04a5e docs: update simple stackblitz deployment instructions (#30465)
PR Close #30465
2019-05-22 16:29:45 -07:00
bf38df4eb9 fix(bazel): allow ts_library interop with list-typed inputs (#30600)
_compile_action should take a list since we compute it within one node in the build graph
This needs to be cleaned up since Bazel is getting stricter with
disallowing iteration over depsets

PR Close #30600
2019-05-22 16:22:11 -07:00
79a025306a docs: add new cli builder api guide (#29964)
PR Close #29964
2019-05-22 16:19:54 -07:00
62c936aa49 docs: update node and typescript versions mentioned in docs (#30601)
PR Close #30601
2019-05-22 16:17:42 -07:00
77e1b34d91 docs: update file structure and workspace config for v8 (#30595)
PR Close #30595
2019-05-22 11:20:18 -07:00
26cb128b3c build: remove concurrency from e2e tests (#30547)
There appears to be a race condition with the package.json files during test runs

PR Close #30547
2019-05-22 10:41:19 -07:00
fdbe07982a refactor: Move from Δ back to ɵɵ (#30547)
PR Close #30547
2019-05-22 10:41:19 -07:00
c0e3209915 build: update base SHA for rebase on merge-pr script 2019-05-22 10:40:34 -07:00
70880f0cea refactor(core): migrations should parse cli workspace config as json5 (#30582)
Currently we try to parse CLI workspace configurations gracefully by
using the native `JSON.parse()` method. This means that the CLI workspace
configuration needs to follow the strict JSON specification because otherwise
the migrations would not be able to find TypeScript configurations in the CLI
project where JSON5 workspace configurations are supported.

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

PR Close #30582
2019-05-21 17:26:23 -07:00
221a5ba634 build(docs-infra): upgrade cli command docs sources to fa429865e (#30531)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](d46eb367f...fa429865e):

**Modified**
- help/update.json

##

PR Close #30531
2019-05-21 17:09:18 -07:00
68b08cf782 docs: deprecations summary fix api heading level, remove inject, add index by version (#30400)
PR Close #30400
2019-05-21 13:52:46 -07:00
10560a0872 docs: delete double dashes on ng command in testing guide (#30551)
Closes #30550

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

Refs #29905
Fixes FW-1336

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

PR Close #30567
2019-05-21 13:09:10 -07:00
276f9067c8 docs(common): update API docs for unified location service for upgrading (#30567)
PR Close #30567
2019-05-21 13:09:09 -07:00
0e90a4263b docs: document the PR action: rerun CI at HEAD label in TRIAGE_AND_LABELS.md (#30171)
Related to #29098.

PR Close #30171
2019-05-21 13:07:38 -07:00
e4cc1398aa docs: document the PR action: review label in TRIAGE_AND_LABELS.md (#30171)
PR Close #30171
2019-05-21 13:07:38 -07:00
8d1f993ceb docs: add info about who adds/removes labels in TRIAGE_AND_LABELS.md (#30171)
PR Close #30171
2019-05-21 13:07:38 -07:00
df1ab49893 docs: fix spelling of 'its' (#30455)
PR Close #30455
2019-05-21 13:07:13 -07:00
df03fec8a6 refactor(ivy): rewrite flatten function to be more memory efficient (#30468)
The `flatten` function used `concat` and `slice` which created a lot of intermediary
object allocations. Because `flatten` is used from query any benchmark which
used query would exhibit high minor GC counts.

PR Close #30468
2019-05-21 13:06:24 -07:00
c01cae22e1 docs: add section to upgrade guide on lazy loading AngularJS (#30541)
PR Close #30541
2019-05-21 13:06:02 -07:00
5a46f94987 fix(core): remove deprecated TestBed.deprecatedOverrideProvider API (#30576)
BREAKING CHANGE

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

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

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

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

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

Fixes #30577

PR Close #30593
2019-05-21 12:32:58 -07:00
8043e3131c docs: use dynamic import syntax in examples using lazy loading (#30563)
PR Close #30563
2019-05-21 09:09:35 -07:00
54f7245081 docs(changelog): remove docs-infra changes (#25833)
PR Close #25833
2019-05-21 09:06:46 -07:00
5de24b6dfe docs: move instructions to see changes after the error is fixed in the tutorial (#30529)
docs: List only appears after the error is fixed

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

PR Close #30529
2019-05-21 09:03:49 -07:00
4dc4d7f30a docs: remove gender prefixes from examples (#29972)
PR Close #29972
2019-05-20 16:43:00 -07:00
fcea1a3c22 docs: improve consistency of style guide example (#30504)
The text for entry Style 04-10 of the style guide talks about
FilterTextService however, the example folder structure has the inversed
filename.

PR Close #30504
2019-05-20 16:42:16 -07:00
8bc4da8665 fix(bazel): ng test should run specific ts_web_test_suite (#30526)
PR closes https://github.com/angular/angular/issues/30191

PR Close #30526
2019-05-20 16:40:11 -07:00
a5a2d525ae docs: move old quick start content into new local setup guide (#29651)
PR Close #29651
2019-05-20 10:16:24 -07:00
4690dcecac build: add recommended config files for VSCode remote development (#30450)
Add some recommended config files to use (as is or as basis) for setting
up [remote development using docker containers][1] with VSCode. This is
an opt-in feature. See `.devcontainer/README.md` for more info.

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

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

PR Close #30450
2019-05-20 10:13:53 -07:00
722b2fa6ed feat(common): stricter types for SlicePipe (#30156)
Adds overloads to the `transform` methods of `SlicePipe`,
to have better types than `any` for `value` and `any` as a return.
With this commit, using `slice` in an `ngFor` still allow to type-check the content of the `ngFor`
with `fullTemplateTypeCheck` enabled in Ivy:

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

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

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

PR Close #30156
2019-05-17 14:21:37 -07:00
124d1abf19 docs: update docs example dependencies to version 8 (#30385)
PR Close #30385
2019-05-17 14:16:56 -07:00
736d3ef820 docs: add kamil mysliwiec to GDE resources (#30508)
PR Close #30508
2019-05-17 13:32:44 -07:00
9b0ad347e1 test(platform-browser-dynamic): avoid swallowing error in CachedResourceLoader test (#30515)
Previously, in order to assert that the promise was not resolved, an
error was thrown when the promise was resolved successfully. At the
same, `.catch()` was used to silence the (expected) promise rejection.
However, the chained `.catch()` handler would also catch (and swallow)
the error thrown on resolving the promise, making the test pass, even if
the promise was not rejected.

This commit fixes it by ensuring that the error thrown on resolving the
promise is not caught by the rejection handler.

PR Close #30515
2019-05-16 20:14:05 -07:00
d2598ace0a test(platform-browser-dynamic): make CachedResourceLoader tests more reliable (#30515)
Previously, [this test][1] would occasionally fail (e.g. on CI) with
"Template cache was not found in $templateCache". This was due to a
combination of:
1. [That test][2] (which removes the cache) being run right before the
   failing test.
2. The async `TestBed.compileComponents()` operation run in the
   `beforeEach()` block (which sets the cache) not having completed
   before the `it()` block.

This commit fixes the issue by ensuring the cache is always set, before
instantiating `CachedResourceLoader`.

This commit also moves some operations that are only needed in one test
from the `beforeEach()` block to that test's `it()` block.

[1]: 79903b1842/packages/platform-browser-dynamic/test/resource_loader/resource_loader_cache_spec.ts (L50)
[2]: 79903b1842/packages/platform-browser-dynamic/test/resource_loader/resource_loader_cache_spec.ts (L37)

Fixes #30499

PR Close #30515
2019-05-16 20:14:04 -07:00
4a25e4cf95 build(bazel): update to latest stable chromium 74 on osx and linux for karma under bazel (#30502)
We were on 69 for both of these platforms which is fairly old. This update also requires a temporary patch to the @bazel/karma npm package to disable chrome sandboxing on OSX as it is broken under Bazel as of chromium 73. Windows is still on Chromium 66 but updating this will require upstream changes to rules_webtesting as the archive name & executable name has changed as of 72 for Windows and hard-coded paths in rules_webtesting break things.

PR Close #30502
2019-05-16 14:38:15 -07:00
3f67bf208d docs: add link to location upgrade config (#30331)
PR Close #30331
2019-05-16 11:53:48 -07:00
d85476fd8c docs(docs-infra): add common/upgrade to API package sources (#30331)
Closes #30332

PR Close #30331
2019-05-16 11:53:43 -07:00
9763edf829 refactor(common): update argument length in UrlCodec.areEqual method and AngularJSUrlCodec.areEqual methods (#30331)
dgeni requires that method arguments be at least 2 characters long

PR Close #30331
2019-05-16 11:47:17 -07:00
b6ae54c547 docs: add section to upgrade guide on using the unified location service (#30331)
The LocationUpgradeModule provides a unified way of handling URL updates
across AngularJS and Angular.

PR Close #30331
2019-05-16 11:47:17 -07:00
3de26a84ff fix(bazel): Disable sandbox on Mac OS (#30460)
Removing the sandbox improves build time by almost 40%.

For a hello world (ng new) application:
ng build with sandbox: 22.0 seconds
ng build without sandbox: 13.3 seconds

PR Close #30460
2019-05-16 09:43:54 -07:00
8022d3691b feat(common): add ability to watch for AngularJS URL updates through onUrlChange hook (#30466)
The LocationShim (replacement for `$location`) was added to centralize dealing with the browser URL. Additionally, an `onUrlChange` method was added to Angular's Location service. This PR adds a corresponding method to the LocationShim so updates from AngularJS can be tracked in Angular.

PR Close #30466
2019-05-16 09:43:33 -07:00
581336a918 docs: fix typo in animations doc (#30457)
PR Close #30457
2019-05-15 14:26:12 -07:00
effc58086c docs: correct types in transform method to match specification. (#29812)
PR Close #29812
2019-05-15 14:24:20 -07:00
766615c8a1 docs: fix example "testing" app compilation (#30427)
PR Close #30427
2019-05-15 14:12:23 -07:00
ede4246663 docs: fix the payload in event-binding sample code (#30429)
after reading the context. there are  some clues to infer the payload should be the `item`, not `item.name`.
1.  EventEmitter<Item>.
2.  the desc say that:
The component defines a deleteRequest property that returns an EventEmitter. When the user clicks delete, the component invokes the delete() method, telling the EventEmitter to emit an **Item** object.

PR Close #30429
2019-05-15 14:12:02 -07:00
bb8a6abbf2 test(ivy): move render3 query tests to acceptance (#30382)
Moves all manual render3 query tests that use the `elementProperty`
instructions to TestBed acceptance tests.

PR Close #30382
2019-05-15 14:11:38 -07:00
32daa930d0 fix(router): type cast correctly for IE 11 bug breaking URL Unification when comparing objects (#30464)
PR #30393 corrected behavior where Object.keys sometimes returns an `undefined` value. However, the types didn't reflect this in the code. That fix actually missed one value that could return `undefined`. This PR corrects this by casting the types to what they can be in IE 11. This ensures the code behaves as it should when this edge case comes up.

PR Close #30464
2019-05-15 14:09:54 -07:00
b6aa99d3a7 release: cut the v8.0.0-rc.4 release 2019-05-15 12:19:51 -07:00
e10b213784 refactor(ivy): deprecate ɵɵinject and ɵɵdefineInjectable (#30467)
- They are to be removed before the end of RC

PR Close #30467
2019-05-15 11:40:33 -07:00
a67cf99b0c refactor(ivy): mark ΔdefineInjectable as codeGenApi. (#30467)
PR Close #30467
2019-05-15 11:40:33 -07:00
04d04fd147 refactor(ivy): replace ɵɵ with Δ (#30467)
PR Close #30467
2019-05-15 11:40:33 -07:00
17361d2b2c Revert "Revert "fix(router): fix a problem with router not responding to back button (#30160)" (#30320)" (#30344)
This reverts commit 8ced321bb6.

PR Close #30344
2019-05-15 10:14:48 -07:00
9b88920aa9 fix(router): ensure navigations start with the current URL value incase redirect is skipped (#30344)
In some cases where multiple navigations happen to the same URL, the router will not process a given URL. In those cases, we fall into logic that resets state for the next navigation. One piece of this resetting is to set the `browserUrlTree` to the most recent `urlAfterRedirects`i.

However, there was bug in this logic because in some cases the `urlAfterRedirects` is a stale value. This happens any time a URL won't be processed, and the previous URL will also not be processed. This creates unpredictable behavior, not the least of which ends up being a broken `back` button.

This PR kicks off new navigations with the current value the router assumes is in the browser. All the logic around how to handle future navigations is based on this value compared to the current transition, so it's important to kick off all new navigations with the current value so in the edge case described above we don't end up with an old value being set into `browserUrlTree`.

Fixes #30340
Related to #30160

PR Close #30344
2019-05-15 10:14:47 -07:00
b12e76d1d3 refactor: remove toplevel property accesses (#30470)
PR Close #30470
2019-05-15 10:00:12 -07:00
af001a8cbd test: add integration test for side effects (#30470)
This new tests keeps track of the known side effects for Angular ES modules.

PR Close #30470
2019-05-15 10:00:12 -07:00
db64b014f8 Revert "fix(core): CSS sanitizer now allows parens in file names (#30322)" (#30463)
This reverts commit 728db88280.

We're reverting this commit for now, until it can be subjected to a more
thorough security review.

PR Close #30463
2019-05-14 14:49:40 -07:00
7e34975bb0 refactor(core): improve messages for static-query migrations (#30458)
Slightly improves the messages for the static-query migration in order
to make the terminal output less verbose but more helpful. Unfortunately
we are limited in what we can print due to the devkit not providing much
utilities for printing good messages from a migration schematic.

PR Close #30458
2019-05-14 14:04:44 -07:00
0fa48e8c00 fix(core): static-query migration should not fallback to test strategy (#30458)
Currently if something fails in the selected strategy (e.g. AOT failures),
the migration currently accidentally falls back to the test strategy. This
is not helpful as we want to give developers the possibility to re-run
the migration after fixing potential AOT failures.

PR Close #30458
2019-05-14 14:04:44 -07:00
fde3f467e2 fix(core): static-query migration errors not printed properly (#30458)
Apparently the devkit logger is not able to properly print
out error objects, so we need to convert them to a string
before in order to make the error visible to the user.

This is not testable without an e2e test that validates the CLI
terminal output.

PR Close #30458
2019-05-14 14:04:44 -07:00
7b378a6920 docs: update ivy preview page (#30355)
PR Close #30355
2019-05-14 12:17:26 -07:00
3136d9ff2e fix(bazel): Use existing npm/yarn lock files (#30438)
This PR fixes Bazel builder to create yarn_install rule in WORKSPACE if
yarn.lock is present, otherwise npm_install rule if package-lock.json is
present. If none is present, default to yarn_install and create an empty
yarn.lock file.

PR closes https://github.com/angular/angular/issues/30164
PR closes https://github.com/angular/angular/pull/30359

PR Close #30438
2019-05-14 11:37:33 -07:00
325e6cf557 build(docs-infra): update http-server to 0.11.1 (#30401)
Fixes #30363

PR Close #30401
2019-05-14 09:55:47 -07:00
381d7c4e44 test(ivy): move render3 directive tests to acceptance (#30432)
Moves all manual render3 directive tests to TestBed acceptance
tests.

PR Close #30432
2019-05-14 09:37:01 -07:00
1b6f3c1ead test(ivy): move render3 renderer_factory tests to acceptance (#30435)
Moves all manual render3 tests which are located within the
`renderer_factory_spec.ts` file to acceptance tests. A few tests
that use Ivy-specific logic which is not replicable with `TestBed`
remain in the render3 folder (e.g. using `renderTemplate`)

Additionally migrated tests that assert the lifecycles of the
renderer_factory are set to *ivy only* as the lifecycle seems
to be different in Ivy. Tracked with: FW-1320

PR Close #30435
2019-05-14 09:36:24 -07:00
c38349127c fix(router): IE 11 bug can break URL unification when comparing objects (#30393)
This PR fixes an issue where IE 11 can return `undefined` in with an `Object.keys` call. Solution is to add a runtime check on the value. Based on the types being passed, this shouldn't be necessary, but is needed only for IE 11. Unit test doesn't work for this PR because it can't be replicated easily.

PR Close #30393
2019-05-13 11:40:43 -07:00
a4817729a2 test: fix ngtsc tests in windows (#30146)
This commit fixes the following test target in windows

```
//packages/compiler-cli/test/ngtsc:ngtsc
```

PR Close #30146
2019-05-13 11:06:13 -07:00
61c343e3eb test: fix several Bazel compiler tests in windows (#30146)
```
//packages/compiler-cli/test:ngc
//packages/compiler/test:test
```

This also address `node_modules` to the ignored paths for ngc compiler as otherwise the `ready` is never fired

Partially addresses #29785

PR Close #30146
2019-05-13 11:06:13 -07:00
24e6c1e80d release: ts_api_guardian (#30120)
PR Close #30120
2019-05-13 10:53:35 -07:00
42fc5c9b33 docs: change reference to jQuery programmers (#30386)
The section on Data Binding makes a reference to "any experienced jQuery programmer" which is a bit too narrow since there are also  programmers that write their front end in pure JavaScript.
PR Close #30386
2019-05-13 10:49:27 -07:00
33e7b285ca build(docs-infra): upgrade cli command docs sources to d46eb367f (#30415)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](cd7920355...d46eb367f):

**Modified**
- help/build.json
- help/e2e.json
- help/serve.json
- help/test.json
- help/xi18n.json

##

PR Close #30415
2019-05-13 10:28:18 -07:00
74afdc37da build: ignore .devcontainer/ directory (#30417)
This makes it easier to experiment with VSCode's
[remote development using docker containers][1] feature.

In the future, we may check in the necessary files for users to use this
feature, but for now ignoring the directory makes it easier play around
and evaluate the feature.

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

PR Close #30417
2019-05-13 10:17:16 -07:00
3c1ffba0ad test(ivy): move pipe tests into acceptance (#30389)
Moves over the tests from `pipe_spec` into `acceptance`. Note that the two `WrappedValue` tests haven't been moved over, because impure pipes always throw "changed after checked" errors in `TestBed`. This seems to be consistent with ViewEngine.

PR Close #30389
2019-05-10 14:35:57 -07:00
14c0017db8 build: upgrade zone.js to 0.9.1 (#30260)
Close 30203

resolves the issue that zone-legacy XHR issue

PR Close #30260
2019-05-10 14:25:56 -07:00
4878f4890b build(docs-infra): ensure hidden cli commands are excluded from sitemap.xml (#30395)
Previously, the processor that excludes certain cli commands
(`filterHiddenCommand`) was being run after the `createSitemap`
processor, resulting in those commands to be present in `sitemap.xml`,
while the actual pages where missing. This also resulted in 404s, when
search engine crawlers tried to index the missing URLs.

This commit fixes it by ensuring that the `filterHiddenCommand`
processor is run before the `createSitemap` processor.

PR Close #30395
2019-05-10 11:56:39 -07:00
b7edef0cd3 docs: remove mention of chrome 41 from differential loading (#30390)
PR Close #30390
2019-05-10 11:55:12 -07:00
39fa937ab9 test(ivy): move output tests to acceptance (#30372)
Moves most of the tests in `output_spec` into `acceptance`. Note that one test is left in `render3`, because it's testing mixing in custom logic with instructions which we can't replicate using `TestBed`.

PR Close #30372
2019-05-10 09:27:57 -07:00
2977829c67 test(ivy): move content projection tests to acceptance (#30357)
Moves all manual `render3` content projection tests that use
the `ɵɵelementProperty` to acceptance tests. Additionally a
few other content projection tests were moved over to
acceptance. Eventually we'll be able to move all remaining
content projection tests to acceptance.

PR Close #30357
2019-05-10 09:18:37 -07:00
dbe845e048 test(ivy): use TestBed for render3 component tests (#30282)
PR Close #30282
2019-05-10 09:18:19 -07:00
e562acc884 feat(bazel): use rbe_autoconfig() and new container. (#29336)
After this PR is merged, maintainers no longer need to update .bazelrc
file, toolchain and platform related flags for RBE builds and tests
(unless there is a breaking change in Bazel related to those flags).

Maintainers just need to update the pin of @bazel-toolchains repo
regularly in the packages/bazel/package.bzl file according to
https://releases.bazel.build/bazel-toolchains.html to include the
latest checked-in toolchain configs. If rbe_autoconfig() cannot find
appropriate toolchain configs for the version of Bazel in the version of
@bazel_toolchains repo that is currently used by this project, it will pull
down the container and generate the configs on the fly as the beginning
of the build/test.

PR Close #29336
2019-05-09 14:58:34 -07:00
e295c6a0ae fix(core): static-query usage migration strategy should detect ambiguous query usage (#30215)
Currently we always just set the timing to `false` if we aren't
able to analyze a given call expression or new expression. e.g.

```ts
ngOnInit() {
  thirdPartyCallSync(() => this.query.doSomething())
}
```

In that case the `thirdPartyCallSync` function comes from the `node_modules`
and is only defined through types while there is no code for the
actual function logic that can be analyzed. This makes it impossible
to tell whether the given call expression actually causes the specified
arrow function to be executed synchronously or not. In order to be able
to make this better, we now peek into the passed arrow function and
check for a synchronous query usage. If so, we set the query timing to
static and mark it as ambiguous. This ensures that the usage strategy is
less "magical" and more correct with third-party code.

Additionally since functions like `setTimeout` are not analyzable but known
to be asynchronous, there is a hard-coded list of known functions which
shouldn't be marked as ambiguous.

Resolves FW-1214. As planned within https://hackmd.io/hPiLWpPlQ4uynC1luIBdfQ

PR Close #30215
2019-05-09 14:39:06 -07:00
10b43355f8 test(core): update core_all size-tracking golden file (#30257)
Even though we don't run the size-tracking test on CI
right now, we update the golden size map as part of
the size-tracking tool update. The size-map difference
should generally be kept up-to-date to be able to
determine which PRs contribute size to a given file.

PR Close #30257
2019-05-09 12:55:17 -07:00
d4e7587bd8 build: size-tracking test should support max-byte threshold (#30257)
Based on discussion that happened on the PR that introduced
the size-tracking tool, we want to have another threshold for
the raw byte difference. This allows us to better control for
which changes the size-tracking tool should report a difference.

See: https://github.com/angular/angular/pull/30070#discussion_r278332315

PR Close #30257
2019-05-09 12:55:17 -07:00
cabe03cf6d docs(forms): properly convert number to string for formControlName input (#29473)
PR Close #29473
2019-05-09 11:27:49 -07:00
0cefa9e342 docs: fix filename in example headers for provider guides (#29889)
PR Close #29889
2019-05-09 11:27:01 -07:00
e073daa48e docs(forms): add comment of the value (#29898)
PR Close #29898
2019-05-09 11:25:58 -07:00
994d48a96e test(ivy): update devkit in hello world tests to rc.2 (#30162)
PR Close #30162
2019-05-09 11:24:52 -07:00
806f8118c8 docs: remove reference to e2e applications (#30324)
This is no longer applicable in angular version 8.

PR Close #30324
2019-05-09 11:23:06 -07:00
dd299f9eb2 fix(core): static-query migration should handle queries on accessors (#30327)
Currently the static-query migration ignores queries declared on getters
or setters as these are not part of a `PropertyDeclaration`. We need to
handle these queries in order to cover all queries within a given project.

The usage strategy is not able to detect timing for queries on accessors,
so we add a TODO and print a message. The template strategy is able
to detect the proper timing for such queries because it's not dependent
on detecting the usage of the query.

Resolves FW-1215

PR Close #30327
2019-05-09 11:22:37 -07:00
49ec3f312c fix(docs-infra): Handle search criteria from Chrome search providers (#30345)
fixes #30242

PR Close #30345
2019-05-09 11:21:12 -07:00
71eba450e6 fix(bazel): pass correct arguments to http_server in Windows (#30346)
Under Windows, the server binary has an extension of  `.exe` and the current logic is not handling that.

Partially addresses: #29785

PR Close #30346
2019-05-09 11:20:52 -07:00
192f108b0f fix: ensure strict mode when evaluating in JIT (#30122)
PR Close #30122
2019-05-08 14:34:10 -07:00
dd8651db73 fix(core): CSS sanitizer now allows parens in file names (#30322)
Resolves an issue where images that were created with a name like `'foo (1).png'` would not pass CSS url sanitization.

PR Close #30322
2019-05-08 14:22:44 -07:00
5bbbe3f684 docs(router): Move ActivatedRoute example to mini-app (#29755)
PR Close #29755
2019-05-08 13:52:23 -07:00
a71d8a837b fix(core): static-query migration should gracefully exit if AOT compiler throws (#30269)
The static-query template strategy leverages the AOT compiler
in order to determine the query timing. Unfortunately the AOT
compiler has open bugs that can cause unexpected failures which
make the template strategy unusable in rare cases. These rare
exceptions need to be handled gracefully in order to avoid confusion
and to provide a more smooth migration.

Additionally migration strategy setup failures are now reported with
stack traces as the `ng update` command does not print stack traces.
This makes it easier to reproduce and report migration issues.

PR Close #30269
2019-05-08 11:54:34 -07:00
e8ceae14e1 fix(core): migrations not always migrating all files (#30269)
In an Angular CLI project scenario where projects only reference
top-level source-files through the `tsconfig` `files` option, we currently
do not migrate referenced source-files. This can be fixed checking all
referenced source-files which aren't coming from an external library.

This is similar to how `tslint` determines project source-files.

PR Close #30269
2019-05-08 11:54:34 -07:00
c3246e6f16 fix(core): static-query migration fails with default parameter values (#30269)
Currently when someone has a call expression within the `ngOnInit` call
and we try to peek into that function with respect to the current function
context, the schematic errors because a call expression argument is
undefined. This is valid because the target function declaration defines
that parameter with a default value. In order to fix this, we need to
respect parameter default values.

PR Close #30269
2019-05-08 11:54:34 -07:00
685753361e fix(docs-infra): remove scroll position from sessionStorage when a ServiceWorker update has been activated (#29958)
closes #29893

PR Close #29958
2019-05-08 09:23:43 -07:00
6b07711f96 test(core): run schematic tests with public migration collection (#30198)
572b54967c changed how the schematic
tests are executed. Tests no longer use the schematic collection
that is also used by the CLI `ng update` command and therefore
the migration collection could  technically be invalid.

In order to ensure that the public migration collection is guaranteed
to work and to avoid duplication within two schematic collections, the
changes are partially reverted and only the disabled `injectable-pipe`
schematic has its own collection.

PR Close #30198
2019-05-08 09:23:29 -07:00
12fb639b7d fix(core): static-query migration should not prompt if no queries are used (#30254)
Currently we always prompt when the static-query migration runs. This is not
always needed because some applications do not even use `ViewChild` or
`ContentChild` queries and it just causes confusion if developers need to
decide on a migration strategy while there is nothing to migrate.

In order to avoid this confusion, we no longer prompt for a strategy
if there are no queries declared within the project.

PR Close #30254
2019-05-08 09:22:49 -07:00
644925fd0c build: add jasonaden to angular/upgrade in CODEOWNERS (#30307)
PR Close #30307
2019-05-08 09:20:25 -07:00
bcc72b0924 test(ivy): move host binding tests to acceptance (#30308)
Switches over all host binding tests to use `TestBed` and to be under `acceptance`.

PR Close #30308
2019-05-08 09:19:44 -07:00
e1091b2ba8 build(docs-infra): upgrade cli command docs sources to cd7920355 (#30326)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](73c53266f...cd7920355):

**Modified**
- help/e2e.json
- help/generate.json
- help/update.json

##

PR Close #30326
2019-05-08 09:15:22 -07:00
08841e31d9 Revert "fix(router): fix a problem with router not responding to back button (#30160)" (#30320)
This reverts commit 3327bd8eab.

PR Close #30320
2019-05-07 17:22:25 -07:00
d1fcc2bc13 fix(bazel): Directly spawn native Bazel binary (#30306)
Instead of launching a Node.js process that in turn spawns Bazel binary,
the Builder could now directly spawn the native binary. This makes the
bootup process slightly more efficient, and allows the Builder to
control spawn options. This works with both Bazel and iBazel.

PR Close #30306
2019-05-07 16:51:42 -07:00
fac00442d2 fix(core): consistently use ng:/// for sourcemap URLs (#29826)
Currently, in jit mode, `ngInjectableDef`, `ngDirectiveDef`, `ngPipeDef` and `ngModuleDef` use `ng://`,
which display them in the top domain in Chrome Dev Tools, whereas `ngComponentDef` uses `ng:///` which display components in a separate domain.

You can currently see:

```
AppModule
UserService
ng://
|_ AppComponent
   |_ template.html
|_ AppComponent.js
...
```

This commits replaces all `ng://` with `ng:///` to display every Angular entity in the `ng://` domain.

```
ng://
|_ AppModule
|_ UserService
|_ AppComponent
...
```

PR Close #29826
2019-05-07 15:37:21 -07:00
b8cbcbcf49 release: cut the v8.0.0-rc.3 release 2019-05-07 14:30:37 -07:00
1ed45bd783 docs(aio): add awade jigsaw into resources (#30204)
PR Close #30204
2019-05-07 13:13:22 -07:00
82fd1920b1 docs: update date pipe example for minutes and seconds (#30281) (#30295)
PR Close #30295
2019-05-07 10:29:31 -07:00
f6d7271ec7 refactor: remove tslint no-use-before-declare rule (#30288)
PR Close #30288
2019-05-07 10:25:36 -07:00
c1f3faf1df test: fix several bazel compiler-cli tests in windows (#30189)
```
//packages/compiler-cli/integrationtest:integrationtest
//packages/compiler-cli/test/compliance:compliance
```

Partially addresses #29785

PR Close #30189
2019-05-07 10:21:37 -07:00
97202278f9 fix(router): ensure history.state is set in eager update mode (#30154)
Without this change, `history.state` isn't being set when updating the browser URL in `eager` update mode.

PR Close #30154
2019-05-06 16:09:59 -07:00
132f01c5ca fix(router): fix a problem with router not responding to back button (#30160)
There was a problem with a combination of the `eager` URL update, browser `back` button, and hybrid applications. Details provided in internal ticket http://b/123667227.

This fix handles the problem by setting `router.browserUrlTree` when all conditions have failed, meaning the browser doesn't do anything with the navigation other than update internal data structures. Without this change, the problem was an old value was stored in `router.broserUrlTree` causing some new navigations to be compared to an old value and breaking future navigations.

PR Close #30160
2019-05-06 16:06:59 -07:00
6a987f1b9c docs(forms): fix import line ending (#30290)
PR Close #30290
2019-05-06 16:05:23 -07:00
548b003ed3 fix(compiler-cli): log ngcc skipping messages as debug instead of info (#30232)
Related to https://github.com/angular/angular-cli/issues/14194, https://github.com/angular/angular-cli/pull/14320

PR Close #30232
2019-05-06 14:11:28 -07:00
48dc41de01 docs: fix naming miss and improve anchor reference in router guide (#30225)
Signed-off-by: Richard Lea <chigix@zoho.com>

PR Close #30225
2019-05-06 11:48:05 -07:00
817c2b49bc docs: add explanation on what lazy loading is (#29667)
PR Close #29667
2019-05-06 10:16:58 -07:00
fed07c735c docs(forms): fix ControlValueAccessor registerOnChange code example (#30276)
PR Close #30276
2019-05-06 09:27:12 -07:00
390cac6874 docs: fix targetEntryPointPath description (#30237)
PR Close #30237
2019-05-06 09:21:23 -07:00
8eb0b8bd40 docs: update Wikipedia link to Polyfill description (#30214)
PR Close #30214
2019-05-06 09:20:14 -07:00
d7283c6085 docs: fix example header in singleton services guide to match styleguide (#30097)
Removes the ".0" from code header, as that doesn't match the
recommended code style for service files names.

fixes #29862

PR Close #30097
2019-05-06 09:19:36 -07:00
3fe3a84a4b fix(core): fix interpolate identifier in AOT (#30243)
This commit fixes a regression introduced in PR 29692 where
the interpolate symbol in View Engine was improperly prefixed
with the ɵɵ that signifies private instructions for Ivy. It
resulted in interpolations of 10+ values not working correctly
in AOT mode. This commit removes the prefix.

PR Close #30243
2019-05-02 10:33:34 -07:00
28e4187bd6 fix(docs-infra): update app code to work with Ivy (#28530)
This commit also enables more tests to be run on CI with Ivy.

PR Close #28530
2019-05-01 16:38:33 -07:00
7cbc69c890 fix(ivy): allow R3TestBedCompiler to work in ngcc-processed apps (#28530)
Previously, `R3TestBedCompiler` was dynamically defining an
`@NgModule`-decorated `CompilerModule` class inside a method call.
Since ngcc only processes top-level classes, this class was not
transformed causing failures in unit tests (see #30121 for details).

This commit fixes it by using `compileNgModuleDefs()` directly (similar
to the fix in #30037).

Fixes #30121

PR Close #28530
2019-05-01 16:38:33 -07:00
1dc134bc6b docs: explicitly state purpose of components (#29879)
Current description is vague. I'd love to see this doc explicitly state that components are for reusable sets of UI features instead.

PR Close #29879
2019-05-01 13:38:13 -07:00
6a61d37f95 ci(docs-infra): re-enable aio_monitoring CircleCI jobs and change time (#30168)
The `aio_monitoring_next` CircleCI job was disabled due to a failure in
[302254](https://circleci.com/gh/angular/angular/302254). It turned out
the failure was caused because the job happened to run after a change
had been merged into master and right before it was deployed to
https://next.angular.io/ causing the tests not to match the deployed
version.

This commit re-enables the job and moves it to a different time, when it
is less likely that PRs will be being merged (and thus reducing the risk
of a similar timming issue).

Fixes #30101

PR Close #30168
2019-04-30 16:17:53 -07:00
8d2e92bcfe build(docs-infra): upgrade material and cdk to 8.0.0-rc.0 (#30202)
I bumped the payload size limits to reflect the current values - the changes have been insignificant.

PR Close #30202
2019-04-29 18:46:54 -07:00
5038f5c909 build(docs-infra): upgrade framework and cli to 8.0.0-rc.2 (#30202)
Brings in small payload size fixes.

PR Close #30202
2019-04-29 18:46:54 -07:00
6eeca70043 refactor(core): static-query migrations fails if options cannot be transformed (#30178)
Currently the `static-query` migrations fails at the final step of
updating a query when the query already specifies options which
cannot be transformed easily. e.g. the options are computed through
a function call: `@ViewChild(..., getQueryOpts());` or `@ViewChild(..., myOptionsVar)`.

In these cases we technically could add additionally logic to update
the query options, but given that this is an edge-case and it's
potentially over-engineering the migration schematic, we just
always add a TODO for the timing and print out the determined
query timing in the console. The developer in that case just needs
to manually update the logic for the query options to contain the
printed query timing.

Potentially related to: https://github.com/angular/angular-cli/issues/14298

PR Close #30178
2019-04-29 13:30:37 -07:00
9f68c35fa9 fix(bazel): Bump ibazel to 0.10.1 for windows fixes (#30196)
PR Close #30196
2019-04-29 13:29:12 -07:00
21418ea109 test: fix ngc-wrapped bazel tests in windows (#30111)
Partially addresses #29785

PR Close #30111
2019-04-29 13:23:45 -07:00
02d8b4ed3c docs: add in-page nav, change title to match left nav better (#30093)
PR Close #30093
2019-04-29 13:23:15 -07:00
6748392edc docs: add architect terms (#26963)
PR Close #26963
2019-04-29 13:22:20 -07:00
d9fd301157 build(docs-infra): update the aio app to framework and cli 8.0.0-rc.1 (#30183)
I updated the payload size limits as well. There still seem to be size regressions in the framework,
but at least the polyfills now uses the evergreen build of zones so we shaved off a few KB there.

PR Close #30183
2019-04-29 12:30:26 -07:00
71c5d80ce7 build: add size-tracking bazel test (#30070)
Introduces a new Bazel test that allows us to inspect
what source-files contribute to a given bundled file
and how much bytes they contribute to the bundle size.

Additionally the size-tracking rule groups the size
data by directories. This allows us to compare size
changes in the scope of directories. e.g. a lot of
files in a directory could increase slightly in size, but
in the directory scope the size change could be significant
and needs to be reported by the test target.

Resolves FW-1278

PR Close #30070
2019-04-29 12:29:25 -07:00
9798229fde release: cut the v8.0.0-rc.2 release 2019-04-29 12:03:39 -07:00
4b2fcfd5dc fix: disable injectable-pipe migration (#30180)
Disables the injectable pipe migration until we can decide whether this is the right solution for Ivy. Rolling it out properly will involve a more detailed plan and more changes like updating the styleguide, scaffolding schematics etc.

Context for the new `test-migrations.json`: since we use the `migrations.json` both for the real migrations and for tests, it doesn't allow us to disable a schematic, but continue running its tests. This change adds the test-specific file so that we can continue running the `injectable-pipe` tests, even though the schematic itself is disabled.

PR Close #30180
2019-04-29 09:40:00 -07:00
b4d291aa7a fix(ivy): injectable pipe schematic generating incorrect import statements (#30170)
Currently the injectable pipe schematic generates invalid imports like `import import { Pipe, PipeTransform, Injectable } from '@angular/core'; from '@angular/core';`. The issue wasn't caught by the unit tests, because the invalid import still contains the valid one.

Fixes #30159.

PR Close #30170
2019-04-29 09:39:11 -07:00
b0ecafdc2f docs: temporary disable aio_monitoring job due to a version skew (#30161)
It looks like `aio_monitoring` CircleCI job is still failing. Disabling it for now to keep master green.

PR Close #30161
2019-04-26 17:38:59 -07:00
6816bb62d7 Revert "refactor: use new Http library in playground (#29355)"
This reverts commit 908d43a5bb.
2019-04-26 16:51:38 -07:00
4b05b8cea0 refactor(ivy): move exports tests to acceptance (#30157)
PR Close #30157
2019-04-26 16:37:34 -07:00
a0728aedf7 docs: update readme. sentence correction. (#30136)
PR Close #30136
2019-04-26 16:36:53 -07:00
ea96f6112a build: unable to accept new symbol-extractor golden on windows (#30127)
Currently when working on Windows, it's not possible to accept a new
golden for a `symbol-extractor` Bazel test. This is because the generated
executable output from the `nodejs_binary` rule (without a macro) misses
a Windows executable wrapper that sets up the proper environment
variables for the runfiles. Causing the following failure on Windows:

```
 >>>> FAIL: RUNFILES environment variable is not set. <<<<
```

PR Close #30127
2019-04-26 16:35:51 -07:00
b706800ea8 fix(language-service): Remove tsserverlibrary from rollup globals (#30123)
This PR removes `tsserverlibrary` from rollup globals since the symbol
should not appear by the time rollup is invoked. `tsserverlibrary` is
used for types only, so the import statement should not be emitted by
tsc.

PR Close #30123
2019-04-26 16:35:05 -07:00
c6f95b1d70 ci: enable language service tests in codefresh (#30113)
PR Close #30113
2019-04-26 16:34:23 -07:00
d896126604 test: fix language service tests in windows (#30113)
This PR parially addresses #29785 and fixes ` //packages/language-service/test:test`

PR Close #30113
2019-04-26 16:34:23 -07:00
a20da5ddcc ci(docs-infra): use the tests from the stable branch in aio_monitoring_stable CircleCI job (#30110)
Previously, the `aio_monitoring_stable` job (which runs tests against
https://angular.io/) was using the tests from the master branch. As a
result, if the master branch included changes in those tests that were
not yet backported to the stable branch (and thus deployed to
https://angular.io/), the tests would fail.

This commit fixes this by using the tests from the stable branch to test
against https://angular.io/.

Fixes #30101

PR Close #30110
2019-04-26 16:33:46 -07:00
18878600ba ci(docs-infra): split the aio_monitoring CircleCI job into two jobs (#30110)
Previously, the `aio_monitoring` job was testing both the stable
(https://angular.io/) and the @next (https://next.angular.io/) versions.

This commit splits the tests into two separate jobs (still run as part
of the same workflow). This speeds up the tests (since the two jobs can
now run in parallel) and makes it easier to isolate failures (e.g.
identify which branch is failing, disable one of the two, etc.).
(Credits to @petebacondarwin 😉)

PR Close #30110
2019-04-26 16:33:46 -07:00
d7e10f3f7e ci(docs-infra): re-use setup CircleCI job in aio_monitoring (#30110)
PR Close #30110
2019-04-26 16:33:46 -07:00
4d044ea5b2 ci(docs-infra): re-enable aio_monitoring CircleCI job (#30110)
The job started failing for https://angular.io/, due to changes in tests
that only affected https://next.angular.io/, and was disabled in #30102.

This commit re-enables the job (since it does not block anything and it
will be fixed in a subsequent commit).

PR Close #30110
2019-04-26 16:33:46 -07:00
e2d1e0cd98 docs(docs-infra): fix typo in workspace-config.md file (#30108)
Fixed typo in 'Project asset configuration' section inside workdspace-config.md

PR Close #30108
2019-04-26 16:33:03 -07:00
4e056580bb test: fix api guardian tests on windows when node_modules are not installed (#30105)
When the workspace node_modules are not installed outside of bazel context the api guardian tests fails because the tree artifacts files are not symlinked in windows.

We need to pass the node module location in the node_path

PR Close #30105
2019-04-26 16:32:23 -07:00
e4c2e6a904 ci: add public_api_guard tests to codefresh config (#30105)
PR Close #30105
2019-04-26 16:32:23 -07:00
a50989832d test: fix ts api guardian and public guard tests on windows (#30105)
This change addresses several issues with ts-api-guardian and public api guards related tests in Windows

The fixes contain 3 main changes:
1) In `stripExportPattern` - replace `^` with `^^^^`  in RegExp due to a double escaping requirment under Windows. Note that under Linux this the extra character has no effect because it's still a valid RegExp in Js.

2. Force `*.patch` files to always be with a LF line sequence instead of CRLF in windows

3. When adding JSDoc comments consider the presence of a carriage return in a line new feed

Partially addresses #29785

PR Close #30105
2019-04-26 16:32:23 -07:00
525307b6a3 fix(ivy): correctly reflect undefined values (#30103)
Fixes Ivy reflecting properties with `undefined` values, rather than omitting them. Also fixes that Ivy doesn't clear the reflected values when property value changes from something that is defined to undefined.

This PR resolves FW-1277.

PR Close #30103
2019-04-26 16:31:50 -07:00
a3ab76b216 docs: update redirect links and fix typo (#30092)
PR Close #30092
2019-04-26 16:31:04 -07:00
f2265d4b46 build: upgrade yargs package to 13.1.0 (#29722)
Update yargs, because the old version was transitively (via os-local) depending on a vulnerable version of the mem package: https://app.snyk.io/vuln/npm:mem:20180117

PR Close #29722
2019-04-26 16:29:29 -07:00
d3ac709b99 fix(ivy): @Component should support entry components from another module (#29566)
PR Close #29566
2019-04-26 16:27:19 -07:00
908d43a5bb refactor: use new Http library in playground (#29355)
PR Close #29355
2019-04-26 16:26:31 -07:00
71cdb0a08e refactor(ivy): move di tests for inject to acceptance (#29299)
PR Close #29299
2019-04-26 16:23:44 -07:00
c7fbbdfa99 refactor(ivy): move di tests for flags to acceptance (#29299)
Including tests for `@Optional`, `@Self`, `@SkipSelf` and `@Host`.

PR Close #29299
2019-04-26 16:23:44 -07:00
10e4ab7712 refactor(ivy): move di tests for directive injection to acceptance (#29299)
PR Close #29299
2019-04-26 16:23:44 -07:00
5114c23c21 refactor(ivy): move di tests for DI tokens to acceptance (#29299)
Move tests for special tokens like `Injector`, `ElementRef`, `TemplateRef`, `ViewContainerRef`, `ChangeDectetorRef` and custom string tokens.

PR Close #29299
2019-04-26 16:23:43 -07:00
c3e585d7eb refactor(ivy): move di tests for Attribute to acceptance (#29299)
PR Close #29299
2019-04-26 16:23:43 -07:00
0776daec88 release: cut the v8.0.0-rc.1 release 2019-04-26 13:28:49 -07:00
615e1a58b2 test(ivy): pin deps on hello world size tests (#30152)
We recently had an unexpected size regression in the hello world
tests because the CLI devkit released an RC that regressed us and
the dependencies were not pinned. This change ensures that we only
update dependencies like devkit deliberately, so we do not have
mysterious breakages caused by other packages.

PR Close #30152
2019-04-26 12:34:10 -07:00
606758357e fix(bazel): update peerDep ranges (#30155)
PR Close #30155
2019-04-26 12:32:35 -07:00
ba2a3595c6 fix(ivy): output should not be subscribe twice when 2 listeners (#30144)
PR Close #30144
2019-04-26 11:11:09 -07:00
a50bfe5054 fix(ivy): property bindings use correct indices (#30129)
- Extracts and documents code that will be common to interpolation instructions
- Ensures that binding indices are updated at the proper time during compilation
- Adds additional tests

Related #30011

PR Close #30129
2019-04-26 11:09:51 -07:00
c8983bc367 docs: remove note about ivy being coupled to dynamic import (#30151)
PR Close #30151
2019-04-26 11:08:51 -07:00
8d6d2c6704 build: bazel ts-api-guardian usage fails on workspaces which don't depend on chalk (#30138)
When using the npm package in a workspace which doesn't depend on chalk, ts-api-guardian fails with an error `Error: Cannot find module 'chalk'`

PR Close #30138
2019-04-26 11:08:05 -07:00
6711f22e62 fix(bazel): Exclude common/upgrade* in metadata.tsconfig.json (#30133)
It has a dependency on @angular/upgrade which is not part of the
dependencies in package.json, so postinstall would fail.

PR Close #30133
2019-04-26 11:07:34 -07:00
8dd9192fe3 refactor(ivy): undeprecate inject (#30132)
PR Close #30132
2019-04-26 11:06:42 -07:00
870e0dab48 fix(ivy): remove debug utilities from ivy production builds (#30130)
Prior to this commit, we were pulling DebugNode and DebugElement
into production builds because BrowserModule automatically pulled
in NgProbe and thus getDebugNode. In Ivy, this is not necessary
because Ivy has its own set of debug utilities. We should use these
existing tools instead of NgProbe.

This commit adds an Ivy switch so we do not pull in NgProbe utilities
when running with Ivy. This saves us ~8KB in prod builds.

PR Close #30130
2019-04-26 11:04:48 -07:00
732 changed files with 22703 additions and 72647 deletions

View File

@ -142,6 +142,10 @@ build:remote --remote_instance_name=projects/internal-200822/instances/default_i
# We need to understand the security risks of using prior build artifacts.
build:remote --remote_accept_cached=false
# Load any settings specific to the current user. Needs to be last statement in this
# config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user
###############################
# NodeJS rules settings
# These settings are required for rules_nodejs
@ -150,12 +154,3 @@ build:remote --remote_accept_cached=false
# Turn on managed directories feature in Bazel
# This allows us to avoid installing a second copy of node_modules
common --experimental_allow_incremental_repository_updates
####################################################
# User bazel configuration
# NOTE: This needs to be the *last* entry in the config.
####################################################
# Load any settings which are specific to the current user. Needs to be *last* statement
# in this config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user

42
.buildkite/Dockerfile Normal file
View File

@ -0,0 +1,42 @@
# Heavily based on https://github.com/StefanScherer/dockerfiles-windows/ images.
# Combines the node windowsservercore image with the Bazel Prerequisites (https://docs.bazel.build/versions/master/install-windows.html).
# msys install taken from https://github.com/StefanScherer/dockerfiles-windows/issues/30
# VS redist install taken from https://github.com/StefanScherer/dockerfiles-windows/blob/master/apache/Dockerfile
# The nanoserver image won't work because MSYS2 does not run in it https://github.com/Alexpux/MSYS2-packages/issues/1493
# Before building this image, you must locally build node-windows:10.13.0-windowsservercore-1803.
# Clone https://github.com/StefanScherer/dockerfiles-windows/commit/4ce7101a766b9b880ac262479dd9126b64d656cf and build using
# docker build -t node-windows:10.13.0-windowsservercore-1803 --build-arg core=microsoft/windowsservercore:1803 --build-arg target=microsoft/windowsservercore:1803 .
FROM node-windows:10.13.0-windowsservercore-1803
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install 7zip to extract msys2
RUN Invoke-WebRequest -UseBasicParsing 'https://www.7-zip.org/a/7z1805-x64.exe' -OutFile 7z.exe
# For some reason the last letter in the destination directory is lost. So '/D=C:\\7zip0' will extract to '/D=C:\\7zip'.
RUN Start-Process -FilePath 'C:\\7z.exe' -ArgumentList '/S', '/D=C:\\7zip0' -NoNewWindow -Wait
# Extract msys2
RUN Invoke-WebRequest -UseBasicParsing 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz' -OutFile msys2.tar.xz
RUN Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'e', 'msys2.tar.xz' -Wait
RUN Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'x', 'msys2.tar', '-oC:\\' -Wait
RUN Remove-Item msys2.tar.xz
RUN Remove-Item msys2.tar
RUN Remove-Item 7z.exe
RUN Remove-Item -Recurse 7zip
# Add MSYS2 to PATH, and set BAZEL_SH
RUN [Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\msys64\usr\bin', [System.EnvironmentVariableTarget]::Machine)
RUN [Environment]::SetEnvironmentVariable('BAZEL_SH', 'C:\msys64\usr\bin\bash.exe', [System.EnvironmentVariableTarget]::Machine)
# Install Microsoft Visual C++ Redistributable for Visual Studio 2015
RUN Invoke-WebRequest -UseBasicParsing 'https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe' -OutFile vc_redist.x64.exe
RUN Start-Process 'c:\\vc_redist.x64.exe' -ArgumentList '/Install', '/Passive', '/NoRestart' -NoNewWindow -Wait
RUN Remove-Item vc_redist.x64.exe
# Add a fix for https://github.com/docker/for-win/issues/2920 as entry point to the container.
SHELL ["cmd", "/c"]
COPY "fix-msys64.cmd" "C:\\fix-msys64.cmd"
ENTRYPOINT cmd /C C:\\fix-msys64.cmd && cmd /c
CMD ["cmd.exe"]

96
.buildkite/README.md Normal file
View File

@ -0,0 +1,96 @@
# BuildKite configuration
This folder contains configuration for the [BuildKite](https://buildkite.com) based CI checks for
this repository.
BuildKite is a CI provider that provides build coordination and reports while we provide the
infrastructure.
CI runs are triggered by new PRs and will show up on the GitHub checks interface, along with the
other current CI solutions.
Currently it is only used for tests on Windows platforms.
## The build pipeline
BuildKite uses a pipeline for each repository. The `pipeline.yml` file defines pipeline
[build steps](https://buildkite.com/docs/pipelines/defining-steps) for this repository.
Run results can be seen in the GitHub checks interface and in the
[pipeline dashboard](https://buildkite.com/angular/angular).
Although most configuration is done via `pipeline.yml`, some options are only available
in the online [pipeline settings](https://buildkite.com/angular/angular/settings).
## Infrastructure
BuildKite does not provide the host machines where the builds runs, providing instead the
[BuildKite Agent](https://buildkite.com/docs/agent/v3) that should be run our own infrastructure.
### Agents
This agent polls the BuildKite API for builds, runs them, and reports back the results.
Agents are the unit of concurrency: each agent can run one build at any given time.
Adding agents allows more builds to be ran at the same time.
Individual agents can have tags, and pipeline steps can target only agents with certain tags via the
`agents` field in `pipeline.yml`.
For example: agents on Windows machines are tagged as `windows`, and the Windows specific build
steps list `windows: true` in their `agents` field.
You can see the current agent pool, along with their tags, in the
[agents list](https://buildkite.com/organizations/angular/agents).
### Our host machines
We use [Google Cloud](https://cloud.google.com/) as our cloud provider, under the
[Angular project](https://console.cloud.google.com/home/dashboard?project=internal-200822).
To access this project you need need to be logged in with a Google account that's a member of
team@angular.io.
For googlers this may be your google.com account, for others it is an angular.io account.
In this project we have a number of Windows VMs running, each of them with several agents.
The `provision-windows-buildkite.ps1` file contains instructions on how to create new host VMs that
are fully configured to run the BuildKite agents as services.
Our pipeline uses [docker-buildkite-plugin](https://github.com/buildkite-plugins/docker-buildkite-plugin)
to run build steps inside docker containers.
This way we achieve isolation and hermeticity.
The `Dockerfile` file describes a custom Docker image that includes NodeJs, Yarn, and the Bazel
pre-requisites on Windows.
To upload a new version of the docker image, follow any build instructions in `Dockerfile` and then
run `docker build -t angular/node-bazel-windows:NEW_VERSION`, followed by
`docker push angular/node-bazel-windows:NEW_VERSION`.
After being pushed it should be available online, and you can use the new version in `pipeline.yml`.
## Caretaker
BuildKite status can be found at https://www.buildkitestatus.com/.
Issues related to the BuildKite setup should be escalated to the Tools Team via the current
caretaker, followed by Alex Eagle and Filipe Silva.
Support requests should be submitted via email to support@buildkite.com and cc Igor, Misko, Alex,
Jeremy and Manu
## Rollout strategy
At the moment our BuildKite CI uses 1 host VM running 4 agents, thus being capable of 4 concurrent
builds.
The only test running is `bazel test //tools/ts-api-guardian:all`, and the PR check is not
mandatory.
In the future we should add cache support to speed up the initial `yarn` install, and also Bazel
remote caching to speed up Bazel builds.
After the current setup is verified as stable and reliable the GitHub PR check can become mandatory.
The tests ran should also be expanded to cover most, if not all, of the Bazel tests.

View File

@ -0,0 +1,6 @@
@echo off
REM Fix for https://github.com/docker/for-win/issues/2920
REM echo "Fixing msys64 folder..."
REM Touch all .dll files inside C:\msys64\
forfiles /p C:\msys64\ /s /m *.dll /c "cmd /c Copy /B @path+,, >NUL"
REM echo "Fixed msys64 folder."

10
.buildkite/pipeline.yml Normal file
View File

@ -0,0 +1,10 @@
steps:
- label: windows-test
commands:
- "yarn install --frozen-lockfile --non-interactive --network-timeout 100000"
- "yarn bazel test //tools/ts-api-guardian:all --noshow_progress"
plugins:
- docker#v2.1.0:
image: "filipesilva/node-bazel-windows:0.0.2"
agents:
windows: true

View File

@ -0,0 +1,94 @@
# PowerShell script to provision a Windows Server with BuildKite
# This script follows https://buildkite.com/docs/agent/v3/windows.
# Instructions
# VM creation:
# In Google Cloud Platform, create a Compute Engine instance.
# We recommend machine type n1-standard-16 (16 vCPUs, 60 GB memory).
# Use a recent windows boot disk with container support such as
# "Windows Server version 1803 Datacenter Core for Containers", and add a 128GB SSD disk.
# Give it a name, then click "Create".
# VM setup:
# In the Compute Engine menu, select "VM Instances". Click on the VM name you chose before.
# Click "Set Windows Password" to choose a username and password.
# Click RDP to open a remote desktop via browser, using the username and password.
# In the Windows command prompt start an elevated powershell by inputing
# "powershell -Command "Start-Process PowerShell -Verb RunAs" followed by Enter.
# Download and execute this script from GitHub, passing the token (mandatory), tags (optional)
# and number of agents (optional) as args:
# ```
# Invoke-WebRequest -Uri https://raw.githubusercontent.com/angular/angular/master/.buildkite/provision-windows-buildkite.ps1 -OutFile provision.ps1
# .\provision.ps1 -token "MY_TOKEN" -tags "windows=true,another_tag=true" -agents 4
# ```
# The VM should restart and be fully configured.
# Creating extra VMs
# You can create an image of the current VM by following the instructions below.
# https://cloud.google.com/compute/docs/instances/windows/creating-windows-os-image
# Then create a new VM and choose "Custom images".
# Script proper.
# Get the token and tags from arguments.
param (
[Parameter(Mandatory=$true)][string]$token,
[string]$tags = "",
[Int]$agents = 1
)
# Allow HTTPS
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
# Helper to add to PATH.
# Will take current PATH so avoid running it after anything to modifies only the powershell session path.
function Add-Path ([string]$newPathItem) {
$Env:Path+= ";" + $newPathItem + ";"
[Environment]::SetEnvironmentVariable("Path",$env:Path, [System.EnvironmentVariableTarget]::Machine)
}
# Install Git for Windows
Write-Host "Installing Git for Windows."
Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe -OutFile git.exe
.\git.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh" /DIR="C:\git"
Add-Path "C:\git\bin"
# Sleep for 15s while git is installed. Trying to remove the git.exe before it finishes install causes an error.
Start-Sleep -s 15
Remove-Item git.exe
# Download NSSM (https://nssm.cc/) to run the BuildKite agent as a service.
Write-Host "Downloading NSSM."
Invoke-WebRequest -Uri https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip -OutFile nssm.zip
Expand-Archive -Path nssm.zip -DestinationPath C:\nssm
Add-Path "C:\nssm\nssm-2.24-101-g897c7ad\win64"
Remove-Item nssm.zip
# Run the BuildKite agent install script
Write-Host "Installing BuildKite agent."
$env:buildkiteAgentToken = $token
$env:buildkiteAgentTags = $tags
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/buildkite/agent/master/install.ps1'))
# Configure the BuildKite agent clone and timestamp behavior
Add-Content C:\buildkite-agent\buildkite-agent.cfg "`ngit-clone-flags=--config core.autocrlf=input --config core.eol=lf --config core.longpaths=true --config core.symlinks=true`n"
Add-Content C:\buildkite-agent\buildkite-agent.cfg "`ntimestamp-lines=true`n"
# Register the BuildKite agent service using NSSM, so that it persists through restarts and is
# restarted if the process dies.
for ($i=1; $i -le $agents; $i++)
{
$agentName = "buildkite-agent-$i"
Write-Host "Registering $agentName as a service."
nssm.exe install $agentName "C:\buildkite-agent\bin\buildkite-agent.exe" "start"
nssm.exe set $agentName AppStdout "C:\buildkite-agent\$agentName.log"
nssm.exe set $agentName AppStderr "C:\buildkite-agent\$agentName.log"
nssm.exe status $agentName
nssm.exe start $agentName
nssm.exe status $agentName
}
# Restart the machine.
Restart-Computer

View File

@ -175,13 +175,6 @@ jobs:
# Setup remote execution and run RBE-compatible tests.
- *setup_bazel_remote_execution
- run: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
- run: mkdir ~/testlogs
- run: cp -Lr dist/testlogs/* ~/testlogs
- store_test_results:
# Bazel always writes test.xml files under this directory
path: ~/testlogs
- store_artifacts:
path: ~/testlogs
# Temporary job to test what will happen when we flip the Ivy flag to true
test_ivy_aot:
@ -300,7 +293,8 @@ jobs:
# Run PWA-score tests
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Check the bundle sizes.
- run: yarn --cwd aio payload-size aio-local
# Temporary disabled due to a problem with patch branch (8.0.x)
# - run: yarn --cwd aio payload-size aio-local
test_aio_local_ivy:
<<: *job_defaults
@ -319,7 +313,8 @@ jobs:
# Run PWA-score tests
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Check the bundle sizes.
- run: yarn --cwd aio payload-size aio-local-ivy
# Temporary disabled due to a problem with patch branch (8.0.x)
# - run: yarn --cwd aio payload-size aio-local-ivy
test_aio_tools:
<<: *job_defaults
@ -374,7 +369,7 @@ jobs:
# Run examples tests with ivy. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
# Since the parallelism is set to "3", there will be three parallel CircleCI containers
# with either "0", "1" or "2" as node index. This can be passed to the "--shard" argument.
- run: yarn --cwd aio example-e2e --setup --local --ivy --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
- run: yarn --cwd aio example-e2e --setup --local --ivy --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
aio_preview:
@ -641,17 +636,6 @@ jobs:
name: "Running Material unit tests"
command: ./scripts/ci/run_angular_material_unit_tests.sh
test_zonejs:
<<: *job_defaults
steps:
- *attach_workspace
- *init_environment
# Install
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
# Run zone.js tools tests
- run: yarn --cwd packages/zone.js promisetest
- run: yarn --cwd packages/zone.js promisefinallytest
workflows:
version: 2
default_workflow:
@ -736,9 +720,6 @@ workflows:
- material-unit-tests:
requires:
- build-ivy-npm-packages
- test_zonejs:
requires:
- setup
saucelabs_tests:
jobs:

View File

@ -1,5 +1,3 @@
# escape=`
ARG core=mcr.microsoft.com/windows/servercore:1809
ARG target=mcr.microsoft.com/powershell:windowsservercore-1809
@ -12,57 +10,57 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV GPG_VERSION 2.3.4
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; `
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
RUN @( `
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', `
'FD3A5288F042B6850C66B31F09FE44734EB7990E', `
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', `
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', `
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', `
'B9AE9905FFD7803F25714661B63B535A4C206CA9', `
'77984A986EBC2AA786BC0F66B01FBB92821C587A', `
'8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600', `
'4ED778F539E3634C779C87C6D7062848A1AB005C', `
'A48C2BEE680E841632CD4E44F07496B3EB3C1762', `
'B9E2F5981AA6E0CD28160D9FF13993A75599653C' `
) | foreach { `
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; `
RUN @( \
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
'77984A986EBC2AA786BC0F66B01FBB92821C587A', \
'8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600', \
'4ED778F539E3634C779C87C6D7062848A1AB005C', \
'A48C2BEE680E841632CD4E44F07496B3EB3C1762', \
'B9E2F5981AA6E0CD28160D9FF13993A75599653C' \
) | foreach { \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
}
ENV NODE_VERSION=$node_version
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; `
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; `
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; `
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; `
Expand-Archive node.zip -DestinationPath C:\ ; `
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
ENV YARN_VERSION=$yarn_version
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; `
$sig = Get-AuthenticodeSignature yarn.msi ; `
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; `
Write-Output $sig.SignerCertificate.Thumbprint ; `
if (@( `
'7E253367F8A102A91D04829E37F3410F14B68A5F', `
'AF764E1EA56C762617BDC757C8B0F3780A0CF5F9' `
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; `
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
$sig = Get-AuthenticodeSignature yarn.msi ; \
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
Write-Output $sig.SignerCertificate.Thumbprint ; \
if (@( \
'7E253367F8A102A91D04829E37F3410F14B68A5F', \
'AF764E1EA56C762617BDC757C8B0F3780A0CF5F9' \
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
ENV GIT_VERSION 2.20.1
ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/MinGit-${GIT_VERSION}-busybox-64-bit.zip
ENV GIT_SHA256 9817ab455d9cbd0b09d8664b4afbe4bbf78d18b556b3541d09238501a749486c
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest -UseBasicParsing $env:GIT_DOWNLOAD_URL -OutFile git.zip; `
if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_SHA256) {exit 1} ; `
Expand-Archive git.zip -DestinationPath C:\git; `
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
Invoke-WebRequest -UseBasicParsing $env:GIT_DOWNLOAD_URL -OutFile git.zip; \
if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_SHA256) {exit 1} ; \
Expand-Archive git.zip -DestinationPath C:\git; \
Remove-Item git.zip
FROM $target as baseimage
@ -76,45 +74,30 @@ COPY --from=download /git /git
ARG SETX=/M
RUN setx %SETX% PATH "%PATH%;C:\nodejs;C:\yarn\bin;C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin"
CMD [ "node.exe" ]
CMD [ "node.exe" ]
FROM baseimage
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Invoke-WebRequest -UseBasicParsing 'https://www.7-zip.org/a/7z1805-x64.exe' -OutFile 7z.exe; `
Start-Process -FilePath 'C:\\7z.exe' -ArgumentList '/S', '/D=C:\\7zip0' -NoNewWindow -Wait; `
Invoke-WebRequest -UseBasicParsing 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz' -OutFile msys2.tar.xz; `
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'e', 'msys2.tar.xz' -Wait; `
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'x', 'msys2.tar', '-oC:\\' -Wait; `
Remove-Item msys2.tar.xz; `
Remove-Item msys2.tar; `
Remove-Item 7z.exe; `
Remove-Item -Recurse 7zip; `
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\msys64\usr\bin', [System.EnvironmentVariableTarget]::Machine); `
[Environment]::SetEnvironmentVariable('BAZEL_SH', 'C:\msys64\usr\bin\bash.exe', [System.EnvironmentVariableTarget]::Machine)
RUN Invoke-WebRequest -UseBasicParsing 'https://www.7-zip.org/a/7z1805-x64.exe' -OutFile 7z.exe; \
Start-Process -FilePath 'C:\\7z.exe' -ArgumentList '/S', '/D=C:\\7zip0' -NoNewWindow -Wait; \
Invoke-WebRequest -UseBasicParsing 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz' -OutFile msys2.tar.xz; \
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'e', 'msys2.tar.xz' -Wait; \
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'x', 'msys2.tar', '-oC:\\' -Wait; \
Remove-Item msys2.tar.xz; \
Remove-Item msys2.tar; \
Remove-Item 7z.exe; \
Remove-Item -Recurse 7zip; \
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\msys64\usr\bin', [System.EnvironmentVariableTarget]::Machine); \
[Environment]::SetEnvironmentVariable('BAZEL_SH', 'C:\msys64\usr\bin\bash.exe', [System.EnvironmentVariableTarget]::Machine); \
Invoke-WebRequest -UseBasicParsing 'https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe' -OutFile vc_redist.x64.exe; \
Start-Process 'c:\\vc_redist.x64.exe' -ArgumentList '/Install', '/Passive', '/NoRestart' -NoNewWindow -Wait; \
Remove-Item vc_redist.x64.exe
# Install VS Build Tools
RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.com/download/pr/df649173-11e9-4af2-8eb7-0eb02ba8958a/cadb5bdac41e55bb8f6a6b7c45273370/vs_buildtools.exe -OutFile vs_BuildTools.exe; `
# Installer won't detect DOTNET_SKIP_FIRST_TIME_EXPERIENCE if ENV is used, must use setx /M
setx /M DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1; `
Start-Process vs_BuildTools.exe `
-ArgumentList `
'--add', 'Microsoft.VisualStudio.Workload.VCTools', `
'--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', `
'--add', 'Microsoft.Component.VC.Runtime.UCRTSDK', `
'--add', 'Microsoft.VisualStudio.Component.Windows10SDK.17763', `
'--quiet', '--norestart', '--nocache' `
-NoNewWindow -Wait; `
Remove-Item -Force vs_buildtools.exe; `
Remove-Item -Force -Recurse \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\"; `
Remove-Item -Force -Recurse ${Env:TEMP}\*; `
Remove-Item -Force -Recurse \"${Env:ProgramData}\Package Cache\"; `
[Environment]::SetEnvironmentVariable('BAZEL_VC', \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\VC\", [System.EnvironmentVariableTarget]::Machine)
# Add a fix for https://github.com/docker/for-win/issues/2920 as entry point to the container.
SHELL ["cmd", "/c"]
COPY "fix-msys64.cmd" "C:\\fix-msys64.cmd"
ENTRYPOINT cmd /C C:\\fix-msys64.cmd && cmd /c
# Install Python
RUN Invoke-WebRequest -UseBasicParsing https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe -OutFile python-3.5.1.exe; `
Start-Process python-3.5.1.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait; `
Remove-Item -Force python-3.5.1.exe
CMD ["cmd.exe"]
CMD ["cmd.exe"]

View File

@ -2,17 +2,11 @@
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
# See documentation in /docs/BAZEL.md
# Save built files and downloaded repositories in a location that can be cached by CodeFresh and
# shared between builds. This helps speed up the analysis time significantly with Bazel managed node
# dependencies on the CI.
# Save downloaded repositories in a location that can be cached by CodeFresh and shared between
# builds. This helps speed up the analysis time significantly with Bazel managed node dependencies
# on the CI.
# https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines/#caching-the-artifacts-of-your-build-system
build --repository_cache=C:/codefresh/volume/bazel_repository_cache
# Setting the output_base to a Docker volume is currently broken because of a Docker bug on Windows:
# https://github.com/moby/moby/issues/37024
# This affects Bazel because bazel_output_base\external\bazel_tools is an absolute path junction.
# When its fixed we can uncomment this line, and use a different output_base for Ivy tests (they
# use a separate compiler and destructively replace the cache).
# startup --output_base=C:/codefresh/volume/bazel_output_base
# Don't be spammy in the logs
# TODO(gmagolan): Hide progress again once build performance improves
@ -29,10 +23,20 @@ build --announce_rc
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
# Limit Bazel to consuming resources that fit in CodeFresh VMs
# TODO(filipesilva): determine the correct memory limit
build --local_resources=10240,8.0,1.0
build --local_resources=8000,8.0,1.0
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
test --flaky_test_attempts=2
# More details on failures
build --verbose_failures=true
# Include PATH in Windows build/tests
# https://github.com/bazelbuild/rules_typescript/pull/356
build --action_env=PATH
test --action_env=PATH --test_env=PATH
# Exclude tests known to not work on Windows.
# Chrome web tests are currently broken.
test --test_tag_filters=-browser:chromium-local

View File

@ -2,7 +2,6 @@ version: '1.0'
steps:
BuildImage:
title: Build Docker image
type: build
image_name: node-bazel-windows
working_directory: ./.codefresh
@ -13,7 +12,7 @@ steps:
dockerfile: ./Dockerfile.win-1809
RunTests:
title: Run Bazel tests
title: Run Example
image: ${{BuildImage}}
commands:
# Install dependencies
@ -21,8 +20,7 @@ steps:
# Add Bazel CI config
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
# Run tests
# At the moment 'browser:chromium-local' are broken in CI while locally they work
# VE
- yarn bazel test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-browser:chromium-local //...
# Ivy
- yarn bazel test --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local //...
- yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test //packages/compiler/test //packages/compiler-cli/test:ngc //packages/compiler-cli/test/ngtsc:ngtsc
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
- yarn bazel test //tools/public_api_guard/...
- yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance

View File

@ -0,0 +1,6 @@
@echo off
REM Fix for https://github.com/docker/for-win/issues/2920
REM echo "Fixing msys64 folder..."
REM Touch all .dll files inside C:\msys64\
forfiles /p C:\msys64\ /s /m *.dll /c "cmd /c Copy /B @path+,, >NUL"
REM echo "Fixed msys64 folder."

View File

@ -74,7 +74,6 @@ karma_web_test(
"//packages/core/test:test_lib",
"//packages/forms/test:test_lib",
"//packages/http/test:test_lib",
"//packages/zone.js/test:karma_jasmine_test_ci",
# "//packages/router/test:test_lib",
# //packages/router/test:test_lib fails with:
# IE 11.0.0 (Windows 8.1.0.0) bootstrap should restore the scrolling position FAILED

View File

@ -1,15 +1,3 @@
<a name="8.1.0-next.3"></a>
# [8.1.0-next.3](https://github.com/angular/angular/compare/8.1.0-next.2...8.1.0-next.3) (2019-06-19)
### Bug Fixes
* **bazel:** builder workspace should use nodejs v10.16.0 ([#31088](https://github.com/angular/angular/issues/31088)) ([a1fc4de](https://github.com/angular/angular/commit/a1fc4de))
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBedStatic.get overload ([#30714](https://github.com/angular/angular/issues/30714)) ([6bc9c78](https://github.com/angular/angular/commit/6bc9c78)), closes [#30514](https://github.com/angular/angular/issues/30514)
* **language-service:** Remove 'any' in getQuickInfoAtPosition ([#31014](https://github.com/angular/angular/issues/31014)) ([a4601ec](https://github.com/angular/angular/commit/a4601ec))
<a name="8.0.2"></a>
## [8.0.2](https://github.com/angular/angular/compare/8.0.1...8.0.2) (2019-06-19)
@ -22,20 +10,6 @@
<a name="8.1.0-next.2"></a>
# [8.1.0-next.2](https://github.com/angular/angular/compare/8.1.0-next.1...8.1.0-next.2) (2019-06-13)
### Bug Fixes
* **bazel:** do not modify tsconfig.json ([#30877](https://github.com/angular/angular/issues/30877)) ([b086676](https://github.com/angular/angular/commit/b086676))
* **bazel:** exclude components schematics from build ([#30825](https://github.com/angular/angular/issues/30825)) ([05a43ca](https://github.com/angular/angular/commit/05a43ca))
* **bazel:** Load global stylesheet in dev and prod ([#30879](https://github.com/angular/angular/issues/30879)) ([17bfedd](https://github.com/angular/angular/commit/17bfedd))
* **common:** expose the `HttpUploadProgressEvent` interface as public API ([#30852](https://github.com/angular/angular/issues/30852)) ([5c18f23](https://github.com/angular/angular/commit/5c18f23)), closes [#30814](https://github.com/angular/angular/issues/30814)
* **service-worker:** avoid uncaught rejection warning when registration fails ([#30876](https://github.com/angular/angular/issues/30876)) ([81c2a94](https://github.com/angular/angular/commit/81c2a94))
<a name="8.0.1"></a>
## [8.0.1](https://github.com/angular/angular/compare/8.0.0...8.0.1) (2019-06-13)
@ -50,83 +24,24 @@
<a name="8.1.0-next.1"></a>
# [8.1.0-next.1](https://github.com/angular/angular/compare/8.1.0-beta.0...8.1.0-next.1) (2019-06-05)
### Bug Fixes
* **core:** TypeScript related migrations should cater for BOM ([#30719](https://github.com/angular/angular/issues/30719)) ([80394ce](https://github.com/angular/angular/commit/80394ce)), closes [/github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72](https://github.com//github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts/issues/L72) [#30713](https://github.com/angular/angular/issues/30713)
<a name="8.1.0-beta.0"></a>
# [8.1.0-beta.0](https://github.com/angular/angular/compare/8.0.0...8.1.0-beta.0) (2019-05-30)
### Bug Fixes
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([3125376](https://github.com/angular/angular/commit/3125376))
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([1353bf0](https://github.com/angular/angular/commit/1353bf0))
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([2a0f497](https://github.com/angular/angular/commit/2a0f497))
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([b6b1aec](https://github.com/angular/angular/commit/b6b1aec))
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([1f4c380](https://github.com/angular/angular/commit/1f4c380))
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([e688e02](https://github.com/angular/angular/commit/e688e02))
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([3aff79c](https://github.com/angular/angular/commit/3aff79c)), closes [#29785](https://github.com/angular/angular/issues/29785)
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([4ae0ee8](https://github.com/angular/angular/commit/4ae0ee8))
* **bazel:** Use existing npm/yarn lock files ([#30438](https://github.com/angular/angular/issues/30438)) ([ff29ccc](https://github.com/angular/angular/commit/ff29ccc))
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([60a8888](https://github.com/angular/angular/commit/60a8888))
* **core:** consistently use ng:/// for sourcemap URLs ([#29826](https://github.com/angular/angular/issues/29826)) ([392473e](https://github.com/angular/angular/commit/392473e))
* **core:** CSS sanitizer now allows parens in file names ([#30322](https://github.com/angular/angular/issues/30322)) ([728db88](https://github.com/angular/angular/commit/728db88))
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([30d1f29](https://github.com/angular/angular/commit/30d1f29))
* **core:** migrations not always migrating all files ([#30269](https://github.com/angular/angular/issues/30269)) ([349935a](https://github.com/angular/angular/commit/349935a))
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([a96976e](https://github.com/angular/angular/commit/a96976e))
* **core:** require 'static' flag on queries in typings ([#30639](https://github.com/angular/angular/issues/30639)) ([84dd267](https://github.com/angular/angular/commit/84dd267))
* **core:** static-query migration errors not printed properly ([#30458](https://github.com/angular/angular/issues/30458)) ([6ceb903](https://github.com/angular/angular/commit/6ceb903))
* **core:** static-query migration fails with default parameter values ([#30269](https://github.com/angular/angular/issues/30269)) ([6357d4a](https://github.com/angular/angular/commit/6357d4a))
* **core:** static-query migration should gracefully exit if AOT compiler throws ([#30269](https://github.com/angular/angular/issues/30269)) ([509352f](https://github.com/angular/angular/commit/509352f))
* **core:** static-query migration should handle queries on accessors ([#30327](https://github.com/angular/angular/issues/30327)) ([0ffdb48](https://github.com/angular/angular/commit/0ffdb48))
* **core:** static-query migration should not fallback to test strategy ([#30458](https://github.com/angular/angular/issues/30458)) ([0cdf598](https://github.com/angular/angular/commit/0cdf598))
* **core:** static-query migration should not prompt if no queries are used ([#30254](https://github.com/angular/angular/issues/30254)) ([4c12d74](https://github.com/angular/angular/commit/4c12d74))
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([8d3365e](https://github.com/angular/angular/commit/8d3365e))
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([f6bf892](https://github.com/angular/angular/commit/f6bf892)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
* **language-service:** Remove tsserverlibrary from rollup globals ([#30123](https://github.com/angular/angular/issues/30123)) ([124e497](https://github.com/angular/angular/commit/124e497))
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([b40f6f3](https://github.com/angular/angular/commit/b40f6f3))
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([0fd9d08](https://github.com/angular/angular/commit/0fd9d08)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
* **router:** fix a problem with router not responding to back button ([#30160](https://github.com/angular/angular/issues/30160)) ([3327bd8](https://github.com/angular/angular/commit/3327bd8))
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([197584d](https://github.com/angular/angular/commit/197584d))
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([53f3564](https://github.com/angular/angular/commit/53f3564))
### Features
* **bazel:** use `rbe_autoconfig()` and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([9abf114](https://github.com/angular/angular/commit/9abf114))
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([1aff524](https://github.com/angular/angular/commit/1aff524))
* **common:** stricter types for `SlicePipe` ([#30156](https://github.com/angular/angular/issues/30156)) ([95830ee](https://github.com/angular/angular/commit/95830ee))
* **core:** deprecate integration with the Web Tracing Framework (WTF) ([#30642](https://github.com/angular/angular/issues/30642)) ([f310a59](https://github.com/angular/angular/commit/f310a59))
* **language-service:** Implement `definitionAndBoundSpan` ([#30125](https://github.com/angular/angular/issues/30125)) ([f491673](https://github.com/angular/angular/commit/f491673))
* **platform-webworker:** deprecate platform-webworker ([#30642](https://github.com/angular/angular/issues/30642)) ([ccc76f7](https://github.com/angular/angular/commit/ccc76f7))
<a name="8.0.0"></a>
# [8.0.0](https://github.com/angular/angular/compare/8.0.0-rc.5...8.0.0) (2019-05-28)
### Features
* add support for TypeScript 3.4 (and drop older versions) ([#29372](https://github.com/angular/angular/issues/29372)) ([ef85336](https://github.com/angular/angular/commit/ef85336))
* add support for TypeScript 3.3 (and drop older versions) ([#29004](https://github.com/angular/angular/issues/29004)) ([75748d6](https://github.com/angular/angular/commit/75748d6))
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([8022d36](https://github.com/angular/angular/commit/8022d36))
* **common:** stricter types for `SlicePipe` ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
* **bazel:** use `rbe_autoconfig()` and new container ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
* **common:** add @angular/common/upgrade package for `$location`-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
* **common:** add ability to retrieve the state from `Location` service ([#30055](https://github.com/angular/angular/issues/30055)) ([b44b143](https://github.com/angular/angular/commit/b44b143))
* **common:** stricter types for SlicePipe ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
* **bazel:** use rbe_autoconfig() and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
* **common:** add [@angular](https://github.com/angular)/common/upgrade package for $location-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
* **common:** add ability to retrieve the state from Location service ([#30055](https://github.com/angular/angular/issues/30055)) ([b44b143](https://github.com/angular/angular/commit/b44b143))
* **common:** add ability to track all location changes ([#30055](https://github.com/angular/angular/issues/30055)) ([3a9cf3f](https://github.com/angular/angular/commit/3a9cf3f))
* **common:** add APIs to read component pieces of URL ([#30055](https://github.com/angular/angular/issues/30055)) ([b635fe8](https://github.com/angular/angular/commit/b635fe8))
* **common:** add `MockPlatformLocation` to enable more robust testing of `Location` services ([#30055](https://github.com/angular/angular/issues/30055)) ([d0672c2](https://github.com/angular/angular/commit/d0672c2))
* **common:** add `UrlCodec` type for use with upgrade applications ([#30055](https://github.com/angular/angular/issues/30055)) ([ec455e1](https://github.com/angular/angular/commit/ec455e1))
* **common:** add MockPlatformLocation to enable more robust testing of Location services ([#30055](https://github.com/angular/angular/issues/30055)) ([d0672c2](https://github.com/angular/angular/commit/d0672c2))
* **common:** add UrlCodec type for use with upgrade applications ([#30055](https://github.com/angular/angular/issues/30055)) ([ec455e1](https://github.com/angular/angular/commit/ec455e1))
* **common:** provide replacement for AngularJS $location service ([#30055](https://github.com/angular/angular/issues/30055)) ([4277600](https://github.com/angular/angular/commit/4277600))
* remove deprecated `DOCUMENT` token from platform-browser ([#28117](https://github.com/angular/angular/issues/28117)) ([3a9d247](https://github.com/angular/angular/commit/3a9d247))
* remove deprecated DOCUMENT token from platform-browser ([#28117](https://github.com/angular/angular/issues/28117)) ([3a9d247](https://github.com/angular/angular/commit/3a9d247))
* **compiler:** support skipping leading trivia in template source-maps ([#30095](https://github.com/angular/angular/issues/30095)) ([304a12f](https://github.com/angular/angular/commit/304a12f))
* **core:** add missing ARIA attributes to html sanitizer ([#29685](https://github.com/angular/angular/issues/29685)) ([909557d](https://github.com/angular/angular/commit/909557d)), closes [#26815](https://github.com/angular/angular/issues/26815)
* **router:** deprecate loadChildren:string ([#30073](https://github.com/angular/angular/issues/30073)) ([c61df39](https://github.com/angular/angular/commit/c61df39))
@ -135,28 +50,28 @@
* **service-worker:** support bypassing SW with specific header/query param ([#30010](https://github.com/angular/angular/issues/30010)) ([6200732](https://github.com/angular/angular/commit/6200732)), closes [#21191](https://github.com/angular/angular/issues/21191)
* **compiler-cli:** export tooling definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e1f51ea](https://github.com/angular/angular/commit/e1f51ea))
* **compiler-cli:** lower some exported expressions ([#30038](https://github.com/angular/angular/issues/30038)) ([8e73f9b](https://github.com/angular/angular/commit/8e73f9b))
* **core:** add schematics to move deprecated `DOCUMENT` import ([#29950](https://github.com/angular/angular/issues/29950)) ([645e305](https://github.com/angular/angular/commit/645e305))
* **core:** add schematics to move deprecated DOCUMENT import ([#29950](https://github.com/angular/angular/issues/29950)) ([645e305](https://github.com/angular/angular/commit/645e305))
* **bazel:** update the build to use the new architect api ([#29720](https://github.com/angular/angular/issues/29720)) ([902a53a](https://github.com/angular/angular/commit/902a53a))
* remove @angular/http dependency from @angular/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
* remove [@angular](https://github.com/angular)/http dependency from [@angular](https://github.com/angular)/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
* **compiler-cli:** ngcc - make logging more configurable ([#29591](https://github.com/angular/angular/issues/29591)) ([8d3d75e](https://github.com/angular/angular/commit/8d3d75e))
* **core:** Add `AbstractType<T>` interface ([#29295](https://github.com/angular/angular/issues/29295)) ([afd4a4e](https://github.com/angular/angular/commit/afd4a4e)), closes [#26491](https://github.com/angular/angular/issues/26491)
* **core:** Add "AbstractType<T>" interface ([#29295](https://github.com/angular/angular/issues/29295)) ([afd4a4e](https://github.com/angular/angular/commit/afd4a4e)), closes [#26491](https://github.com/angular/angular/issues/26491)
* **core:** template-var-assignment update schematic ([#29608](https://github.com/angular/angular/issues/29608)) ([7c8f4e3](https://github.com/angular/angular/commit/7c8f4e3))
* **bazel:** Upgrade rules_nodejs and rules_sass ([#29388](https://github.com/angular/angular/issues/29388)) ([d6d081e](https://github.com/angular/angular/commit/d6d081e))
* **service-worker:** support multiple apps on different subpaths of a domain ([#27080](https://github.com/angular/angular/issues/27080)) ([e721c08](https://github.com/angular/angular/commit/e721c08)), closes [#21388](https://github.com/angular/angular/issues/21388)
* **bazel:** Eject Bazel ([#29167](https://github.com/angular/angular/issues/29167)) ([36a1550](https://github.com/angular/angular/commit/36a1550))
* **bazel:** Hide Bazel files in Bazel builder ([#29110](https://github.com/angular/angular/issues/29110)) ([7060d90](https://github.com/angular/angular/commit/7060d90))
* **forms:** clear (remove all) components from a FormArray ([#28918](https://github.com/angular/angular/issues/28918)) ([a68b1a1](https://github.com/angular/angular/commit/a68b1a1)), closes [#18531](https://github.com/angular/angular/issues/18531)
* **platform-server:** wait on returned `BEFORE_APP_SERIALIZED` promises ([#29120](https://github.com/angular/angular/issues/29120)) ([7102ea8](https://github.com/angular/angular/commit/7102ea8))
* **platform-server:** wait on returned BEFORE_APP_SERIALIZED promises ([#29120](https://github.com/angular/angular/issues/29120)) ([7102ea8](https://github.com/angular/angular/commit/7102ea8))
### Bug Fixes
* **bazel:** allow `ts_library` interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([3de26a8](https://github.com/angular/angular/commit/3de26a8))
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([8bc4da8](https://github.com/angular/angular/commit/8bc4da8))
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([5a46f94](https://github.com/angular/angular/commit/5a46f94))
* **core:** require 'static' flag on queries in typings ([#30641](https://github.com/angular/angular/issues/30641)) ([c8af830](https://github.com/angular/angular/commit/c8af830))
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a `TextBed.get` overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([32daa93](https://github.com/angular/angular/commit/32daa93))
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([d1fcc2b](https://github.com/angular/angular/commit/d1fcc2b))
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([71eba45](https://github.com/angular/angular/commit/71eba45)), closes [#29785](https://github.com/angular/angular/issues/29785)
@ -172,7 +87,7 @@
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([e295c6a](https://github.com/angular/angular/commit/e295c6a))
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([9b88920](https://github.com/angular/angular/commit/9b88920)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([c383491](https://github.com/angular/angular/commit/c383491))
* **bazel:** Bump ibazel to 0.10.1 for Windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([548b003](https://github.com/angular/angular/commit/548b003))
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([3fe3a84](https://github.com/angular/angular/commit/3fe3a84))
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([9720227](https://github.com/angular/angular/commit/9720227))
@ -182,54 +97,57 @@
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([6711f22](https://github.com/angular/angular/commit/6711f22))
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([6067583](https://github.com/angular/angular/commit/6067583))
* **bazel:** make name param in ng add optional ([#30074](https://github.com/angular/angular/issues/30074)) ([0b5f480](https://github.com/angular/angular/commit/0b5f480))
* **bazel:** Make sure only single copy of @angular/bazel is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
* **bazel:** Make sure only single copy of `[@angular](https://github.com/angular)/bazel` is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
* **bazel:** transitive npm deps in ng_module ([#30065](https://github.com/angular/angular/issues/30065)) ([61365a9](https://github.com/angular/angular/commit/61365a9))
* **common:** add upgrade sub-package to `ng_package` rule for @angular/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
* **common:** adjust `MockPlatformLocation` to set state to new object ([#30055](https://github.com/angular/angular/issues/30055)) ([825efa8](https://github.com/angular/angular/commit/825efa8))
* **common:** add upgrade sub-package to ng_package rule for [@angular](https://github.com/angular)/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
* **common:** adjust MockPlatformLocation to set state to new object ([#30055](https://github.com/angular/angular/issues/30055)) ([825efa8](https://github.com/angular/angular/commit/825efa8))
* **compiler:** Fix compiler crash due to isSkipSelf of null ([#30075](https://github.com/angular/angular/issues/30075)) ([28fd5ab](https://github.com/angular/angular/commit/28fd5ab))
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([0ddf2e7](https://github.com/angular/angular/commit/0ddf2e7)), closes [#24680](https://github.com/angular/angular/issues/24680) [/github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12](https://github.com//github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts/issues/L12) [#24680](https://github.com/angular/angular/issues/24680)
* **bazel:** do not typecheck core schematic files ([#29876](https://github.com/angular/angular/issues/29876)) ([2ba799d](https://github.com/angular/angular/commit/2ba799d))
* **bazel:** restore `ng build --prod` ([#30005](https://github.com/angular/angular/issues/30005)) ([96a8289](https://github.com/angular/angular/commit/96a8289))
* **common:** prevent repeated application of `HttpParams` mutations ([#29045](https://github.com/angular/angular/issues/29045)) ([8e8e89a](https://github.com/angular/angular/commit/8e8e89a)), closes [#20430](https://github.com/angular/angular/issues/20430)
* **common:** async pipe will properly check when it receives an NaN value from an observable ([#22305](https://github.com/angular/angular/issues/22305)) ([3f6bf6d](https://github.com/angular/angular/commit/3f6bf6d)), closes [#15721](https://github.com/angular/angular/issues/15721)
* **core:** don't include a local `EventListener` in typings ([#29809](https://github.com/angular/angular/issues/29809)) ([4bde40f](https://github.com/angular/angular/commit/4bde40f)), closes [#29806](https://github.com/angular/angular/issues/29806)
* **core:** use shakeable global definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e5905bb](https://github.com/angular/angular/commit/e5905bb))
* **bazel:** restore ng build --prod ([#30005](https://github.com/angular/angular/issues/30005)) ([96a8289](https://github.com/angular/angular/commit/96a8289))
* **common:** prevent repeated application of HttpParams mutations ([#29045](https://github.com/angular/angular/issues/29045)) ([8e8e89a](https://github.com/angular/angular/commit/8e8e89a)), closes [#20430](https://github.com/angular/angular/issues/20430)
* **common:** async pipe will properly check when it recieves an NaN value from an observable ([#22305](https://github.com/angular/angular/issues/22305)) ([3f6bf6d](https://github.com/angular/angular/commit/3f6bf6d)), closes [#15721](https://github.com/angular/angular/issues/15721)
* **core:** don't include a local `EventListener` in typings ([#29809](https://github.com/angular/angular/issues/29809)) ([4bde40f](https://github.com/angular/angular/commit/4bde40f)), closes [/github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts#L32](https://github.com//github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts/issues/L32) [#29806](https://github.com/angular/angular/issues/29806)
* **core:** use shakeable global definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e5905bb](https://github.com/angular/angular/commit/e5905bb)), closes [/github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L279-L282](https://github.com//github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts/issues/L279-L282)
* **language-service:** Use proper types instead of any ([#29942](https://github.com/angular/angular/issues/29942)) ([1a56cd5](https://github.com/angular/angular/commit/1a56cd5))
* **bazel:** Install packages after `ng add` when invoked independently ([#29852](https://github.com/angular/angular/issues/29852)) ([bd2ce9c](https://github.com/angular/angular/commit/bd2ce9c))
* **compiler-cli:** pass config path to `ts.parseJsonConfigFileContent` ([#29872](https://github.com/angular/angular/issues/29872)) ([86a3f90](https://github.com/angular/angular/commit/86a3f90))
* **compiler-cli:** pass config path to ts.parseJsonConfigFileContent ([#29872](https://github.com/angular/angular/issues/29872)) ([86a3f90](https://github.com/angular/angular/commit/86a3f90)), closes [/github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts#L56-L57](https://github.com//github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts/issues/L56-L57)
* **router:** support non-NgFactory promise in loadChildren typings ([#29832](https://github.com/angular/angular/issues/29832)) ([2bfb6a0](https://github.com/angular/angular/commit/2bfb6a0))
* **bazel:** add `configuration_env_vars = ["compile"]` to generated `@npm//@angular/bazel/bin:ngc-wrapped` `nodejs_binary` ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
* **bazel:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//[@angular](https://github.com/angular)/bazel/bin:ngc-wrapped nodejs_binary ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
* **bazel:** docs formatting ([#29817](https://github.com/angular/angular/issues/29817)) ([cc2e4b6](https://github.com/angular/angular/commit/cc2e4b6))
* **bazel:** remove karma-jasmine from `ts_web_test_suite` ([#29695](https://github.com/angular/angular/issues/29695)) ([2bd9214](https://github.com/angular/angular/commit/2bd9214))
* **bazel:** remove karma-jasmine from ts_web_test_suite ([#29695](https://github.com/angular/angular/issues/29695)) ([2bd9214](https://github.com/angular/angular/commit/2bd9214))
* **bazel:** support running ng-add on minimal applications ([#29681](https://github.com/angular/angular/issues/29681)) ([9810c6c](https://github.com/angular/angular/commit/9810c6c)), closes [#29680](https://github.com/angular/angular/issues/29680)
* **common:** add `@Injectable()` to common pipes ([#29834](https://github.com/angular/angular/issues/29834)) ([387fbb8](https://github.com/angular/angular/commit/387fbb8))
* **compiler-cli:** ensure `LogicalProjectPaths` always start with a slash ([#29627](https://github.com/angular/angular/issues/29627)) ([e02684e](https://github.com/angular/angular/commit/e02684e))
* **compiler-cli:** ensure LogicalProjectPaths always start with a slash ([#29627](https://github.com/angular/angular/issues/29627)) ([e02684e](https://github.com/angular/angular/commit/e02684e))
* **core:** add missing migration to npm package ([#29705](https://github.com/angular/angular/issues/29705)) ([96b76dc](https://github.com/angular/angular/commit/96b76dc))
* **core:** call `ngOnDestroy` for tree-shakeable providers ([#28943](https://github.com/angular/angular/issues/28943)) ([30b0442](https://github.com/angular/angular/commit/30b0442)), closes [#28927](https://github.com/angular/angular/issues/28927)
* **core:** Deprecate `TestBed.get(...):any` ([#29290](https://github.com/angular/angular/issues/29290)) ([609024f](https://github.com/angular/angular/commit/609024f)), closes [#13785](https://github.com/angular/angular/issues/13785) [#26491](https://github.com/angular/angular/issues/26491)
* **core:** call ngOnDestroy for tree-shakeable providers ([#28943](https://github.com/angular/angular/issues/28943)) ([30b0442](https://github.com/angular/angular/commit/30b0442)), closes [#28927](https://github.com/angular/angular/issues/28927)
* **core:** Deprecate TestBed.get(...):any ([#29290](https://github.com/angular/angular/issues/29290)) ([609024f](https://github.com/angular/angular/commit/609024f)), closes [#13785](https://github.com/angular/angular/issues/13785) [#26491](https://github.com/angular/angular/issues/26491)
* **core:** resolve ts compile issues due to lenient tsconfig ([#29843](https://github.com/angular/angular/issues/29843)) ([54058ba](https://github.com/angular/angular/commit/54058ba))
* **platform-browser:** insert `APP_ID` in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([712d60e](https://github.com/angular/angular/commit/712d60e))
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([712d60e](https://github.com/angular/angular/commit/712d60e))
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([#29711](https://github.com/angular/angular/issues/29711)) ([9e33dc3](https://github.com/angular/angular/commit/9e33dc3))
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([ca14509](https://github.com/angular/angular/commit/ca14509))
* **bazel:** Update schematics to support routing ([#29548](https://github.com/angular/angular/issues/29548)) ([401b8ee](https://github.com/angular/angular/commit/401b8ee))
* **bazel:** use `//:tsconfig.json` as the default for `ng_module` ([#29670](https://github.com/angular/angular/issues/29670)) ([b14537a](https://github.com/angular/angular/commit/b14537a))
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([b14537a](https://github.com/angular/angular/commit/b14537a))
* **compiler-cli:** ngcc - cope with processing entry-points multiple times ([#29657](https://github.com/angular/angular/issues/29657)) ([6b39c9c](https://github.com/angular/angular/commit/6b39c9c))
* **core:** static-query schematic should detect static queries in getters. ([#29609](https://github.com/angular/angular/issues/29609)) ([33016b8](https://github.com/angular/angular/commit/33016b8))
* **common:** escape query selector used when anchor scrolling ([#29577](https://github.com/angular/angular/issues/29577)) ([7671c73](https://github.com/angular/angular/commit/7671c73)), closes [#28193](https://github.com/angular/angular/issues/28193)
* **router:** adjust setting navigationTransition when a new navigation cancels an existing one ([#29636](https://github.com/angular/angular/issues/29636)) ([e884c0c](https://github.com/angular/angular/commit/e884c0c)), closes [#29389](https://github.com/angular/angular/issues/29389) [#29590](https://github.com/angular/angular/issues/29590)
* **bazel:** allow `ng_module` users to set `createExternalSymbolFactoryReexports` ([#29459](https://github.com/angular/angular/issues/29459)) ([21be0fb](https://github.com/angular/angular/commit/21be0fb))
* **bazel:** allow ng_module users to set createExternalSymbolFactoryReexports ([#29459](https://github.com/angular/angular/issues/29459)) ([21be0fb](https://github.com/angular/angular/commit/21be0fb))
* **bazel:** workaround problem reading summary files from node_modules ([#29459](https://github.com/angular/angular/issues/29459)) ([769d960](https://github.com/angular/angular/commit/769d960))
* **compiler:** inherit param types when class has a constructor which takes no declared parameters and delegates up ([#29232](https://github.com/angular/angular/issues/29232)) ([0007564](https://github.com/angular/angular/commit/0007564))
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([dafbbf8](https://github.com/angular/angular/commit/dafbbf8)), closes [#29231](https://github.com/angular/angular/issues/29231)
* **core:** static-query schematic should detect queries in `ngDoCheck` and `ngOnChanges` ([#29492](https://github.com/angular/angular/issues/29492)) ([09fab58](https://github.com/angular/angular/commit/09fab58))
* **router:** support `NgFactory` promise in loadChildren typings ([#29392](https://github.com/angular/angular/issues/29392)) ([26a8c59](https://github.com/angular/angular/commit/26a8c59))
* **core:** static-query schematic should detect queries in "ngDoCheck" and "ngOnChanges" ([#29492](https://github.com/angular/angular/issues/29492)) ([09fab58](https://github.com/angular/angular/commit/09fab58))
* **router:** support NgFactory promise in loadChildren typings ([#29392](https://github.com/angular/angular/issues/29392)) ([26a8c59](https://github.com/angular/angular/commit/26a8c59))
* **bazel:** correct regexp test for self-references in metadata ([#29346](https://github.com/angular/angular/issues/29346)) ([9d090cb](https://github.com/angular/angular/commit/9d090cb))
* **bazel:** don't produce self-references in metadata ([#29317](https://github.com/angular/angular/issues/29317)) ([3facdeb](https://github.com/angular/angular/commit/3facdeb)), closes [#29315](https://github.com/angular/angular/issues/29315)
* **bazel:** fix strict null checks compile error in `packages/bazel/src/schematics/ng-add/index.ts` ([#29282](https://github.com/angular/angular/issues/29282)) ([9a7f560](https://github.com/angular/angular/commit/9a7f560))
* **bazel:** Remove @angular/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
* **bazel:** fix strict null checks compile error in packages/bazel/src/schematics/ng-add/index.ts ([#29282](https://github.com/angular/angular/issues/29282)) ([9a7f560](https://github.com/angular/angular/commit/9a7f560))
* **bazel:** Remove [@angular](https://github.com/angular)/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
* **bazel:** Support new e2e project layout ([#29318](https://github.com/angular/angular/issues/29318)) ([8ef690c](https://github.com/angular/angular/commit/8ef690c))
* **bazel:** turn off pure call tree shaking for ng_package ([#29210](https://github.com/angular/angular/issues/29210)) ([4990b93](https://github.com/angular/angular/commit/4990b93))
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([105cfaf](https://github.com/angular/angular/commit/105cfaf))
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([105cfaf](https://github.com/angular/angular/commit/105cfaf)), closes [/github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com//github.com/angular/material2/blob/master/tools/package-tools/build-release.ts/issues/L78-L85)
* **core:** don't wrap `<tr>` and `<col>` elements into a required parent ([#29219](https://github.com/angular/angular/issues/29219)) ([f2dc32e](https://github.com/angular/angular/commit/f2dc32e))
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([4605df8](https://github.com/angular/angular/commit/4605df8)), closes [#29231](https://github.com/angular/angular/issues/29231)
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([cf8d934](https://github.com/angular/angular/commit/cf8d934)), closes [github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85)
* **bazel:** add missing binary path for api-extractor ([#29202](https://github.com/angular/angular/issues/29202)) ([df354d1](https://github.com/angular/angular/commit/df354d1))
* **bazel:** ng build should produce prod bundle ([#29136](https://github.com/angular/angular/issues/29136)) ([14ce8a9](https://github.com/angular/angular/commit/14ce8a9))
* **compiler:** ensure template is updated if an output is transformed ([#29041](https://github.com/angular/angular/issues/29041)) ([c7e4931](https://github.com/angular/angular/commit/c7e4931))
@ -243,16 +161,16 @@
### BREAKING CHANGES
* **bazel:** @bazel/typescript is now a peerDependency of @angular/bazel so users of @angular/bazel must add @bazel/typescript to their package.json
* **bazel:** `ng_module` now depends on a minimum of build_bazel_rules_nodejs 0.27.12
* **core:** In Angular version 8, it's required that all `@ViewChild` and `@ContentChild`
queries have a `'static'` flag specifying whether the query is 'static' or
* **bazel:** @bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json
* **bazel:** ng_module now depends on a minimum of build_bazel_rules_nodejs 0.27.12
* **core:** In Angular version 8, it's required that all @ViewChild and @ContentChild
queries have a 'static' flag specifying whether the query is 'static' or
'dynamic'. The compiler previously sorted queries automatically, but in
8.0 developers are required to explicitly specify which behavior is wanted.
This is a temporary requirement as part of a migration; see
[static query migration guide](https://v8.angular.io/guide/static-query-migration) for more details.
https://v8.angular.io/guide/static-query-migration for more details.
`@ViewChildren` and `@ContentChildren` queries are always dynamic, and so are
@ViewChildren and @ContentChildren queries are always dynamic, and so are
unaffected.
* `TestBed.get()` has two signatures, one which is typed and another which accepts and returns `any`. The signature for `any` is deprecated; all usage of `TestBed.get()` should go through the typed API. This mainly affects string tokens
@ -286,8 +204,8 @@ This is a temporary requirement as part of a migration; see
- `<tr>` would be wrapped in `<tbody>` if not inside `<tbody>`, `<tfoot>` or `<thead>`;
- `<col>` would be wrapped in `<colgroup>` if not inside `<colgroup>`.
This mechanism of automatic wrapping / auto-correcting was problematic for several reasons:
- it is non-obvious and arbitrary (ex. there are more HTML elements that have rules for parent type);
This meachanism of automatic wrapping / auto-correcting was problematic for several reasons:
- it is non-obvious and arbitrary (ex. there are more HTML elements that has rules for parent type);
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
```html
@ -299,13 +217,10 @@ This is a temporary requirement as part of a migration; see
In the above example the `<projecting-tr-inside-tbody>` component could be "surprised" to see additional
`<tbody>` elements inserted by Angular HTML parser.
* **http:** The deprecated @angular/http package has been removed, the @angular/common/http package should be used instead.
For details on how to migrate, please refer to [the deprecations guide](https://angular.io/guide/deprecations#angularhttp).
* TypeScript 3.1 and 3.2 are no longer supported.
Please update your TypeScript version to 3.4, as version 3.3 is also not supported.
Please update your TypeScript version to 3.3
<a name="8.0.0-rc.5"></a>
@ -391,17 +306,6 @@ unaffected.
<a name="7.2.15"></a>
## [7.2.15](https://github.com/angular/angular/compare/7.2.14...7.2.15) (2019-05-07)
### Bug Fixes
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([#30107](https://github.com/angular/angular/issues/30107)) ([1084c19](https://github.com/angular/angular/commit/1084c19)), closes [#24680](https://github.com/angular/angular/issues/24680) [/github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12](https://github.com//github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts/issues/L12) [#24680](https://github.com/angular/angular/issues/24680)
<a name="8.0.0-rc.2"></a>
# [8.0.0-rc.2](https://github.com/angular/angular/compare/8.0.0-rc.1...8.0.0-rc.2) (2019-04-29)
@ -431,9 +335,9 @@ unaffected.
### Bug Fixes
* **bazel:** make name param in ng add optional ([#30074](https://github.com/angular/angular/issues/30074)) ([0b5f480](https://github.com/angular/angular/commit/0b5f480))
* **bazel:** Make sure only single copy of `@angular/bazel` is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
* **bazel:** Make sure only single copy of `[@angular](https://github.com/angular)/bazel` is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
* **bazel:** transitive npm deps in ng_module ([#30065](https://github.com/angular/angular/issues/30065)) ([61365a9](https://github.com/angular/angular/commit/61365a9))
* **common:** add upgrade sub-package to ng_package rule for @angular/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
* **common:** add upgrade sub-package to ng_package rule for [@angular](https://github.com/angular)/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
* **common:** adjust MockPlatformLocation to set state to new object ([#30055](https://github.com/angular/angular/issues/30055)) ([825efa8](https://github.com/angular/angular/commit/825efa8))
* **compiler:** Fix compiler crash due to isSkipSelf of null ([#30075](https://github.com/angular/angular/issues/30075)) ([28fd5ab](https://github.com/angular/angular/commit/28fd5ab))
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([0ddf2e7](https://github.com/angular/angular/commit/0ddf2e7)), closes [#24680](https://github.com/angular/angular/issues/24680) [/github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12](https://github.com//github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts/issues/L12) [#24680](https://github.com/angular/angular/issues/24680)
@ -441,7 +345,7 @@ unaffected.
### Features
* **common:** add @angular/common/upgrade package for $location-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
* **common:** add [@angular](https://github.com/angular)/common/upgrade package for $location-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
* **common:** add ability to retrieve the state from Location service ([#30055](https://github.com/angular/angular/issues/30055)) ([b44b143](https://github.com/angular/angular/commit/b44b143))
* **common:** add ability to track all location changes ([#30055](https://github.com/angular/angular/issues/30055)) ([3a9cf3f](https://github.com/angular/angular/commit/3a9cf3f))
* **common:** add APIs to read component pieces of URL ([#30055](https://github.com/angular/angular/issues/30055)) ([b635fe8](https://github.com/angular/angular/commit/b635fe8))
@ -504,7 +408,7 @@ unaffected.
### Bug Fixes
* **bazel:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//@angular/bazel/bin:ngc-wrapped nodejs_binary ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
* **bazel:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//[@angular](https://github.com/angular)/bazel/bin:ngc-wrapped nodejs_binary ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
* **bazel:** docs formatting ([#29817](https://github.com/angular/angular/issues/29817)) ([cc2e4b6](https://github.com/angular/angular/commit/cc2e4b6))
* **bazel:** remove karma-jasmine from ts_web_test_suite ([#29695](https://github.com/angular/angular/issues/29695)) ([2bd9214](https://github.com/angular/angular/commit/2bd9214))
* **bazel:** support running ng-add on minimal applications ([#29681](https://github.com/angular/angular/issues/29681)) ([9810c6c](https://github.com/angular/angular/commit/9810c6c)), closes [#29680](https://github.com/angular/angular/issues/29680)
@ -579,7 +483,7 @@ let service = TestBed.get(SERVICE_TOKEN); // type Service
### Features
* remove @angular/http dependency from @angular/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
* remove [@angular](https://github.com/angular)/http dependency from [@angular](https://github.com/angular)/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
* **compiler-cli:** ngcc - make logging more configurable ([#29591](https://github.com/angular/angular/issues/29591)) ([8d3d75e](https://github.com/angular/angular/commit/8d3d75e))
* **core:** Add "AbstractType<T>" interface ([#29295](https://github.com/angular/angular/issues/29295)) ([afd4a4e](https://github.com/angular/angular/commit/afd4a4e)), closes [#26491](https://github.com/angular/angular/issues/26491)
* **core:** template-var-assignment update schematic ([#29608](https://github.com/angular/angular/issues/29608)) ([7c8f4e3](https://github.com/angular/angular/commit/7c8f4e3))
@ -639,7 +543,7 @@ This release contains various API docs improvements.
* **bazel:** correct regexp test for self-references in metadata ([#29346](https://github.com/angular/angular/issues/29346)) ([9d090cb](https://github.com/angular/angular/commit/9d090cb))
* **bazel:** don't produce self-references in metadata ([#29317](https://github.com/angular/angular/issues/29317)) ([3facdeb](https://github.com/angular/angular/commit/3facdeb)), closes [#29315](https://github.com/angular/angular/issues/29315)
* **bazel:** fix strict null checks compile error in packages/bazel/src/schematics/ng-add/index.ts ([#29282](https://github.com/angular/angular/issues/29282)) ([9a7f560](https://github.com/angular/angular/commit/9a7f560))
* **bazel:** Remove @angular/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
* **bazel:** Remove [@angular](https://github.com/angular)/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
* **bazel:** Support new e2e project layout ([#29318](https://github.com/angular/angular/issues/29318)) ([8ef690c](https://github.com/angular/angular/commit/8ef690c))
* **bazel:** turn off pure call tree shaking for ng_package ([#29210](https://github.com/angular/angular/issues/29210)) ([4990b93](https://github.com/angular/angular/commit/4990b93))
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([105cfaf](https://github.com/angular/angular/commit/105cfaf)), closes [/github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com//github.com/angular/material2/blob/master/tools/package-tools/build-release.ts/issues/L78-L85)
@ -660,8 +564,8 @@ This release contains various API docs improvements.
- `<tr>` would be wrapped in `<tbody>` if not inside `<tbody>`, `<tfoot>` or `<thead>`;
- `<col>` would be wrapped in `<colgroup>` if not inside `<colgroup>`.
This mechanism of automatic wrapping / auto-correcting was problematic for several reasons:
- it is non-obvious and arbitrary (ex. there are more HTML elements that have rules for parent type);
This meachanism of automatic wrapping / auto-correcting was problematic for several reasons:
- it is non-obvious and arbitrary (ex. there are more HTML elements that has rules for parent type);
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
```html
@ -1062,7 +966,7 @@ This release contains various API docs improvements.
* **bazel:** unable to launch protractor test on windows ([#27850](https://github.com/angular/angular/issues/27850)) ([1e6c9be](https://github.com/angular/angular/commit/1e6c9be))
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([f57916c](https://github.com/angular/angular/commit/f57916c))
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([522919a](https://github.com/angular/angular/commit/522919a))
* **bazel:** fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([8313ffc](https://github.com/angular/angular/commit/8313ffc))
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([44dfa60](https://github.com/angular/angular/commit/44dfa60)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
* **bazel:** Set module_name and enable ng test ([#27715](https://github.com/angular/angular/issues/27715)) ([85866de](https://github.com/angular/angular/commit/85866de))
@ -1082,7 +986,7 @@ This release contains various API docs improvements.
* **core:** export a value for InjectFlags ([#27279](https://github.com/angular/angular/issues/27279)) ([23b06af](https://github.com/angular/angular/commit/23b06af)), closes [#27251](https://github.com/angular/angular/issues/27251)
* **core:** More precise return type for `InjectableDecorator` ([#27360](https://github.com/angular/angular/issues/27360)) ([4b9948c](https://github.com/angular/angular/commit/4b9948c)), closes [#26942](https://github.com/angular/angular/issues/26942)
* **forms:** typed argument for FormBuilder group ([#26985](https://github.com/angular/angular/issues/26985)) ([b0c7561](https://github.com/angular/angular/commit/b0c7561))
* **platform-server:** add @angular/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
* **router:** ensure URL is updated after second redirect with UrlUpdateStrategy="eager" ([#27523](https://github.com/angular/angular/issues/27523)) ([ad26cd6](https://github.com/angular/angular/commit/ad26cd6)), closes [#27116](https://github.com/angular/angular/issues/27116)
* **router:** update URL after redirects when urlHandlingStrategy='eager' ([#27356](https://github.com/angular/angular/issues/27356)) ([11a8bd8](https://github.com/angular/angular/commit/11a8bd8)), closes [#27076](https://github.com/angular/angular/issues/27076)
* **upgrade:** allow nesting components from different downgraded modules ([#27217](https://github.com/angular/angular/issues/27217)) ([bc0ee01](https://github.com/angular/angular/commit/bc0ee01))
@ -1102,7 +1006,7 @@ This release contains various API docs improvements.
* **animations:** mark actual descendant node as disabled ([#26180](https://github.com/angular/angular/issues/26180)) ([453589f](https://github.com/angular/angular/commit/453589f))
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([b108e9a](https://github.com/angular/angular/commit/b108e9a))
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([0d8528b](https://github.com/angular/angular/commit/0d8528b))
* **bazel:** fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([3ed1e84](https://github.com/angular/angular/commit/3ed1e84))
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([3ed1e84](https://github.com/angular/angular/commit/3ed1e84))
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([89ace1a](https://github.com/angular/angular/commit/89ace1a))
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([ef056c5](https://github.com/angular/angular/commit/ef056c5)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
* **bazel:** Read latest versions from latest-versions.ts & use semver check ([#27591](https://github.com/angular/angular/issues/27591)) ([93078e3](https://github.com/angular/angular/commit/93078e3))
@ -1134,7 +1038,7 @@ This release contains various API docs improvements.
* **bazel:** ng_package should correctly map to source maps in secondary entry-points ([#27313](https://github.com/angular/angular/issues/27313)) ([fc2c23e](https://github.com/angular/angular/commit/fc2c23e)), closes [#25510](https://github.com/angular/angular/issues/25510)
* **compiler-cli:** flatModuleIndex files not generated on windows with multiple input files ([#27200](https://github.com/angular/angular/issues/27200)) ([8087b6b](https://github.com/angular/angular/commit/8087b6b))
* **compiler-cli:** ngtsc shim files not being generated on case-insensitive platforms ([#27466](https://github.com/angular/angular/issues/27466)) ([84f2928](https://github.com/angular/angular/commit/84f2928)), closes [/github.com/Microsoft/TypeScript/blob/3e4c5c95abd515eb9713b881d27ab3a93cc00461/src/compiler/sys.ts#L681-L682](https://github.com//github.com/Microsoft/TypeScript/blob/3e4c5c95abd515eb9713b881d27ab3a93cc00461/src/compiler/sys.ts/issues/L681-L682)
* **platform-server:** add @angular/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
@ -1161,7 +1065,7 @@ This release contains various API docs improvements.
* **compiler:** generate inputs with aliases properly ([#26774](https://github.com/angular/angular/issues/26774)) ([19fcfc3](https://github.com/angular/angular/commit/19fcfc3))
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([56f44be](https://github.com/angular/angular/commit/56f44be))
* **core:** ignore comment nodes under unsafe elements ([#25879](https://github.com/angular/angular/issues/25879)) ([d5cbcef](https://github.com/angular/angular/commit/d5cbcef))
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([95743e3](https://github.com/angular/angular/commit/95743e3))
* **bazel:** unknown replay compiler error in windows ([#26711](https://github.com/angular/angular/issues/26711)) ([aed95fd](https://github.com/angular/angular/commit/aed95fd))
* **core:** ensure that `ɵdefineNgModule` is available in flat-file formats ([#26403](https://github.com/angular/angular/issues/26403)) ([a64859b](https://github.com/angular/angular/commit/a64859b))
@ -1268,7 +1172,7 @@ This release contains various API docs improvements.
* **compiler:** generate inputs with aliases properly ([#26774](https://github.com/angular/angular/issues/26774)) ([19fcfc3](https://github.com/angular/angular/commit/19fcfc3))
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([56f44be](https://github.com/angular/angular/commit/56f44be))
* **core:** ignore comment nodes under unsafe elements ([#25879](https://github.com/angular/angular/issues/25879)) ([d5cbcef](https://github.com/angular/angular/commit/d5cbcef))
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([95743e3](https://github.com/angular/angular/commit/95743e3))
@ -1280,7 +1184,7 @@ This release contains various API docs improvements.
### Bug Fixes
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([c01f340](https://github.com/angular/angular/commit/c01f340))
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([#26879](https://github.com/angular/angular/issues/26879)) ([257ac83](https://github.com/angular/angular/commit/257ac83))
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([#26879](https://github.com/angular/angular/issues/26879)) ([257ac83](https://github.com/angular/angular/commit/257ac83))
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([b3c6409](https://github.com/angular/angular/commit/b3c6409))
@ -1357,7 +1261,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
* **compiler:** update compiler to flatten nested template fns ([#24943](https://github.com/angular/angular/issues/24943)) ([fe14f18](https://github.com/angular/angular/commit/fe14f18))
* **compiler:** update compiler to generate new slot allocations ([#25607](https://github.com/angular/angular/issues/25607)) ([27e2039](https://github.com/angular/angular/commit/27e2039))
* **core:** In Testability.whenStable update callback, pass more complete ([#25010](https://github.com/angular/angular/issues/25010)) ([16c03c0](https://github.com/angular/angular/commit/16c03c0))
* **core:** add missing `peerDependency ` to `@angular/compiler` ([#26033](https://github.com/angular/angular/issues/26033)) ([549de1e](https://github.com/angular/angular/commit/549de1e)), closes [/github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e#diff-58563046c4439699f2e6a89187099a54](https://github.com//github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e/issues/diff-58563046c4439699f2e6a89187099a54)
* **core:** add missing `peerDependency ` to `[@angular](https://github.com/angular)/compiler` ([#26033](https://github.com/angular/angular/issues/26033)) ([549de1e](https://github.com/angular/angular/commit/549de1e)), closes [/github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e#diff-58563046c4439699f2e6a89187099a54](https://github.com//github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e/issues/diff-58563046c4439699f2e6a89187099a54)
* **core:** allow null value for renderer setElement(…) ([#17065](https://github.com/angular/angular/issues/17065)) ([ff15043](https://github.com/angular/angular/commit/ff15043)), closes [#13686](https://github.com/angular/angular/issues/13686)
* **core:** do not clear element content when using shadow dom ([#24861](https://github.com/angular/angular/issues/24861)) ([6e828bb](https://github.com/angular/angular/commit/6e828bb))
* **core:** size regression with closure compiler ([#25531](https://github.com/angular/angular/issues/25531)) ([1f59f2f](https://github.com/angular/angular/commit/1f59f2f))
@ -1803,7 +1707,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([a2330ff](https://github.com/angular/angular/commit/a2330ff)), closes [#22723](https://github.com/angular/angular/issues/22723)
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([2b3de63](https://github.com/angular/angular/commit/2b3de63)), closes [#22734](https://github.com/angular/angular/issues/22734)
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([8a85888](https://github.com/angular/angular/commit/8a85888)), closes [#22392](https://github.com/angular/angular/issues/22392)
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([13ab91e](https://github.com/angular/angular/commit/13ab91e)), closes [#22175](https://github.com/angular/angular/issues/22175)
@ -1938,7 +1842,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([789a47e](https://github.com/angular/angular/commit/789a47e)), closes [#10280](https://github.com/angular/angular/issues/10280)
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
@ -1952,7 +1856,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
@ -2399,7 +2303,7 @@ Note: Due to an animation fix back in 5.1.1 ([c2b3792](https://github.com/angula
* **platform-server:** provide a way to hook into renderModule* ([#19023](https://github.com/angular/angular/issues/19023)) ([8dfc3c3](https://github.com/angular/angular/commit/8dfc3c3))
* **router:** add ActivationStart/End events ([8f79150](https://github.com/angular/angular/commit/8f79150))
* **router:** add events tracking activation of individual routes ([49cd851](https://github.com/angular/angular/commit/49cd851))
* **service-worker:** introduce the @angular/service-worker package ([#19274](https://github.com/angular/angular/issues/19274)) ([d442b68](https://github.com/angular/angular/commit/d442b68))
* **service-worker:** introduce the [@angular](https://github.com/angular)/service-worker package ([#19274](https://github.com/angular/angular/issues/19274)) ([d442b68](https://github.com/angular/angular/commit/d442b68))
* **upgrade:** propagate touched state of NgModelController ([59c23c7](https://github.com/angular/angular/commit/59c23c7))
* **upgrade:** support lazy-loading Angular module into AngularJS app ([30e76fc](https://github.com/angular/angular/commit/30e76fc))
* update angular to support TypeScript 2.4 ([ca5aeba](https://github.com/angular/angular/commit/ca5aeba))
@ -2623,7 +2527,7 @@ Because of multiple bugs and browser inconsistencies, we have dropped the intl a
### Bug Fixes
* **animations:** do not leak DOM nodes/styling for host triggered animations ([#18853](https://github.com/angular/angular/issues/18853)) ([1cc3fe2](https://github.com/angular/angular/commit/1cc3fe2)), closes [#18606](https://github.com/angular/angular/issues/18606)
* **common:** fix improper packaging for @angular/common/http ([#18613](https://github.com/angular/angular/issues/18613)) ([a203a95](https://github.com/angular/angular/commit/a203a95))
* **common:** fix improper packaging for [@angular](https://github.com/angular)/common/http ([#18613](https://github.com/angular/angular/issues/18613)) ([a203a95](https://github.com/angular/angular/commit/a203a95))
* **common:** fix XSSI prefix stripping by using JSON.parse always ([#18466](https://github.com/angular/angular/issues/18466)) ([8821723](https://github.com/angular/angular/commit/8821723)), closes [#18396](https://github.com/angular/angular/issues/18396) [#18453](https://github.com/angular/angular/issues/18453)
* **compiler:** normalize the locale name ([#18963](https://github.com/angular/angular/issues/18963)) ([497e017](https://github.com/angular/angular/commit/497e017))
* **core:** complete EventEmitter in QueryList on component destroy ([#18902](https://github.com/angular/angular/issues/18902)) ([7d137d7](https://github.com/angular/angular/commit/7d137d7)), closes [#18741](https://github.com/angular/angular/issues/18741)
@ -2964,7 +2868,7 @@ Note: the 4.4.0 release on npm accidentally glitched-out midway, so we cut 4.4.1
* **compiler-cli:** allow '==' to compare nullable types ([#16731](https://github.com/angular/angular/issues/16731)) ([d761059](https://github.com/angular/angular/commit/d761059))
* **core:** detach projected views when a parent view is destroyed ([#16592](https://github.com/angular/angular/issues/16592)) ([f0f6544](https://github.com/angular/angular/commit/f0f6544)), closes [#15578](https://github.com/angular/angular/issues/15578)
* **core:** projected views should be dirty checked when the declaring component is dirty checked. ([#16592](https://github.com/angular/angular/issues/16592)) ([fcc91d8](https://github.com/angular/angular/commit/fcc91d8)), closes [#14321](https://github.com/angular/angular/issues/14321)
* **http:** flatten metadata for @angular/http/testing ([9da6340](https://github.com/angular/angular/commit/9da6340)), closes [#15521](https://github.com/angular/angular/issues/15521)
* **http:** flatten metadata for [@angular](https://github.com/angular)/http/testing ([9da6340](https://github.com/angular/angular/commit/9da6340)), closes [#15521](https://github.com/angular/angular/issues/15521)
* **http:** honor RequestArgs.search and RequestArgs.params map type ([aef5245](https://github.com/angular/angular/commit/aef5245)), closes [#15761](https://github.com/angular/angular/issues/15761) [#16392](https://github.com/angular/angular/issues/16392)
* **http:** introduce encodingHint for text() for better ArrayBuffer support ([7ae7a84](https://github.com/angular/angular/commit/7ae7a84)), closes [#15932](https://github.com/angular/angular/issues/15932) [#16420](https://github.com/angular/angular/issues/16420)
* **router:** fix redirect to a URL with a param having multiple values ([#16376](https://github.com/angular/angular/issues/16376)) ([5d4b36f](https://github.com/angular/angular/commit/5d4b36f)), closes [#16310](https://github.com/angular/angular/issues/16310)
@ -3020,7 +2924,7 @@ Note: the 4.4.0 release on npm accidentally glitched-out midway, so we cut 4.4.1
* **compiler:** avoid a `...null` spread in extraction ([#16547](https://github.com/angular/angular/issues/16547)) ([d0e1688](https://github.com/angular/angular/commit/d0e1688))
* **core:** detach projected views when a parent view is destroyed ([#16592](https://github.com/angular/angular/issues/16592)) ([ee6705a](https://github.com/angular/angular/commit/ee6705a)), closes [#15578](https://github.com/angular/angular/issues/15578)
* **core:** projected views should be dirty checked when the declaring component is dirty checked. ([#16592](https://github.com/angular/angular/issues/16592)) ([9218812](https://github.com/angular/angular/commit/9218812)), closes [#14321](https://github.com/angular/angular/issues/14321)
* **http:** flatten metadata for @angular/http/testing ([9c70a3c](https://github.com/angular/angular/commit/9c70a3c)), closes [#15521](https://github.com/angular/angular/issues/15521)
* **http:** flatten metadata for [@angular](https://github.com/angular)/http/testing ([9c70a3c](https://github.com/angular/angular/commit/9c70a3c)), closes [#15521](https://github.com/angular/angular/issues/15521)
* **http:** honor RequestArgs.search and RequestArgs.params map type ([63066f7](https://github.com/angular/angular/commit/63066f7)), closes [#15761](https://github.com/angular/angular/issues/15761) [#16392](https://github.com/angular/angular/issues/16392)
* **http:** introduce encodingHint for text() for better ArrayBuffer support ([ec3b6e9](https://github.com/angular/angular/commit/ec3b6e9)), closes [#15932](https://github.com/angular/angular/issues/15932) [#16420](https://github.com/angular/angular/issues/16420)
* **router:** fix redirect to a URL with a param having multiple values ([#16376](https://github.com/angular/angular/issues/16376)) ([915eae5](https://github.com/angular/angular/commit/915eae5)), closes [#16310](https://github.com/angular/angular/issues/16310)
@ -3650,7 +3554,7 @@ Note: the 4.0.0-rc.0 release on npm accidentally omitted one bug fix, so we cut
* **core:** add isStable Observable property to ApplicationRef to indicate when it's stable and unstable ([#14337](https://github.com/angular/angular/issues/14337)) ([c481798](https://github.com/angular/angular/commit/c481798))
* **platform-server:** add API to render Module and ModuleFactory to string ([#14381](https://github.com/angular/angular/issues/14381)) ([b4d444a](https://github.com/angular/angular/commit/b4d444a))
* **platform-server:** Implement PlatformLocation for platformServer() ([#14405](https://github.com/angular/angular/issues/14405)) ([9e28568](https://github.com/angular/angular/commit/9e28568))
* **platform-server:** support @angular/http from @angular/platform-server ([9559d3e](https://github.com/angular/angular/commit/9559d3e))
* **platform-server:** support [@angular](https://github.com/angular)/http from [@angular](https://github.com/angular)/platform-server ([9559d3e](https://github.com/angular/angular/commit/9559d3e))
* **tsc-wrapped:** add an option to `ngc` to bundle metadata ([#14509](https://github.com/angular/angular/issues/14509)) ([3b89670](https://github.com/angular/angular/commit/3b89670))
@ -4611,7 +4515,7 @@ Note: The 2.2.0-beta.0 release also contains all the changes present in the 2.1.
* **compiler:** properly shim `:host:before` and `:host(:before)` ([#12171](https://github.com/angular/angular/issues/12171)) ([aa92512](https://github.com/angular/angular/commit/aa92512)), closes [#12165](https://github.com/angular/angular/issues/12165)
* **compiler:** validate `@HostBinding` name ([#12139](https://github.com/angular/angular/issues/12139)) ([13ecc14](https://github.com/angular/angular/commit/13ecc14))
* **compiler-cli:** don't clone static symbols when simplifying annotation metadata ([#12158](https://github.com/angular/angular/issues/12158)) ([8c477b2](https://github.com/angular/angular/commit/8c477b2))
* **compiler-cli:** remove peerDependency on @angular/platform-server ([#12122](https://github.com/angular/angular/issues/12122)) ([71b7654](https://github.com/angular/angular/commit/71b7654))
* **compiler-cli:** remove peerDependency on [@angular](https://github.com/angular)/platform-server ([#12122](https://github.com/angular/angular/issues/12122)) ([71b7654](https://github.com/angular/angular/commit/71b7654))
* **compiler-cli:** remove unused parse5 dependency from package.json ([eaaec69](https://github.com/angular/angular/commit/eaaec69))
* **forms:** allow optional fields with pattern and minlength validators ([#12147](https://github.com/angular/angular/issues/12147)) ([d22eeb7](https://github.com/angular/angular/commit/d22eeb7))
* **forms:** properly validate blank strings with minlength ([#12091](https://github.com/angular/angular/issues/12091)) ([f50c1da](https://github.com/angular/angular/commit/f50c1da))

View File

@ -48,7 +48,7 @@ Angular supports most recent browsers. This includes the following specific vers
2 most recent major versions
</td>
</tr>
<tr>
<tr>
<td>
IE
</td>
@ -57,7 +57,7 @@ Angular supports most recent browsers. This includes the following specific vers
</td>
</tr>
<tr>
<tr>
<tr>
<td>
IE Mobile
</td>
@ -82,7 +82,7 @@ Angular supports most recent browsers. This includes the following specific vers
<td>
2 most recent major versions
</td>
</tr>
</tr>
<tr>
<td>
Android
@ -91,7 +91,7 @@ Angular supports most recent browsers. This includes the following specific vers
<td>
Nougat (7.0)<br>Marshmallow (6.0)<br>Lollipop (5.0, 5.1)<br>KitKat (4.4)
</td>
</tr>
</tr>
</table>
@ -103,10 +103,12 @@ using <a href="https://saucelabs.com/">SauceLabs</a> and
</div>
## Polyfills
Angular is built on the latest standards of the web platform.
Targeting such a wide range of browsers is challenging because they do not support all features of modern browsers.
You compensate by loading polyfill scripts ("polyfills") for the browsers that you must support.
The [table below](#polyfill-libs) identifies most of the polyfills you might need.
@ -118,15 +120,6 @@ Note that polyfills cannot magically transform an old, slow browser into a moder
</div>
In Angular CLI version 8 and higher, applications are built using *differential loading*, a strategy where the CLI builds two separate bundles as part of your deployed application.
* The first bundle contains modern ES1015 syntax, takes advantage of built-in support in modern browsers, ships less polyfills, and results in a smaller bundle size.
* The second bundle contains code in the old ES5 syntax, along with all necessary polyfills. This results in a larger bundle size, but supports older browsers.
This strategy allows you to continue to build your web application to support multiple browsers, but only load the necessary code that the browser needs.
For more information about how this works, see [Differential Loading](guide/deployment#differential-loading) in the [Deployment guide](guide/deployment).
## Enabling polyfills
[Angular CLI](cli) users enable polyfills through the `src/polyfills.ts` file that
@ -309,14 +302,14 @@ Here are the features which may require additional polyfills:
<td>
If you use the following deprecated i18n pipes:
[date](api/common/DeprecatedDatePipe),
[date](api/common/DeprecatedDatePipe),
[currency](api/common/DeprecatedCurrencyPipe),
[decimal](api/common/DeprecatedDecimalPipe),
[decimal](api/common/DeprecatedDecimalPipe),
[percent](api/common/DeprecatedPercentPipe)
</td>
@ -337,8 +330,8 @@ Here are the features which may require additional polyfills:
<td>
[NgClass](api/common/NgClass)
[NgClass](api/common/NgClass)
on SVG elements
</td>
@ -358,8 +351,8 @@ Here are the features which may require additional polyfills:
<td>
[Http](guide/http)
[Http](guide/http)
when sending and receiving binary data
</td>
@ -383,8 +376,8 @@ Here are the features which may require additional polyfills:
<td>
[Router](guide/router)
[Router](guide/router)
when using [hash-based routing](guide/router#appendix-locationstrategy-and-browser-url-styles)
</td>

View File

@ -30,9 +30,7 @@ You will need two terminals to get the live-reload experience.
* On the first terminal, run the [`ng build` command](cli/build) in *watch* mode to compile the application to the `dist` folder.
<code-example language="none" class="code-shell">
ng build --watch
</code-example>
Like the `ng serve` command, this regenerates output files when source files change.
@ -40,9 +38,7 @@ You will need two terminals to get the live-reload experience.
* On the second terminal, install a web server (such as [lite-server](https://github.com/johnpapa/lite-server)), and run it against the output folder. For example:
<code-example language="none" class="code-shell">
lite-server --baseDir="dist"
</code-example>
The server will automatically reload your browser when new files are output.
@ -60,9 +56,7 @@ For the simplest deployment, create a production build and copy the output direc
1. Start with the production build:
<code-example language="none" class="code-shell">
ng build --prod
</code-example>
@ -84,10 +78,8 @@ Make a note of the user name and project name in GitHub.
1. Build your project using Github project name, with the Angular CLI command [`ng build`](cli/build) and the options shown here:
<code-example language="none" class="code-shell">
ng build --prod --output-path docs --base-href /&lt;project_name&gt;/
</code-example>
ng build --prod --output-path docs --base-href /<project_name>/
</code-example>
1. When the build is complete, make a copy of `docs/index.html` and name it `docs/404.html`.
@ -152,7 +144,6 @@ The list is by no means exhaustive, but should provide you with a good starting
(https://ngmilk.rocks/2015/03/09/angularjs-html5-mode-or-pretty-urls-on-apache-using-htaccess/):
<code-example format=".">
RewriteEngine On
&#35 If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
@ -161,7 +152,6 @@ The list is by no means exhaustive, but should provide you with a good starting
&#35 If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
</code-example>
@ -170,17 +160,14 @@ The list is by no means exhaustive, but should provide you with a good starting
modified to serve `index.html`:
<code-example format=".">
try_files $uri $uri/ /index.html;
</code-example>
* [IIS](https://www.iis.net/): add a rewrite rule to `web.config`, similar to the one shown
[here](http://stackoverflow.com/a/26152011/2116927):
<code-example format='.' linenums="false">
<code-example format='.'>
&lt;system.webServer&gt;
&lt;rewrite&gt;
&lt;rules&gt;
@ -214,7 +201,6 @@ and to
[rewrite rule](https://firebase.google.com/docs/hosting/url-redirects-rewrites#section-rewrites).
<code-example format=".">
"rewrites": [ {
"source": "**",
"destination": "/index.html"
@ -262,9 +248,7 @@ See [`ng build`](cli/build) for more about CLI build options and what they do.
In addition to build optimizations, Angular also has a runtime production mode. Angular apps run in development mode by default, as you can see by the following message on the browser console:
<code-example format="nocode">
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
</code-example>
Switching to _production mode_ makes it run faster by disabling development specific checks such as the dual change detection cycles.
@ -283,9 +267,9 @@ Configure the Angular Router to defer loading of all other modules (and their as
or by [_lazy loading_](guide/router#asynchronous-routing "Lazy loading")
them on demand.
<div class="callout is-helpful>
<div class="alert is-helpful>
<header>Don't eagerly import something from a lazy-loaded module</header>
#### Don't eagerly import something from a lazy-loaded module
If you mean to lazy-load a module, be careful not import it
in a file that's eagerly loaded when the app starts (such as the root `AppModule`).
@ -329,34 +313,26 @@ tool is a great way to inspect the generated JavaScript bundles after a producti
Install `source-map-explorer`:
<code-example language="none" class="code-shell">
npm install source-map-explorer --save-dev
</code-example>
Build your app for production _including the source maps_
<code-example language="none" class="code-shell">
ng build --prod --source-map
</code-example>
List the generated bundles in the `dist/` folder.
<code-example language="none" class="code-shell">
ls dist/*.bundle.js
</code-example>
Run the explorer to generate a graphical representation of one of the bundles.
The following example displays the graph for the _main_ bundle.
<code-example language="none" class="code-shell">
node_modules/.bin/source-map-explorer dist/main.*.bundle.js
</code-example>
The `source-map-explorer` analyzes the source map generated with the bundle and draws a map of all dependencies,
@ -394,58 +370,34 @@ the subfolder is `my/app/` and you should add `<base href="/my/app/">` to the se
When the `base` tag is mis-configured, the app fails to load and the browser console displays `404 - Not Found` errors
for the missing files. Look at where it _tried_ to find those files and adjust the base tag appropriately.
{@a differential-loading}
## Differential Loading
When building web applications, making sure your application is compatible with the majority of browsers is a goal.
Even as JavaScript continues to evolve, with new features being introduced, not all browsers are updated with support for these new features at the same pace.
When building web applications, making sure your application is compatible with the majority of browsers is a goal. Even as JavaScript continues to evolve, with new features being introduced, not all browsers are updated with support for these new features at the same pace. This is where compilation and [polyfills](guide/browser-support#polyfills) come in. The code you write in development using TypeScript is compiled and bundled into a format that is compatible with most browsers, commonly known as ES5. Polyfills are used bridge the gap, providing functionality that simply doesn't exist in some legacy browsers.
The code you write in development using TypeScript is compiled and bundled into ES2015, the JavaScript syntax that is compatible with most browsers.
All modern browsers support ES2015 and beyond, but in most cases, you still have to account for users accessing your application from a browser that doesn't.
When targeting older browsers, [polyfills](guide/browser-support#polyfills) can bridge the gap by providing functionality that doesn't exist in the older versions of JavaScript supported by those browsers.
There is a cost to ensure this browser compatibility, and it comes in the form of larger bundle size. All modern browsers support ES2015 and beyond, but in most cases, you still have to account for users accessing your application from a browser that doesn't. To maximize compatibility, you ship a single bundle that includes all your compiled code, plus any polyfills that may be needed. Users with modern browsers shouldn't pay the price of increased bundle size when used in a modern browser that supports many of the latest features in JavaScript. This is where differential loading comes into play.
To maximize compatibility, you could ship a single bundle that includes all your compiled code, plus any polyfills that may be needed.
Users with modern browsers, however, shouldn't have to pay the price of increased bundle size that comes with polyfills they don't need.
Differential loading, which is supported by default in Angular CLI version 8 and higher, solves this problem.
Differential loading is a strategy where the CLI builds two separate bundles as part of your deployed application.
* The first bundle contains modern ES1015 syntax, takes advantage of built-in support in modern browsers, ships less polyfills, and results in a smaller bundle size.
* The second bundle contains code in the old ES5 syntax, along with all necessary polyfills. This results in a larger bundle size, but supports older browsers.
This strategy allows you to continue to build your web application to support multiple browsers, but only load the necessary code that the browser needs.
Differential loading is a strategy where the CLI builds two separate bundles as part of your deployed application. The modern bundle contains modern syntax, takes advantage of built-in support in modern browsers, ships less polyfills, and results in a smaller bundle size. The second bundle, includes the additional compiled code, all necessary polyfills, and results in a larger bundle size. This strategy allows you to continue to build your web application to support multiple browsers, but only load the necessary code that the browser needs.
### Differential builds
The Angular CLI handles differential loading for you as part of the _build_ process for deployment.
The `ng build` command produces the necessary bundles used for differential loading, based on your browser support requirements and compilation target.
The Angular CLI handles differential loading for you as part of the _build_ process for deployment. The Angular CLI will produce the necessary bundles used for differential loading, based on your browser support requirements and compilation target.
The Angular CLI uses two configurations for differential loading:
* Browsers list
The `browserslist` configuration file is included in your application [project structure](guide/file-structure#application-configuration-files) and provides the minimum browsers your application supports. See the [Browserslist spec](https://github.com/browserslist/browserslist) for complete configuration options.
* TypeScript configuration
In the TypeScript configuration file, `tsconfig.json`, the `target` in the `compilerOptions` section determines the ECMAScript target version that the code is compiled to.
Modern browsers support ES2015 natively, while ES5 is more commonly used to support legacy browsers.
- Browserslist - The `browserslist` configuration file is included in your application [project structure](guide/file-structure#application-configuration-files) and provides the minimum browsers your application supports. See the [Browserslist spec](https://github.com/browserslist/browserslist) for complete configuration options.
- tsconfig.json - The `target` in the TypeScript `compilerOptions` determines the ECMAScript target version that the code is compiled to. Modern browsers support ES2015 natively, while ES5 is more commonly used to support legacy browsers.
<div class="alert is-helpful">
Differential loading is currently only supported when using `es2015` as a compilation `target`. When used with targets higher than `es2015`, a warning is emitted during build time.
**Note:** Differential loading is currently only supported when using `es2015` as a compilation `target`. When used with targets higher than `es2015`, a warning is emitted during build time.
</div>
The CLI queries the Browserslist configuration, and checks the `target` to determine if support for legacy browsers is required.
The combination of these two configurations determines whether multiple bundles are produced when you create a _build_.
When you create a development build using [`ng build`](cli/build) and differential loading is enabled, the output produced is simpler and easier to debug, allowing you to rely less on sourcemaps of compiled code.
When you create a production build using [`ng build --prod`](cli/build), the CLI uses the defined configurations above to determine the bundles to build for deployment of your application.
The CLI queries the Browserslist configuration, and checks the `target` to determine if support for legacy browsers is required. The combination of these two configurations determines whether multiple bundles are produced when you create a _build_. When you create a development build using [`ng build`](cli/build) and differential loading is enabled, the output produced is simpler and easier to debug, allowing you to rely less on sourcemaps of compiled code. When you create a production build using [`ng build --prod`](cli/build), the CLI uses the defined configurations above to determine the bundles to build for deployment of your application.
The `index.html` file is also modified during the build process to include script tags that enable differential loading. See the sample output below from the `index.html` file produced during a build using `ng build`.
<code-example language="html" format="." linenums="false">
```html
<!-- ... -->
<body>
<app-root></app-root>
@ -461,14 +413,13 @@ The `index.html` file is also modified during the build process to include scrip
<script src="main-es5.js" nomodule></script>
</body>
<!-- ... -->
```
</code-example>
Each script tag has a `type="module"` or `nomodule` attribute. Browsers with native support for ES modules only load the scripts with the `module` type attribute and ignore scripts with the `nomodule` attribute. Legacy browsers only load the scripts with the `nomodule` attribute, and ignore the script tags with the `module` type that load ES modules.
Each script tag has a `type="module"` or `nomodule` attribute. Browsers with native support for ES modules only load the scripts with the `module` type attribute and ignore scripts with the `nomodule` attribute. Legacy browsers only load the scripts with the `nomodule` attribute, and ignore the script tags with the `module` type that load ES modules.
<div class="alert is-helpful">
Some legacy browsers still download both bundles, but only execute the appropriate scripts based on the attributes mentioned above. You can read more on the issue [here](https://github.com/philipwalton/webpack-esnext-boilerplate/issues/1).
**Note:** Some legacy browsers still download both bundles, but only execute the appropriate scripts based on the attributes mentioned above. You can read more on the issue [here](https://github.com/philipwalton/webpack-esnext-boilerplate/issues/1).
</div>
@ -476,10 +427,11 @@ See the [configuration table](#configuration-table) below for the configurations
### Configuring differential loading
Differential loading is supported by default with version 8 and later of the Angular CLI.
For each application project in your workspace, you can configure how builds are produced based on the `browserslist` and `tsconfig.json` files in your application project.
Differential loading for creating builds is already supported with version 8 and later of the Angular CLI. For each application project in your workspace, you can configure how builds are produced based on the mentioned `browserslist` and `tsconfig.json` files in your application project.
For a newly created Angular application, the default `browserslist` looks like this:
Look at the default configuration for a newly created Angular application:
The `browserslist` looks like this:
```
> 0.5%
@ -491,8 +443,8 @@ not IE 9-11 # For IE 9-11 support, remove 'not'.
The `tsconfig.json` looks like this:
<code-example language="json" format="." linenums="false">
```
{
"compileOnSave": false,
"compilerOptions": {
@ -515,14 +467,13 @@ The `tsconfig.json` looks like this:
]
}
}
```
</code-example>
By default, legacy browsers such as IE 9-11 are ignored, and the compilation target is ES2015. As a result, this produces two builds, and differential loading is enabled. If you ignore browsers without ES2015 support, a single build is produced. To see the build result for differential loading based on different configurations, refer to the table below.
By default, legacy browsers such as IE 9-11 are ignored, and the compilation target is ES2015. As a result, this produces two builds, and differential loading is enabled. If you ignore browsers without ES2015 support, a single build is produced. To see the build result for differential loading based on different configurations, refer to the table below.
<div class="alert is-important">
To see which browsers are supported with the above configuration, see which settings meet to your browser support requirements, see the [Browserslist compatibility page](https://browserl.ist/?q=%3E+0.5%25%2C+last+2+versions%2C+Firefox+ESR%2C+Chrome+41%2C+not+dead%2C+not+IE+9-11).
**Note:** To see which browsers are supported with the above configuration, see which settings meet to your browser support requirements, see the [Browserslist compatibility page](https://browserl.ist/?q=%3E+0.5%25%2C+last+2+versions%2C+Firefox+ESR%2C+Chrome+41%2C+not+dead%2C+not+IE+9-11).
</div>
@ -539,151 +490,9 @@ When the ES5 Browserslist result is `disabled`, then ES5 browser support is not
### Opting out of differential loading
Differential loading can be explicitly disabled if it causes unexpected issues or you need to target ES5 specifically for legacy browser support.
Differential loading can be explicitly disabled if it causes unexpected issues or you need to target ES5 specifically for legacy browser support.
To explicitly disable differential loading:
- Enable the `dead` or `IE` browsers in the `browserslist` config file by removing the `not` keyword in front of them.
- Set the `target` in the `compilerOptions` to `es5`.
{@a test-and-serve}
## Local development in older browsers
In Angular CLI version 8 and higher, differential loading is enabled by default for the `ng build` command.
The `ng serve`, `ng test`, and `ng e2e` commands, however, generate a single ES2015 build which cannot run in older browsers that don't support the modules, such as IE 11.
If you want to run ES5 code during development, you could disable differential loading completely.
To maintain the benefits of differential loading, however, a better option is to define multiple configurations for `ng serve`, `ng e2e`, and `ng test`.
{@a differential-serve}
### Configuring serve for ES5
To do this for `ng serve`, create a new file, `tsconfig-es5.app.json` next to `tsconfig.app.json` with the following content.
<code-example language="json" format="." linenums="false">
{
"extends": "./tsconfig.app.json",
"compilerOptions": {
"target": "es5"
}
}
</code-example>
In `angular.json` add two new configuration sections under the `build` and `serve` targets to point to the new TypeScript configuration.
<code-example language="json" format="." linenums="false">
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"tsConfig": "./tsconfig-es5.app.json"
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"browserTarget": "app:build:es5"
}
}
},
</code-example>
You can then run the serve with this configuration.
<code-example language="none" class="code-shell">
ng serve --configuration es5
</code-example>
{@a differential-test}
### Configuring the test command
Create a new file, `tsconfig-es5.spec.json` next to `tsconfig.spec.json` with the following content.
<code-example language="json" format="." linenums="false">
{
"extends": "./tsconfig.spec.json",
"compilerOptions": {
"target": "es5"
}
}
</code-example>
<code-example language="json" format="." linenums="false">
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
...
},
"configurations": {
"es5": {
"tsConfig": "./tsconfig-es5.spec.json"
}
}
},
</code-example>
You can then run the tests with this configuration
<code-example language="none" class="code-shell">
ng test --configuration es5
</code-example>
### Configuring the e2e command
Create an ES5 serve configuration as explained above (link to the above serve section), and configuration an ES5 configuration for the E2E target.
<code-example language="json" format="." linenums="false">
"test": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"devServerTarget": "app:serve:es5"
}
}
},
</code-example>
You can then run the e2e's with this configuration
<code-example language="none" class="code-shell">
ng e2e --configuration es5
</code-example>

View File

@ -19,7 +19,7 @@
"build-local": "yarn ~~build",
"prebuild-with-ivy": "yarn setup-local && node scripts/switch-to-ivy",
"build-with-ivy": "yarn ~~build",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js ab6f36229",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 7da10691d",
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
"test": "yarn check-env && ng test",
"pree2e": "yarn check-env && yarn update-webdriver",
@ -93,8 +93,8 @@
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.801.0-beta.2",
"@angular/cli": "8.1.0-beta.2",
"@angular-devkit/build-angular": "0.800.2",
"@angular/cli": "8.0.2",
"@angular/compiler": "^8.1.0-next.1",
"@angular/compiler-cli": "^8.1.0-next.1",
"@angular/language-service": "^8.1.0-next.1",

View File

@ -2,36 +2,36 @@
"aio": {
"master": {
"uncompressed": {
"runtime-es5": 3042,
"runtime-es2015": 3048,
"main-es5": 511036,
"main-es2015": 450486,
"polyfills-es5": 130136,
"polyfills-es2015": 52931
"runtime-es5": 3005,
"runtime-es2015": 3011,
"main-es5": 511054,
"main-es2015": 450560,
"polyfills-es5": 129161,
"polyfills-es2015": 53295
}
}
},
"aio-local": {
"master": {
"uncompressed": {
"runtime-es5": 3042,
"runtime-es2015": 3048,
"main-es5": 511036,
"main-es2015": 450486,
"polyfills-es5": 130136,
"polyfills-es2015": 52931
"runtime-es5": 3005,
"runtime-es2015": 3011,
"main-es5": 511054,
"main-es2015": 450560,
"polyfills-es5": 129161,
"polyfills-es2015": 53295
}
}
},
"aio-local-ivy": {
"master": {
"uncompressed": {
"runtime-es5": 2932,
"runtime-es2015": 2938,
"main-es5": 565073,
"main-es2015": 583108,
"polyfills-es5": 130136,
"polyfills-es2015": 52931
"runtime-es5": 2895,
"runtime-es2015": 2901,
"main-es5": 564586,
"main-es2015": 582731,
"polyfills-es5": 129161,
"polyfills-es2015": 53295
}
}
}

View File

@ -36,10 +36,9 @@ module.exports = new Package('angular-base', [
.factory('packageInfo', function() { return require(path.resolve(PROJECT_ROOT, 'package.json')); })
.factory(require('./readers/json'))
.factory(require('./services/copyFolder'))
.factory(require('./services/filterPipes'))
.factory(require('./services/filterAmbiguousDirectiveAliases'))
.factory(require('./services/getImageDimensions'))
.factory(require('./services/auto-link-filters/filterPipes'))
.factory(require('./services/auto-link-filters/filterAmbiguousDirectiveAliases'))
.factory(require('./services/auto-link-filters/ignoreHttpInUrls'))
.factory(require('./post-processors/add-image-dimensions'))
.factory(require('./post-processors/auto-link-code'))
@ -129,9 +128,9 @@ module.exports = new Package('angular-base', [
})
.config(function(postProcessHtml, addImageDimensions, autoLinkCode, filterPipes, filterAmbiguousDirectiveAliases, ignoreHttpInUrls) {
.config(function(postProcessHtml, addImageDimensions, autoLinkCode, filterPipes, filterAmbiguousDirectiveAliases) {
addImageDimensions.basePath = path.resolve(AIO_PATH, 'src');
autoLinkCode.customFilters = [ignoreHttpInUrls, filterPipes, filterAmbiguousDirectiveAliases];
autoLinkCode.customFilters = [filterPipes, filterAmbiguousDirectiveAliases];
postProcessHtml.plugins = [
require('./post-processors/autolink-headings'),
addImageDimensions,

View File

@ -38,7 +38,7 @@ module.exports = function autoLinkCode(getDocFromAlias) {
// Only interested in text nodes that are not inside links
if (ancestors.every(ancestor => !is(ancestor, 'a'))) {
const parent = ancestors[ancestors.length - 1];
const parent = ancestors[ancestors.length-1];
const index = parent.children.indexOf(node);
// Can we convert the whole text node into a doc link?
@ -66,7 +66,6 @@ module.exports = function autoLinkCode(getDocFromAlias) {
});
};
}
function foundValidDoc(docs) {
return docs.length === 1 &&
!docs[0].internal &&

View File

@ -1,12 +0,0 @@
/**
* This service is used by the autoLinkCode post-processor to ignore the `http(s)` part in URLs
* (i.e. `http://...` or `https://...`).
*/
module.exports = function ignoreHttpInUrls() {
const ignoredSchemes = ['http', 'https'];
return (docs, words, index) => {
const httpInUrl = ignoredSchemes.includes(words[index]) && (words[index + 1] === '://');
return httpInUrl ? [] : docs;
};
};

View File

@ -1,49 +0,0 @@
const ignoreHttpInUrls = require('./ignoreHttpInUrls')();
describe('ignoreHttpInUrls', () => {
it('should ignore all docs when matching `http` in `http://...`', () => {
const docs = [{ docType: 'package', name: 'http' }, { docType: 'class', name: 'Foo' }];
const words1 = ['http', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words1, 0)).toEqual([]);
const words2 = ['URL', ': ', 'http', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words2, 2)).toEqual([]);
});
it('should ignore all docs when matching `https` in `https://...`', () => {
const docs = [{ docType: 'package', name: 'https' }, { docType: 'class', name: 'Foo' }];
const words1 = ['https', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words1, 0)).toEqual([]);
const words2 = ['URL', ': ', 'https', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words2, 2)).toEqual([]);
});
it('should keep all docs when not matching `http(s)`', () => {
const docs = [{ docType: 'package', name: 'http' }, { docType: 'class', name: 'Foo' }];
const words1 = ['http', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words1, 2)).toEqual(docs);
const words2 = ['URL', ': ', 'https', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words2, 0)).toEqual(docs);
const words3 = ['file', '://', 'example', '.', 'com', '/'];
expect(ignoreHttpInUrls(docs, words3, 0)).toEqual(docs);
});
it('should keep all docs when not matching `http(s)` at the beginning of a URL', () => {
const docs = [{ docType: 'package', name: 'http' }, { docType: 'class', name: 'Foo' }];
const words1 = ['http', ' ', 'is', ' ', 'cool'];
expect(ignoreHttpInUrls(docs, words1, 0)).toEqual(docs);
const words2 = ['https', ' ', 'is', ' ', 'cooler'];
expect(ignoreHttpInUrls(docs, words2, 0)).toEqual(docs);
const words3 = ['http', '://', 'http', '.', 'com'];
expect(ignoreHttpInUrls(docs, words3, 2)).toEqual(docs);
});
});

View File

@ -1,6 +1,6 @@
/**
* This service is used by the autoLinkCode post-processor to filter out pipe docs
* This service is used by the autoLinkCode post-processors to filter out pipe docs
* where the matching word is the pipe name and is not preceded by a pipe
*/
module.exports = function filterPipes() {

File diff suppressed because it is too large Load Diff

View File

@ -81,9 +81,6 @@ See also: [`//.bazelrc`](https://github.com/angular/angular/blob/master/.bazelrc
The process should automatically connect to the debugger. For additional info and testing options, see the [nodejs_test documentation](https://bazelbuild.github.io/rules_nodejs/node/node.html#nodejs_test).
- Click on "Resume script execution" to let the code run until the first `debugger` statement or a previously set breakpoint.
- If you're debugging an ivy test and you want to inspect the generated template instructions, find the template of your component in the call stack and click on `(source mapped from [CompName].js)` at the bottom of the code. You can also disable sourcemaps in the options or go to sources and look into ng:// namespace to see all the generated code.
### Debugging a Node Test in VSCode
First time setup:

View File

@ -37,7 +37,7 @@ We explicitly don't consider the following to be our public API surface:
- any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other documented package entry-points.
- constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and double barred latin o (`ɵɵ`).
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and double barred latin o, aka "frog eyes" (`ɵɵ`).
- extending any of our classes unless the support for this is specifically documented in the API docs
- the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed)

View File

@ -12,7 +12,7 @@
"master": {
"uncompressed": {
"runtime": 1440,
"main": 14664,
"main": 14487,
"polyfills": 43567
}
}
@ -21,7 +21,7 @@
"master": {
"uncompressed": {
"runtime": 1440,
"main": 149248,
"main": 149205,
"polyfills": 43567
}
}
@ -34,4 +34,4 @@
}
}
}
}
}

View File

@ -24,8 +24,6 @@
"node_modules/@angular/compiler-cli/**",
"node_modules/@angular/**/testing/**",
"node_modules/@angular/common/upgrade*",
"node_modules/@angular/router/upgrade*",
"node_modules/@angular/cdk/schematics*",
"node_modules/@angular/material/schematics*"
"node_modules/@angular/router/upgrade*"
]
}

View File

@ -1,32 +0,0 @@
{
"seq": 0,
"type": "response",
"command": "definitionAndBoundSpan",
"request_seq": 2,
"success": true,
"body": {
"definitions": [
{
"file": "${PWD}/project/app/app.component.ts",
"start": {
"line": 7,
"offset": 30
},
"end": {
"line": 7,
"offset": 47
}
}
],
"textSpan": {
"start": {
"line": 7,
"offset": 30
},
"end": {
"line": 7,
"offset": 47
}
}
}
}

View File

@ -1,22 +0,0 @@
{
"seq": 0,
"type": "response",
"command": "quickinfo",
"request_seq": 4,
"success": true,
"body": {
"kind": "const",
"kindModifiers": "declare",
"start": {
"line": 1,
"offset": 17
},
"end": {
"line": 1,
"offset": 21
},
"displayString": "const name: never",
"documentation": "",
"tags": []
}
}

View File

@ -2,6 +2,6 @@ import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Hello {{name}}</h1><my-widget></my-widget>`,
template: `<h1>Hello {{name}}</h1>`,
})
export class AppComponent { name = 'Angular'; }

View File

@ -2,11 +2,10 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { WidgetComponent } from './widget.component';
@NgModule({
imports: [ BrowserModule ],
declarations: [ AppComponent, WidgetComponent ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }

View File

@ -1 +0,0 @@
<h1>This is a {{name}} widget!</h1>

View File

@ -1,7 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-widget',
templateUrl: './widget.component.html',
})
export class WidgetComponent { name = 'Angular'; }

View File

@ -8,9 +8,6 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"plugins": [
{"name": "@angular/language-service"}
]
"suppressImplicitAnyIndexErrors": true
}
}

View File

@ -13,6 +13,7 @@ describe('Angular Language Service', () => {
beforeEach(() => {
jasmine.addMatchers(goldenMatcher);
server = fork(SERVER_PATH, [
'--globalPlugins', '@angular/language-service',
'--logVerbosity', 'verbose',
'--logFile', join(PWD, 'tsserver.log'),
], {
@ -117,17 +118,6 @@ describe('Angular Language Service', () => {
offset: 28,
});
expect(resp2).toMatchGolden('quickinfo.json');
client.sendRequest('open', {
file: `${PWD}/project/app/widget.component.html`,
});
const resp3 = await client.sendRequest('quickinfo', {
file: `${PWD}/project/app/widget.component.html`,
line: 1,
offset: 19,
});
expect(resp3).toMatchGolden('quickinfo_externalTemplate.json');
});
it('should perform definition', async () => {
@ -149,25 +139,4 @@ describe('Angular Language Service', () => {
});
expect(resp2).toMatchGolden('definition.json');
});
it('should perform definitionAndBoundSpan', async () => {
client.sendRequest('open', {
file: `${PWD}/project/app/app.component.ts`,
});
const resp1 = await client.sendRequest('reload', {
file: `${PWD}/project/app/app.component.ts`,
tmpFile: `${PWD}/project/app/app.component.ts`,
}) as any;
expect(resp1.command).toBe('reload');
expect(resp1.success).toBe(true);
const resp2 = await client.sendRequest('definitionAndBoundSpan', {
file: `${PWD}/project/app/app.component.ts`,
line: 5,
offset: 28,
});
expect(resp2).toMatchGolden('definitionAndBoundSpan.json');
});
});

View File

@ -3,12 +3,12 @@
"@angular/core@file:../../dist/packages-dist/core":
version "8.0.0-beta.13"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/language-service@file:../../dist/packages-dist/language-service":
version "8.0.0-beta.13"
version "7.2.0"
"@types/node@file:../../node_modules/@types/node":
version "10.9.4"
@ -61,16 +61,16 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
jasmine-core@~3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.3.0.tgz#dea1cdc634bc93c7e0d4ad27185df30fa971b10e"
integrity sha512-3/xSmG/d35hf80BEN66Y6g9Ca5l/Isdeg/j6zvbTYlTzeKinzmaTM4p9am5kYqOmE05D7s1t8FGjzdSnbUbceA==
jasmine-core@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c"
integrity sha1-pHheE11d9lAk38kiSVPfWFvSdmw=
"jasmine@file:../../node_modules/jasmine":
version "3.3.1"
version "3.1.0"
dependencies:
glob "^7.0.6"
jasmine-core "~3.3.0"
jasmine-core "~3.1.0"
minimatch@^3.0.4:
version "3.0.4"
@ -97,7 +97,7 @@ tslib@^1.9.0:
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
"typescript@file:../../node_modules/typescript":
version "3.4.2"
version "3.2.2"
wrappy@1:
version "1.0.2"

View File

@ -4,13 +4,13 @@
"license": "MIT",
"dependencies": {
"@angular/animations": "file:../../dist/packages-dist/animations",
"@angular/cdk": "^8.0.0",
"@angular/cdk": "^7.0.0-rc.1",
"@angular/common": "file:../../dist/packages-dist/common",
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/forms": "file:../../dist/packages-dist/forms",
"@angular/material": "8.0.0",
"@angular/material": "7.0.0-rc.1",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../../dist/packages-dist/router",

View File

@ -61,12 +61,6 @@ if [[ $? != 0 ]]; then exit 1; fi
grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm5/table.es5.js
if [[ $? != 0 ]]; then exit 1; fi
# Did it generate a base definition for undecorated classes with inputs and view queries?
grep "_MatMenuBase.ngBaseDef = ɵngcc0.ɵɵdefineBase({ inputs: {" node_modules/@angular/material/esm2015/menu.js
if [[ $? != 0 ]]; then exit 1; fi
grep "_MatMenuBase.ngBaseDef = ɵngcc0.ɵɵdefineBase({ inputs: {" node_modules/@angular/material/esm5/menu.es5.js
if [[ $? != 0 ]]; then exit 1; fi
# Can it be safely run again (as a noop)?
# And check that it logged skipping compilation as expected
ivy-ngcc -l debug | grep 'Skipping'

View File

@ -3,26 +3,26 @@
"@angular/animations@file:../../dist/packages-dist/animations":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/cdk@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0.tgz#34ca95e71d71780b29b5ba07318c88c4577bdc25"
integrity sha512-2vsRWEHNARe0iRmqgzvM67gwfRy+aKvdef4Qu9L+ndSsTrrZT3tSgG8SMn1v9SfBHnx5G8mo4d1AMquXG69AuQ==
"@angular/cdk@^7.0.0-rc.1":
version "7.0.2"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-7.0.2.tgz#35081cd27a8f5214568b6ad1acf8cb3b3c315f99"
integrity sha512-MAugJsjQ3ye2RX7vNjd9IN1c7enAxJaCz9UZBFuzfo/pNxvjaEObFmF2NUKyU1DctknqjyOzZYYg0e+bBxrBbQ==
dependencies:
tslib "^1.7.1"
optionalDependencies:
parse5 "^5.0.0"
"@angular/common@file:../../dist/packages-dist/common":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
canonical-path "1.0.0"
chokidar "^2.1.1"
@ -34,42 +34,44 @@
shelljs "^0.8.1"
source-map "^0.6.1"
tslib "^1.9.0"
yargs "13.1.0"
yargs "9.0.1"
"@angular/compiler@file:../../dist/packages-dist/compiler":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/core@file:../../dist/packages-dist/core":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/forms@file:../../dist/packages-dist/forms":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/material@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0.tgz#21dd15c318d1e29eb4d1a2dd888ddb027897eb49"
integrity sha512-c7O7GhZd46xF2WB6T/YPam5lJkTgQLdIS53IqwZIFhL427+SEfPvejVzRnVfZCI3NdrKiWt/5VsvtQZwWzlGvw==
"@angular/material@7.0.0-rc.1":
version "7.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-7.0.0-rc.1.tgz#e9a88c8b6f6b48b87ed3d1da3037d14a0e3e8290"
integrity sha512-4LC3y5ZorNjdF1lEkVN/3zwOEnBwjfWLCY92tA06Kdvs1yENZdu0fGTRwcu9Hz4y+t84sL/KEKC9VjKN3Z7PSg==
dependencies:
tslib "^1.7.1"
optionalDependencies:
parse5 "^5.0.0"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
"@angular/router@file:../../dist/packages-dist/router":
version "8.1.0-beta.0"
version "8.0.0-beta.10"
dependencies:
tslib "^1.9.0"
@ -148,11 +150,6 @@ ansi-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
ansi-styles@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
@ -520,10 +517,10 @@ camelcase@^3.0.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo=
camelcase@^5.0.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
camelcase@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=
canonical-path@1.0.0:
version "1.0.0"
@ -620,15 +617,6 @@ cliui@^3.2.0:
strip-ansi "^3.0.1"
wrap-ansi "^2.0.0"
cliui@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==
dependencies:
string-width "^2.1.1"
strip-ansi "^4.0.0"
wrap-ansi "^2.0.0"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
@ -747,14 +735,12 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
cross-spawn@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=
dependencies:
nice-try "^1.0.4"
path-key "^2.0.1"
semver "^5.5.0"
lru-cache "^4.0.1"
shebang-command "^1.2.0"
which "^1.2.9"
@ -791,7 +777,7 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"
decamelize@^1.1.1, decamelize@^1.2.0:
decamelize@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
@ -903,23 +889,11 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
encodeurl@~1.0.1, encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
end-of-stream@^1.1.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==
dependencies:
once "^1.4.0"
engine.io-client@~3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36"
@ -999,13 +973,13 @@ eventemitter3@1.x.x:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
integrity sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
execa@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=
dependencies:
cross-spawn "^6.0.0"
get-stream "^4.0.0"
cross-spawn "^5.0.1"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
@ -1152,12 +1126,12 @@ find-up@^1.0.0:
path-exists "^2.0.0"
pinkie-promise "^2.0.0"
find-up@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
find-up@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
dependencies:
locate-path "^3.0.0"
locate-path "^2.0.0"
follow-redirects@^1.2.5:
version "1.5.9"
@ -1260,17 +1234,10 @@ get-caller-file@^1.0.1:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
get-caller-file@^2.0.1:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
get-stream@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
dependencies:
pump "^3.0.0"
get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
@ -1520,11 +1487,6 @@ invert-kv@^1.0.0:
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY=
invert-kv@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==
is-accessor-descriptor@^0.1.6:
version "0.1.6"
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
@ -1878,13 +1840,6 @@ lcid@^1.0.0:
dependencies:
invert-kv "^1.0.0"
lcid@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==
dependencies:
invert-kv "^2.0.0"
lie@~3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a"
@ -1919,6 +1874,16 @@ load-json-file@^1.0.0:
pinkie-promise "^2.0.0"
strip-bom "^2.0.0"
load-json-file@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
dependencies:
graceful-fs "^4.1.2"
parse-json "^2.2.0"
pify "^2.0.0"
strip-bom "^3.0.0"
localtunnel@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/localtunnel/-/localtunnel-1.9.1.tgz#1d1737eab658add5a40266d8e43f389b646ee3b1"
@ -1929,12 +1894,12 @@ localtunnel@1.9.1:
openurl "1.1.1"
yargs "6.6.0"
locate-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
dependencies:
p-locate "^3.0.0"
p-locate "^2.0.0"
path-exists "^3.0.0"
lodash.debounce@^4.0.8:
@ -1952,6 +1917,14 @@ lodash@^4.11.1, lodash@^4.17.10, lodash@^4.5.1:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
lru-cache@^4.0.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
magic-string@^0.25.0:
version "0.25.1"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e"
@ -1959,13 +1932,6 @@ magic-string@^0.25.0:
dependencies:
sourcemap-codec "^1.4.1"
map-age-cleaner@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==
dependencies:
p-defer "^1.0.0"
map-cache@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
@ -1983,14 +1949,12 @@ math-random@^1.0.1:
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w=
mem@^4.0.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178"
integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==
mem@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=
dependencies:
map-age-cleaner "^0.1.1"
mimic-fn "^2.0.0"
p-is-promise "^2.0.0"
mimic-fn "^1.0.0"
micromatch@2.3.11:
version "2.3.11"
@ -2047,10 +2011,10 @@ mime@1.4.1:
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==
mimic-fn@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
minimatch@^3.0.2, minimatch@^3.0.4:
version "3.0.4"
@ -2160,11 +2124,6 @@ negotiator@0.6.1:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
node-pre-gyp@^0.10.0:
version "0.10.3"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc"
@ -2304,7 +2263,7 @@ on-finished@~2.3.0:
dependencies:
ee-first "1.1.1"
once@^1.3.0, once@^1.3.1, once@^1.4.0:
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
@ -2343,14 +2302,14 @@ os-locale@^1.4.0:
dependencies:
lcid "^1.0.0"
os-locale@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==
os-locale@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==
dependencies:
execa "^1.0.0"
lcid "^2.0.0"
mem "^4.0.0"
execa "^0.7.0"
lcid "^1.0.0"
mem "^1.1.0"
os-tmpdir@^1.0.0, os-tmpdir@~1.0.1:
version "1.0.2"
@ -2365,39 +2324,29 @@ osenv@^0.1.4:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
p-defer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
p-is-promise@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e"
integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==
p-limit@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2"
integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==
p-limit@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
dependencies:
p-try "^2.0.0"
p-try "^1.0.0"
p-locate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
dependencies:
p-limit "^2.0.0"
p-limit "^1.1.0"
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
pako@~1.0.2:
version "1.0.10"
@ -2477,7 +2426,7 @@ path-is-inside@^1.0.1:
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=
path-key@^2.0.0, path-key@^2.0.1:
path-key@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
@ -2496,6 +2445,13 @@ path-type@^1.0.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
path-type@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
dependencies:
pify "^2.0.0"
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
@ -2560,19 +2516,16 @@ process-nextick-args@~2.0.0:
webdriver-js-extender "2.1.0"
webdriver-manager "^12.0.6"
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
psl@^1.1.24:
version "1.1.29"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@ -2640,6 +2593,14 @@ read-pkg-up@^1.0.1:
find-up "^1.0.0"
read-pkg "^1.0.0"
read-pkg-up@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
dependencies:
find-up "^2.0.0"
read-pkg "^2.0.0"
read-pkg@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
@ -2649,6 +2610,15 @@ read-pkg@^1.0.0:
normalize-package-data "^2.3.2"
path-type "^1.0.0"
read-pkg@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
dependencies:
load-json-file "^2.0.0"
normalize-package-data "^2.3.2"
path-type "^2.0.0"
readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
@ -2749,11 +2719,6 @@ require-main-filename@^1.0.1:
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=
require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
requires-port@1.x.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
@ -2857,11 +2822,6 @@ selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
semver@^5.5.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
send@0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
@ -3177,7 +3137,7 @@ string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
"string-width@^1.0.2 || 2", string-width@^2.1.1:
"string-width@^1.0.2 || 2", string-width@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
@ -3185,15 +3145,6 @@ string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
string-width@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
dependencies:
emoji-regex "^7.0.1"
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
@ -3222,13 +3173,6 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
dependencies:
ansi-regex "^4.1.0"
strip-bom@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
@ -3236,6 +3180,11 @@ strip-bom@^2.0.0:
dependencies:
is-utf8 "^0.2.0"
strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
@ -3357,7 +3306,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
"typescript@file:../../node_modules/typescript":
version "3.4.2"
version "3.3.3333"
ua-parser-js@0.7.17:
version "0.7.17"
@ -3553,24 +3502,16 @@ y18n@^3.2.1:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
y18n@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
yallist@^3.0.0, yallist@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"
integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=
yargs-parser@^13.0.0:
version "13.1.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.0.tgz#7016b6dd03e28e1418a510e258be4bff5a31138f"
integrity sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA==
dependencies:
camelcase "^5.0.0"
decamelize "^1.2.0"
yargs-parser@^4.1.0, yargs-parser@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"
@ -3578,22 +3519,12 @@ yargs-parser@^4.1.0, yargs-parser@^4.2.0:
dependencies:
camelcase "^3.0.0"
yargs@13.1.0:
version "13.1.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.1.0.tgz#b2729ce4bfc0c584939719514099d8a916ad2301"
integrity sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg==
yargs-parser@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9"
integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k=
dependencies:
cliui "^4.0.0"
find-up "^3.0.0"
get-caller-file "^2.0.1"
os-locale "^3.1.0"
require-directory "^2.1.1"
require-main-filename "^2.0.0"
set-blocking "^2.0.0"
string-width "^3.0.0"
which-module "^2.0.0"
y18n "^4.0.0"
yargs-parser "^13.0.0"
camelcase "^4.1.0"
yargs@6.4.0:
version "6.4.0"
@ -3634,10 +3565,29 @@ yargs@6.6.0:
y18n "^3.2.1"
yargs-parser "^4.2.0"
yargs@9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c"
integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=
dependencies:
camelcase "^4.1.0"
cliui "^3.2.0"
decamelize "^1.1.1"
get-caller-file "^1.0.1"
os-locale "^2.0.0"
read-pkg-up "^2.0.0"
require-directory "^2.1.1"
require-main-filename "^1.0.1"
set-blocking "^2.0.0"
string-width "^2.0.0"
which-module "^2.0.0"
y18n "^3.2.1"
yargs-parser "^7.0.0"
yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk=
"zone.js@file:../../node_modules/zone.js":
version "0.9.1"
version "0.9.0"

View File

@ -1,3 +1,147 @@
import "rxjs";
import { Subject, Subscription } from "rxjs";
import "rxjs/operators";
function getGlobal() {
const __globalThis = "undefined" !== typeof globalThis && globalThis;
const __window = "undefined" !== typeof window && window;
const __self = "undefined" !== typeof self && "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self;
const __global = "undefined" !== typeof global && global;
return __globalThis || __global || __window || __self;
}
const _global = getGlobal();
let _symbolIterator = null;
function getSymbolIterator() {
if (!_symbolIterator) {
const Symbol = _global["Symbol"];
if (Symbol && Symbol.iterator) _symbolIterator = Symbol.iterator; else {
const keys = Object.getOwnPropertyNames(Map.prototype);
for (let i = 0; i < keys.length; ++i) {
const key = keys[i];
if ("entries" !== key && "size" !== key && Map.prototype[key] === Map.prototype["entries"]) _symbolIterator = key;
}
}
}
return _symbolIterator;
}
if ("undefined" === typeof ngI18nClosureMode) _global["ngI18nClosureMode"] = "undefined" !== typeof goog && "function" === typeof goog.getMsg;
function flatten(list, dst) {
if (void 0 === dst) dst = list;
for (let i = 0; i < list.length; i++) {
let item = list[i];
if (Array.isArray(item)) {
if (dst === list) dst = list.slice(0, i);
flatten(item, dst);
} else if (dst !== list) dst.push(item);
}
return dst;
}
class EventEmitter extends Subject {
constructor(isAsync = false) {
super();
this.__isAsync = isAsync;
}
emit(value) {
super.next(value);
}
subscribe(generatorOrNext, error, complete) {
let schedulerFn;
let errorFn = err => null;
let completeFn = () => null;
if (generatorOrNext && "object" === typeof generatorOrNext) {
schedulerFn = this.__isAsync ? value => {
setTimeout(() => generatorOrNext.next(value));
} : value => {
generatorOrNext.next(value);
};
if (generatorOrNext.error) errorFn = this.__isAsync ? err => {
setTimeout(() => generatorOrNext.error(err));
} : err => {
generatorOrNext.error(err);
};
if (generatorOrNext.complete) completeFn = this.__isAsync ? () => {
setTimeout(() => generatorOrNext.complete());
} : () => {
generatorOrNext.complete();
};
} else {
schedulerFn = this.__isAsync ? value => {
setTimeout(() => generatorOrNext(value));
} : value => {
generatorOrNext(value);
};
if (error) errorFn = this.__isAsync ? err => {
setTimeout(() => error(err));
} : err => {
error(err);
};
if (complete) completeFn = this.__isAsync ? () => {
setTimeout(() => complete());
} : () => {
complete();
};
}
const sink = super.subscribe(schedulerFn, errorFn, completeFn);
if (generatorOrNext instanceof Subscription) generatorOrNext.add(sink);
return sink;
}
}
class QueryList {
constructor() {
this.dirty = true;
this._results = [];
this.changes = new EventEmitter();
this.length = 0;
}
map(fn) {
return this._results.map(fn);
}
filter(fn) {
return this._results.filter(fn);
}
find(fn) {
return this._results.find(fn);
}
reduce(fn, init) {
return this._results.reduce(fn, init);
}
forEach(fn) {
this._results.forEach(fn);
}
some(fn) {
return this._results.some(fn);
}
toArray() {
return this._results.slice();
}
[getSymbolIterator()]() {
return this._results[getSymbolIterator()]();
}
toString() {
return this._results.toString();
}
reset(resultsTree) {
this._results = flatten(resultsTree);
this.dirty = false;
this.length = this._results.length;
this.last = this._results[this.length - 1];
this.first = this._results[0];
}
notifyOnChanges() {
this.changes.emit(this);
}
setDirty() {
this.dirty = true;
}
destroy() {
this.changes.complete();
this.changes.unsubscribe();
}
}

View File

@ -3,3 +3,15 @@ import "tslib";
import "rxjs";
import "rxjs/operators";
function getGlobal() {
var __globalThis = "undefined" !== typeof globalThis && globalThis;
var __window = "undefined" !== typeof window && window;
var __self = "undefined" !== typeof self && "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self;
var __global = "undefined" !== typeof global && global;
return __globalThis || __global || __window || __self;
}
var _global = getGlobal();
if ("undefined" === typeof ngI18nClosureMode) _global["ngI18nClosureMode"] = "undefined" !== typeof goog && "function" === typeof goog.getMsg;

View File

@ -1,73 +0,0 @@
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_library")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
ng_module(
name = "application_lib",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
),
deps = [
"//packages:types",
"//packages/common",
"//packages/core",
"//packages/platform-browser",
"@npm//rxjs",
],
)
ts_library(
name = "perf_lib",
testonly = 1,
srcs = ["benchmark_perf.spec.ts"],
deps = [
"//modules/e2e_util",
"@npm//protractor",
],
)
ng_rollup_bundle(
name = "bundle",
entry_point = ":index.ts",
deps = [
":application_lib",
"@npm//rxjs",
],
)
ts_devserver(
name = "prodserver",
static_files = [
":bundle.min_debug.js",
":bundle.min.js",
"@npm//node_modules/zone.js:dist/zone.js",
"index.html",
],
)
ts_devserver(
name = "devserver",
entry_module = "angular/modules/benchmarks/src/expanding_rows/index",
index_html = "index.html",
scripts = [
"@npm//node_modules/tslib:tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
serving_path = "/index.js",
static_files = [
"@npm//node_modules/zone.js:dist/zone.js",
"index.html",
],
deps = [":application_lib"],
)
benchmark_test(
name = "perf",
server = ":prodserver",
deps = [
":perf_lib",
],
)

View File

@ -1,78 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {CommonModule} from '@angular/common';
import {AfterViewInit, Component, NgModule, ViewChild, ViewEncapsulation} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {BenchmarkModule} from './benchmark_module';
import {BenchmarkableExpandingRow} from './benchmarkable_expanding_row';
import {BenchmarkableExpandingRowModule} from './benchmarkable_expanding_row_module';
@Component({
selector: 'benchmark-root',
encapsulation: ViewEncapsulation.None,
template: `
<h2>cfc-expanding-row initialization benchmark</h2>
<section>
<button id="reset" (click)="reset()">Reset</button>
<button id="init" (click)="init()">Init</button>
<button id="run" (click)="runAll()">Run All</button>
</section>
<benchmark-area>
<benchmarkable-expanding-row></benchmarkable-expanding-row>
</benchmark-area>`,
})
export class InitializationRoot implements AfterViewInit {
@ViewChild(BenchmarkableExpandingRow, {static: true})
expandingRow !: BenchmarkableExpandingRow;
ngAfterViewInit() {}
reset() { this.expandingRow.reset(); }
init() { this.expandingRow.init(); }
async runAll() {
await execTimed('initialization_benchmark', async() => { await this.doInit(); });
}
async handleInitClick() { await this.doInit(); }
private async doInit() {
await execTimed('initial_load', async() => { this.expandingRow.init(); });
}
}
@NgModule({
declarations: [InitializationRoot],
exports: [InitializationRoot],
imports: [
CommonModule,
BenchmarkableExpandingRowModule,
BenchmarkModule,
BrowserModule,
],
bootstrap: [InitializationRoot],
})
// Component benchmarks must export a BenchmarkModule.
export class ExpandingRowBenchmarkModule {
}
export async function execTimed(description: string, func: () => Promise<void>) {
console.time(description);
await func();
await nextTick(200);
console.timeEnd(description);
}
export async function nextTick(delay = 1) {
return new Promise((res, rej) => { setTimeout(() => { res(); }, delay); });
}

View File

@ -1,51 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component, ErrorHandler, Injectable, NgModule} from '@angular/core';
@Component({
selector: 'benchmark-area',
template: '<ng-content></ng-content>',
styles: [`
:host {
padding: 1;
margin: 1;
background-color: white;
width: 1000px;
display: block;
}`],
host: {
'class': 'cfc-ng2-region',
}
})
export class BenchmarkArea {
}
declare interface ExtendedWindow extends Window { benchmarkErrors?: string[]; }
const extendedWindow = window as ExtendedWindow;
@Injectable({providedIn: 'root'})
export class BenchmarkErrorHandler implements ErrorHandler {
handleError(error: Error) {
if (!extendedWindow.benchmarkErrors) {
extendedWindow.benchmarkErrors = [];
}
extendedWindow.benchmarkErrors.push(error.message);
console.error(error);
}
}
@NgModule({
declarations: [BenchmarkArea],
exports: [BenchmarkArea],
providers: [
{provide: ErrorHandler, useClass: BenchmarkErrorHandler},
]
})
export class BenchmarkModule {
}

View File

@ -1,26 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {$, browser} from 'protractor';
import {runBenchmark} from '../../../e2e_util/perf_util';
describe('benchmarks', () => {
it('should work for create', done => {
browser.rootEl = '#root';
runBenchmark({
id: 'create',
url: '',
ignoreBrowserSynchronization: true,
params: [],
prepare: () => $('#reset').click(),
work: () => $('#init').click()
}).then(done, done.fail);
});
});

View File

@ -1,73 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component} from '@angular/core';
export interface MlbTeam {
name: string;
id: number;
division: string;
stadium: string;
projection: string;
}
@Component({
selector: 'benchmarkable-expanding-row',
template: `
<cfc-expanding-row-host *ngIf="showExpandingRow">
<cfc-expanding-row *ngFor="let team of teams" [rowId]="$any(team.id)">
<cfc-expanding-row-summary>
Team {{team.id}}
</cfc-expanding-row-summary>
<cfc-expanding-row-details-caption>
{{team.name}}
<a href="https://www.google.com" class="cfc-demo-expanding-row-caption-link">
{{team.id}}
</a>
</cfc-expanding-row-details-caption>
<cfc-expanding-row-details-content>
<ul ace-list>
<li>Division: {{team.division}}</li>
<li>
<a href="https://www.google.com">{{team.stadium}}</a>
</li>
<li>Projected Record: {{team.projection}}</li>
</ul>
</cfc-expanding-row-details-content>
</cfc-expanding-row>
</cfc-expanding-row-host>`,
})
export class BenchmarkableExpandingRow {
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
showExpandingRow !: boolean;
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
teams !: MlbTeam[];
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
private fakeTeams !: MlbTeam[];
init(): void {
this.teams = this.fakeTeams;
this.showExpandingRow = true;
}
reset(numItems = 5000): void {
this.showExpandingRow = false;
this.fakeTeams = [];
for (let i = 0; i < numItems; i++) {
this.fakeTeams.push({
name: `name ${i}`,
id: i,
division: `division ${i}`,
stadium: `stadium ${i}`,
projection: `projection ${i}`,
});
}
}
}

View File

@ -1,24 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {BenchmarkableExpandingRow} from './benchmarkable_expanding_row';
import {ExpandingRowModule} from './expanding_row_module';
@NgModule({
declarations: [BenchmarkableExpandingRow],
exports: [BenchmarkableExpandingRow],
imports: [
CommonModule,
ExpandingRowModule,
],
})
export class BenchmarkableExpandingRowModule {
}

View File

@ -1,355 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Inject, InjectionToken, Input, Output, QueryList, ViewChild} from '@angular/core';
import {expanding_row_css} from './expanding_row_css';
import {ExpandingRowSummary} from './expanding_row_summary';
import {ExpandingRowToggleEvent} from './expanding_row_toggle_event';
/**
* Injection token to break cylic dependency between ExpandingRow and
* ExpandingRowHost
*/
export const EXPANDING_ROW_HOST_INJECTION_TOKEN =
new InjectionToken<ExpandingRowHostBase>('ExpandingRowHost');
/** The base class for ExpandingRowHost component to break cylic dependency. */
export interface ExpandingRowHostBase {
/**
* A reference to all child cfc-expanding-row elements. We will need for
* keyboard accessibility and scroll adjustments. For example, we need to know
* which row is previous row when user presses "left arrow" on a focused row.
*/
contentRows: QueryList<ExpandingRow>;
/**
* Keeps track of the last row that had focus before focus left the list
* of expanding rows.
*/
lastFocusedRow?: ExpandingRow;
/**
* Handles summary element click on a cfc-expanding-row component. Note
* that summary element is visible only when the row is collapsed. So this
* event will fired prior to expansion of a collapsed row. Scroll adjustment
* below makes sure mouse stays on the caption element when the collapsed
* row expands.
*/
handleRowSummaryClick(row: ExpandingRow): void;
/**
* Check if element is blacklisted. Blacklisted elements will not collapse an
* open row when clicked.
*/
isBlacklisted(element: HTMLElement|null): boolean;
/**
* Handles caption element click on a cfc-expanding-row component. Note
* that caption element is visible only when the row is expanded. So this
* means we will collapse the expanded row. The scroll adjustment below
* makes sure that the mouse stays under the summary of the expanded row
* when the row collapses.
*/
handleRowCaptionClick(row: ExpandingRow): void;
/**
* Handles expansion of a row. When a new row expands, we need to remove
* previous expansion and collapse. We also need to save the currently
* expanded row so that we can collapse this row once another row expands.
*/
handleRowExpand(row: ExpandingRow): void;
/**
* Handles focus on a row. When a new row gets focus (note that this is
* different from expansion), we need to remove previous focus and expansion.
* We need to save the reference to this focused row so that we can unfocus
* this row when another row is focused.
*/
handleRowFocus(row: ExpandingRow): void;
/**
* Function that is called by expanding row summary to focus on the last
* focusable element before the list of expanding rows.
*/
focusOnPreviousFocusableElement(): void;
/**
* Function that is called by expanding row summary to focus on the next
* focusable element after the list of expanding rows.
*/
focusOnNextFocusableElement(): void;
}
/**
* This component is used to render a single expanding row. It should contain
* cfc-expanding-row-summary, cfc-expanding-row-details-caption and
* cfc-expanding-row-details-content components.
*/
@Component({
selector: 'cfc-expanding-row',
styles: [expanding_row_css],
template: `
<div #expandingRowMainElement
class="cfc-expanding-row"
cdkMonitorSubtreeFocus
[attr.tabindex]="isExpanded ? '0' : '-1'"
[class.cfc-expanding-row-has-focus]="isFocused"
[class.cfc-expanding-row-is-expanded]="isExpanded"
ve="CfcExpandingRow">
<ng-content></ng-content>
</div>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExpandingRow {
/**
* The identifier for this node provided by the user code. We need this
* while we are emitting onToggle event.
*/
@Input() rowId !: string;
/**
* An ElementRef to the main element in this component. We need a reference
* to this element to compute the height. The height of cfc-expanding-row
* is used in [cfcExpandingRowHost] directive for scroll adjustments.
*/
@ViewChild('expandingRowMainElement', {static: true})
expandingRowMainElement !: ElementRef;
/**
* This @Output event emitter will be triggered when the user expands or
* collapses this node.
*/
@Output() onToggle = new EventEmitter<ExpandingRowToggleEvent>();
/**
* A boolean indicating if this node is expanded. This value is used to
* hide/show summary, caption, and content of the expanding row. There should
* only be one expanded row within [cfcExpandingRowHost] directive. And if
* there is an expanded row, there shouldn't be any focused rows.
*/
set isExpanded(value: boolean) {
const changed: boolean = this.isExpandedInternal !== value;
this.isExpandedInternal = value;
if (changed) {
this.isExpandedChange.emit();
this.changeDetectorRef.markForCheck();
}
}
/** TS getter for isExpanded property. */
get isExpanded(): boolean { return this.isExpandedInternal; }
/** Triggered when isExpanded property changes. */
isExpandedChange = new EventEmitter<void>();
/** Triggered when index property changes. */
indexChange = new EventEmitter<void>();
/**
* A boolean indicating if this node is focused. This value is used to add
* a CSS class that should render a blue border on the right. There should
* only be one focused row in [cfcExpandingRowHost] directive.
*/
set isFocused(value: boolean) {
this.isFocusedInternal = value;
this.changeDetectorRef.markForCheck();
}
/** TS getter for isFocused property. */
get isFocused(): boolean { return this.isFocusedInternal; }
/** The index of the row in the context of the entire collection. */
set index(value: number) {
const changed: boolean = this.indexInternal !== value;
this.indexInternal = value;
if (changed) {
this.indexChange.emit();
this.changeDetectorRef.markForCheck();
}
}
/** TS getter for index property. */
get index(): number { return this.indexInternal; }
/**
* We should probably rename this to summaryContentChild. Because technically
* this is not a @ViewChild that is in a template. This will be transcluded.
* Note that we are not using @ContentChild directive here. The @ContentChild
* will cause cyclic reference if the class definition for ExpandingRowSummary
* component is not in the same file as ExpandingRow.
*/
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
summaryViewChild !: ExpandingRowSummary;
/**
* We compute the collapsed height (which is just height of
* cfc-expanding-row-summary component) in this component. This is used in
* [cfcExpandingRowHost] for scroll adjustment calculation.
*/
collapsedHeight = -1;
/** Internal storage for isExpanded public property. */
private isExpandedInternal = false;
/** Internal storage for isFocused public property. */
private isFocusedInternal = false;
/** Internal storage for index public property. */
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
private indexInternal !: number;
/**
* This holds a reference to [cfcExpandingRowHost] directive. We need
* this reference to notify the host when this row expands/collapses or is
* focused.
*/
constructor(
public elementRef: ElementRef,
@Inject(EXPANDING_ROW_HOST_INJECTION_TOKEN) public expandingRowHost: ExpandingRowHostBase,
private readonly changeDetectorRef: ChangeDetectorRef) {}
/**
* Handles click on cfc-expanding-row-summary component. This will expand
* this row and collapse the previously expanded row. The collapse & blur
* is handled in [cfcExpandingRowHost] directive.
*/
handleSummaryClick(): void {
this.collapsedHeight =
this.elementRef.nativeElement.querySelector('.cfc-expanding-row-summary').offsetHeight;
this.expandingRowHost.handleRowSummaryClick(this);
this.expand();
}
/**
* When user tabs into child cfc-expanding-row-summary component. This method
* will make sure we focuse on this row, and blur on previously focused row.
*/
handleSummaryFocus(): void { this.focus(); }
/**
* cfc-expanding-row-details-caption component will call this function to
* notify click on its host element. Note that caption is only shown when
* the row is expanded. Hence this will collapse this row and put the focus
* on it.
* If a blacklisted element exists in the caption, clicking that element will
* not trigger the row collapse.
*/
handleCaptionClick(event: MouseEvent): void {
if (this.expandingRowHost.isBlacklisted(event.target as {} as HTMLElement)) {
return;
}
this.expandingRowHost.handleRowCaptionClick(this);
this.collapse();
this.focus();
}
/**
* Gets the height of this component. This height is used in parent
* [cfcExpandingRowHost] directive to compute scroll adjustment.
*/
getHeight(): number { return this.expandingRowMainElement.nativeElement.offsetHeight; }
/**
* Expands this row. This will notify the host so that it can collapse
* previously expanded row. This function also emits onToggle @Output event
* to the user code.
*/
expand(): void {
this.isExpanded = true;
this.expandingRowHost.handleRowExpand(this);
// setTimeout here makes sure we scroll this row into view after animation.
setTimeout(() => { this.expandingRowMainElement.nativeElement.focus(); });
this.onToggle.emit({rowId: this.rowId, isExpand: true});
}
/**
* Collapses this row. Setting isExpanded to false will make sure we hide
* the caption and details, and show cfc-expanding-row-summary component.
* This also emits onToggle @Output event to the user code.
*/
collapse(): void {
this.isExpanded = false;
this.onToggle.emit({rowId: this.rowId, isExpand: false});
}
/**
* Blurs this row. This should remove the blue border on the left if there
* is any. This function will remove DOM focus on the
* cfc-expanding-row-summary
* component.
*/
blur(): void {
this.isFocused = false;
this.summaryViewChild.blur();
}
/**
* Focuses this row. This should put blue border on the left. If there is
* any previous focus/selection, those should be gone. Parent
* [cfcExpandingRowHost] component takes care of that.
*/
focus(): void {
this.isFocused = true;
this.expandingRowHost.handleRowFocus(this);
// Summary child is not present currently. We need to NG2 to update the
// template.
setTimeout(() => { this.summaryViewChild.focus(); });
}
/**
* We listen for TAB press here to make sure we trap the focus on the
* expanded
* row. If the row is not expanded, we don't care about this event since focus
* trap should work for expanded rows only.
*/
@HostListener('keydown', ['$event'])
handleKeyDown(event: KeyboardEvent) {
const charCode = event.which || event.keyCode;
switch (charCode) {
case 9:
if (!this.isExpanded) {
return;
}
this.trapFocus(event);
break;
default:
break;
}
}
/**
* When this row is expanded, this function traps the focus between focusable
* elements contained in this row.
*/
private trapFocus(event: KeyboardEvent): void {
const rowElement: HTMLElement = this.expandingRowMainElement.nativeElement;
const focusableEls: HTMLElement[] = [];
let lastFocusableEl: HTMLElement = rowElement;
if (focusableEls.length) {
lastFocusableEl = focusableEls[focusableEls.length - 1];
}
if (event.target === lastFocusableEl && !event.shiftKey) {
rowElement.focus();
event.preventDefault();
} else if (event.target === rowElement && event.shiftKey) {
lastFocusableEl.focus();
event.preventDefault();
}
}
}

View File

@ -1,20 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Directive} from '@angular/core';
/**
* This directive is used to flag an element to NOT trigger collapsing an
* expanded row
*/
@Directive({
selector: '[cfcExpandingRowBlacklist]',
})
export class ExpandingRowBlacklist {
}

View File

@ -1,87 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export const expanding_row_css = `
::ng-deep [cfcExpandingRowHost] {
display: block;
margin-bottom: 2;
}
:host(cfc-expanding-row),
:host(cfc-expanding-row-summary),
:host(cfc-expanding-row-details-caption),
:host(cfc-expanding-row-details-content) {
display: block;
}
.cfc-expanding-row {
background: white;
border-top: 1 solid black;
box-shadow: 0 1 1 gray;
transition: margin 1 1;
will-change: margin;
}
.cfc-expanding-row.cfc-expanding-row-is-expanded {
margin: 1 (-1);
}
.cfc-expanding-row:focus {
outline: none;
}
.cfc-expanding-row-summary {
display: flex;
border-left: 6 solid transparent;
cursor: pointer;
padding: 6 2;
}
.cfc-expanding-row-summary:focus {
outline: none;
border-left-color: $cfc-color-active;
}
// Adjust icons to be positioned correctly in the row.
.cfc-expanding-row-summary::ng-deep cfc-icon {
margin-top: 3;
}
.cfc-expanding-row-details-caption {
display: flex;
cursor: pointer;
padding: 4 2;
}
.cfc-expanding-row-details-caption::ng-deep a,
.cfc-expanding-row-details-caption::ng-deep a:visited,
.cfc-expanding-row-details-caption::ng-deep a .cfc-external-link-content {
border-color: $cfc-color-text-primary-inverse;
color: $cfc-color-text-primary-inverse;
}
// Adjust icons to be positioned correctly in the row.
::ng-deep cfc-icon {
margin-top: 3;
}
.cfc-expanding-row-details-content {
padding: 2;
}
.cfc-expanding-row-details-content::ng-deep .ace-kv-list.cfc-full-bleed {
width: 200px;
}
.cfc-expanding-row-accessibility-text {
display: none;
}`;

View File

@ -1,53 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, Input, OnDestroy} from '@angular/core';
import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';
import {ExpandingRow} from './expanding_row';
import {expanding_row_css} from './expanding_row_css';
/**
* This component should be within cfc-expanding-row component. The caption
* is only visible when the row is expanded.
*/
@Component({
selector: 'cfc-expanding-row-details-caption',
styles: [expanding_row_css],
template: `
<div *ngIf="expandingRow.isExpanded"
(click)="expandingRow.handleCaptionClick($event)"
[style.backgroundColor]="color"
class="cfc-expanding-row-details-caption">
<ng-content></ng-content>
</div>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExpandingRowDetailsCaption implements OnDestroy {
/** The background color of this component. */
@Input() color: string = 'blue';
/** This is triggered when this component is destroyed. */
private readonly onDestroy = new Subject();
/**
* We need a reference to parent cfc-expanding-row component here to hide
* this component when the row is collapsed. We also need to relay clicks
* to the parent component.
*/
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
this.expandingRow.isExpandedChange.pipe(takeUntil(this.onDestroy)).subscribe(() => {
changeDetectorRef.markForCheck();
});
}
/** When component is destroyed, unlisten to isExpanded. */
ngOnDestroy(): void { this.onDestroy.next(); }
}

View File

@ -1,44 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, OnDestroy} from '@angular/core';
import {Subscription} from 'rxjs';
import {ExpandingRow} from './expanding_row';
import {expanding_row_css} from './expanding_row_css';
/**
* This component should be within cfc-expanding-row component. Note that the
* content is visible only when the row is expanded.
*/
@Component({
styles: [expanding_row_css],
selector: 'cfc-expanding-row-details-content',
template: `
<div class="cfc-expanding-row-details-content"
*ngIf="expandingRow.isExpanded">
<ng-content></ng-content>
</div>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExpandingRowDetailsContent implements OnDestroy {
/** Used for unsubscribing to changes in isExpanded parent property. */
private isExpandedChangeSubscription: Subscription;
/**
* We need a reference to parent cfc-expanding-row component to make sure we
* hide this component if the row is collapsed.
*/
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
this.isExpandedChangeSubscription =
this.expandingRow.isExpandedChange.subscribe(() => { changeDetectorRef.markForCheck(); });
}
/** Unsubscribe from changes in parent isExpanded property. */
ngOnDestroy(): void { this.isExpandedChangeSubscription.unsubscribe(); }
}

View File

@ -1,497 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, HostListener, Input, OnDestroy, Output, QueryList, ViewChild, forwardRef} from '@angular/core';
import {Subscription} from 'rxjs';
import {EXPANDING_ROW_HOST_INJECTION_TOKEN, ExpandingRow, ExpandingRowHostBase} from './expanding_row';
/**
* We use this class in <cfc-expanding-row/> template to identify the row.
* The [cfcExpandingRowHost] directive also uses this class to check if a given
* HTMLElement is within an <cfc-expanding-row/>.
*/
const EXPANDING_ROW_CLASS_NAME = 'cfc-expanding-row';
/** Throttle duration in milliseconds for repeated key presses. */
export const EXPANDING_ROW_KEYPRESS_THORTTLE_MS = 50;
/**
* This type union is created to make arguments of handleUpOrDownPress*
* methods in ExpandingRowHost class more readable.
*/
type UpOrDown = 'up' | 'down';
/**
* This is the wrapper directive for the cfc-expanding-row components. Note that
* we wanted to make this a directive instead of component because child
* cfc-expanding-row components does not have to be a direct child.
*/
@Component({
selector: 'cfc-expanding-row-host',
template: `
<div #firstFocusable
(focus)="focusOnLastFocusedRow()"
tabindex="0">
</div>
<ng-content></ng-content>
<div #lastFocusable
(focus)="focusOnLastFocusedRow()"
tabindex="0">
</div>`,
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [{provide: EXPANDING_ROW_HOST_INJECTION_TOKEN, useExisting: ExpandingRowHost}],
})
export class ExpandingRowHost implements AfterViewInit,
OnDestroy, ExpandingRowHostBase {
/**
* An HTML selector (e.g. "body") for the scroll element. We need this to
* make some scroll adjustments.
*/
@Input() scrollElementSelector = '.cfc-panel-body-scrollable';
/**
* An HTML selector (e.g. "body") for the click root. While the row is
* expanded, and user clicks outside of the expanded row, we collapse this row
* But to do this, we need to know the clickable area.
*/
@Input() clickRootElementSelector = 'cfc-panel-body';
/**
* The @Output will be triggered when the user wants to focus on the
* previously expanded row, and we are already at the first row. The logs team
* will use this to prepend data on demand.
*/
@Output() onPrepend = new EventEmitter<void>();
/** A reference to the last focusable element in list of expanding rows. */
@ViewChild('lastFocusable', {static: true}) lastFocusableElement !: ElementRef;
/** A reference to the first focusable element in list of expanding rows. */
@ViewChild('firstFocusable', {static: true})
firstFocusableElement !: ElementRef;
/**
* A reference to all child cfc-expanding-row elements. We will need for
* keyboard accessibility and scroll adjustments. For example, we need to know
* which row is previous row when user presses "left arrow" on a focused row.
*/
@ContentChildren(forwardRef(() => ExpandingRow), {descendants: true})
contentRows !: QueryList<ExpandingRow>;
/**
* Keeps track of the last row that had focus before focus left the list
* of expanding rows.
*/
lastFocusedRow?: ExpandingRow = undefined;
/**
* Focused rows just show a blue left border. This node is not expanded. We
* need to keep a reference to the focused row to unfocus when another row
* is focused.
*/
private focusedRow?: ExpandingRow = undefined;
/**
* This is the expanded row. If there is an expanded row there shouldn't be
* any focused rows. We need a reference to this. For example we need to
* collapse the currently expanded row, if another row is expanded.
*/
private expandedRow?: ExpandingRow = undefined;
/**
* This is just handleRootMouseUp.bind(this). handleRootMouseUp handles
* click events on root element (defined by clickRootElementSelector @Input)
* Since we attach the click listener dynamically, we need to keep this
* function around. This enables us to detach the click listener when
* component is destroyed.
*/
private handleRootMouseUpBound: EventListenerObject = this.handleRootMouseUp.bind(this);
/**
* 16px is the margin animation we have on cfc-expanding-row component.
* We need this value to compute scroll adjustments.
*/
private static rowMargin = 16;
/** Subscription to changes in the expanding rows. */
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
private rowChangeSubscription !: Subscription;
/**
* When component initializes we need to attach click listener to the root
* element. This click listener will allows us to collapse the
* currently expanded row when user clicks outside of it.
*/
ngAfterViewInit(): void {
const clickRootElement: HTMLElement = this.getClickRootElement();
if (!clickRootElement) {
return;
}
clickRootElement.addEventListener('mouseup', this.handleRootMouseUpBound);
this.rowChangeSubscription =
this.contentRows.changes.subscribe(() => { this.recalcRowIndexes(); });
this.recalcRowIndexes();
}
/**
* Detaches the click listener on the root element. Note that we are attaching
* this listener on ngAfterViewInit function.
*/
ngOnDestroy(): void {
const clickRootElement: HTMLElement = this.getClickRootElement();
if (!clickRootElement) {
return;
}
clickRootElement.removeEventListener('mouseup', this.handleRootMouseUpBound);
if (this.rowChangeSubscription) {
this.rowChangeSubscription.unsubscribe();
}
}
/**
* Handles caption element click on a cfc-expanding-row component. Note
* that caption element is visible only when the row is expanded. So this
* means we will collapse the expanded row. The scroll adjustment below
* makes sure that the mouse stays under the summary of the expanded row
* when the row collapses.
*/
handleRowCaptionClick(row: ExpandingRow): void {
const scrollAdjustment: number = -ExpandingRowHost.rowMargin;
const scrollElement: HTMLElement = this.getScrollElement() as HTMLElement;
if (!scrollElement) {
return;
}
scrollElement.scrollTop += scrollAdjustment;
}
/**
* Handles summary element click on a cfc-expanding-row component. Note
* that summary element is visible only when the row is collapsed. So this
* event will fired prior to expansion of a collapsed row. Scroll adjustment
* below makes sure mouse stays on the caption element when the collapsed
* row expands.
*/
handleRowSummaryClick(row: ExpandingRow): void {
const hadPreviousSelection: boolean = !!this.expandedRow;
const previousSelectedRowIndex: number = this.getRowIndex(this.expandedRow as ExpandingRow);
const newSelectedRowIndex: number = this.getRowIndex(row);
const previousCollapsedHeight: number = this.getSelectedRowCollapsedHeight();
const previousExpansionHeight = this.getSelectedRowExpandedHeight();
if (this.expandedRow) {
return;
}
let scrollAdjustment = 0;
const scrollElement: HTMLElement = this.getScrollElement() as HTMLElement;
if (!scrollElement) {
return;
}
if (previousExpansionHeight > 0 && previousCollapsedHeight >= 0) {
scrollAdjustment = previousExpansionHeight - previousCollapsedHeight;
}
const newSelectionIsInfrontOfPrevious: boolean = newSelectedRowIndex > previousSelectedRowIndex;
const multiplier = newSelectionIsInfrontOfPrevious ? -1 : 0;
scrollAdjustment = scrollAdjustment * multiplier + ExpandingRowHost.rowMargin;
scrollElement.scrollTop += scrollAdjustment;
}
/**
* Handles expansion of a row. When a new row expands, we need to remove
* previous expansion and collapse. We also need to save the currently
* expanded row so that we can collapse this row once another row expands.
*/
handleRowExpand(row: ExpandingRow): void {
this.removePreviousFocus();
this.removePreviousExpansion();
this.expandedRow = row;
}
/**
* Handles focus on a row. When a new row gets focus (note that this is
* different from expansion), we need to remove previous focus and expansion.
* We need to save the reference to this focused row so that we can unfocus
* this row when another row is focused.
*/
handleRowFocus(row: ExpandingRow): void {
// Do not blur then refocus the row if it's already selected.
if (row === this.focusedRow) {
return;
}
this.removePreviousFocus();
this.removePreviousExpansion();
this.focusedRow = row;
}
/**
* Called when shift+tabbing from the first focusable element after the list
* of expanding rows or tabbing from the last focusable element before.
*/
focusOnLastFocusedRow(): void {
if (!this.lastFocusedRow) {
this.lastFocusedRow = this.contentRows.toArray()[0];
}
this.lastFocusedRow.focus();
}
/**
* Function that is called by expanding row summary to focus on the last
* focusable element before the list of expanding rows.
*/
focusOnPreviousFocusableElement(): void { this.lastFocusedRow = this.focusedRow; }
/**
* Function that is called by expanding row summary to focus on the next
* focusable element after the list of expanding rows.
*/
focusOnNextFocusableElement(): void { this.lastFocusedRow = this.focusedRow; }
/**
* Handles keydown event on the host. We are just concerned with up,
* down arrow, ESC, and ENTER presses here. Note that Up/Down presses
* can be repeated.
*
* - Up: Focuses on the row above.
* - Down: Focuses on the row below.
* - Escape: Collapses the expanded row.
* - Enter: Expands the focused row.
*/
@HostListener('keydown', ['$event'])
handleKeyDown(event: KeyboardEvent) {}
/**
* Recursively returns true if target HTMLElement is within a
* cfc-expanding-row component. It will return false otherwise.
* We need this function in handleRootMouseUp to collapse the expanded row
* when user clicks outside of all expanded rows.
*/
private isTargetInRow(target: HTMLElement): boolean {
return target.classList.contains(EXPANDING_ROW_CLASS_NAME);
}
/**
* Gets the click root element that is described by clickRootElementSelector
* @Input value.
*/
private getClickRootElement(): HTMLElement {
return document.querySelector(this.clickRootElementSelector) as HTMLElement;
}
/**
* Handles all of the mouseup events on the click root. When user clicks
* outside of an expanded row, we need to collapse that row.
* We trigger collapse by calling handleCaptionClick() on the expanded row.
*/
private handleRootMouseUp(event: MouseEvent): void {
if (!this.expandedRow) {
return;
}
if (!this.isTargetInRow(event.target as {} as HTMLElement)) {
this.expandedRow.handleCaptionClick(event);
}
}
/**
* Check if element is blacklisted. Blacklisted elements will not collapse an
* open row when clicked.
*/
isBlacklisted(element: HTMLElement|null): boolean {
const clickRoot = this.getClickRootElement();
while (element && element !== clickRoot) {
if (element.hasAttribute('cfcexpandingrowblacklist')) {
return true;
}
element = element.parentElement;
}
return false;
}
/**
* Removes focus state from a previously focused row. We blur this row and
* set the focusedRow to undefined in this method. This usually happens when
* another row is focused.
*/
private removePreviousFocus(): void {
if (this.focusedRow) {
this.focusedRow.blur();
this.focusedRow = undefined;
}
}
/**
* Removes the expanded state from a previously expanded row. We collapse this
* row and set the expandedRow to undefined in this method. This usually
* happens when another row is expanded.
*/
private removePreviousExpansion(): void {
if (this.expandedRow) {
this.expandedRow.collapse();
this.expandedRow = undefined;
}
}
/**
* Gets the collapsed height of the currently expanded row. We need this for
* scroll adjustments. Note that collapsed height of a cfc-expanding-row
* component is equal to height of cfc-expanding-row-summary component within
* the row.
*/
private getSelectedRowCollapsedHeight(): number {
if (this.expandedRow) {
return this.expandedRow.collapsedHeight;
} else {
return -1;
}
}
/**
* Gets the current height of the expanded row. We need this value for the
* scroll adjustment computation.
*/
private getSelectedRowExpandedHeight(): number {
if (this.expandedRow) {
return this.expandedRow.getHeight();
} else {
return -1;
}
}
/**
* Gets the HTML element described by scrollElementSelector @Input value.
* We need this value for scroll adjustments.
*/
private getScrollElement(): HTMLElement|undefined {
if (!this.scrollElementSelector) {
return undefined;
}
return document.querySelector(this.scrollElementSelector) as HTMLElement;
}
/**
* Handles escape presses on the host element. Escape removes previous focus
* if there is one. If there is an expanded row, escape row collapses this
* row and focuses on it. A subsequent escape press will blur this row.
*/
private handleEscapePress(): void {
this.removePreviousFocus();
if (this.expandedRow) {
this.expandedRow.collapse();
this.expandedRow.focus();
this.expandedRow = undefined;
}
}
/**
* Handles enter keypress. If there is a focused row, an enter key press on
* host element will expand this row.
*/
private handleEnterPress(): void {
if (document.activeElement !== this.focusedRowSummary()) {
return;
}
if (this.focusedRow) {
this.focusedRow.expand();
}
}
/** Returns the HTMLElement that is the currently focused row summary. */
private focusedRowSummary(): HTMLElement|undefined {
return this.focusedRow ? this.focusedRow.summaryViewChild.mainElementRef.nativeElement :
undefined;
}
/**
* Returns the index of a given row. This enables us to figure out the row
* above/below the focused row.
*/
private getRowIndex(rowToLookFor: ExpandingRow): number {
return rowToLookFor ? rowToLookFor.index : -1;
}
/**
* Handles up/down arrow presses on the host element. Up arrow press will
* focus/expand on the row above. Down arrow press will focus/expand the row
* below. If we have a focus on the current row, this function will focus on
* the computed (the one above or below) row. If host has an expanded row,
* this function will expand the computed row.
*/
private handleUpOrDownPressOnce(upOrDown: UpOrDown, event: KeyboardEvent): void {
event.preventDefault();
// If row is expanded but focus is inside the expanded element, arrow
// key presses should not do anything.
if (this.expandedRow &&
document.activeElement !== this.expandedRow.expandingRowMainElement.nativeElement) {
return;
}
// If focus is inside a collapsed row header, arrow key presses should not
// do anything.
if (this.focusedRow && document.activeElement !== this.focusedRowSummary()) {
return;
}
// We only want screen reader to read the message the first time we enter
// the list of expanding rows, so we must reset the variable here
this.lastFocusedRow = undefined;
const rowToLookFor: ExpandingRow|undefined = this.expandedRow || this.focusedRow;
if (!rowToLookFor) {
return;
}
const isFocus: boolean = (rowToLookFor === this.focusedRow);
const rowIndex: number = this.getRowIndex(rowToLookFor);
const contentRowsArray: ExpandingRow[] = this.contentRows.toArray();
if (rowIndex < 0) {
return;
}
const potentialIndex: number = (upOrDown === 'up' ? -1 : +1) + rowIndex;
if (potentialIndex < 0) {
this.onPrepend.emit();
return;
}
if (potentialIndex >= contentRowsArray.length) {
return;
}
const potentialRow: ExpandingRow = contentRowsArray[potentialIndex];
if (isFocus) {
potentialRow.focus();
} else {
potentialRow.expand();
}
}
// Updates all of the rows with their new index.
private recalcRowIndexes() {
let index = 0;
setTimeout(
() => { this.contentRows.forEach((row: ExpandingRow) => { row.index = index++; }); });
}
}

View File

@ -1,42 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {ExpandingRow} from './expanding_row';
import {ExpandingRowBlacklist} from './expanding_row_blacklist';
import {ExpandingRowDetailsCaption} from './expanding_row_details_caption';
import {ExpandingRowDetailsContent} from './expanding_row_details_content';
import {ExpandingRowHost} from './expanding_row_host';
import {ExpandingRowSummary} from './expanding_row_summary';
/** The main module for the cfc-expanding-row component. */
@NgModule({
declarations: [
ExpandingRow,
ExpandingRowDetailsCaption,
ExpandingRowDetailsContent,
ExpandingRowHost,
ExpandingRowSummary,
ExpandingRowBlacklist,
],
exports: [
ExpandingRow,
ExpandingRowDetailsCaption,
ExpandingRowDetailsContent,
ExpandingRowHost,
ExpandingRowSummary,
ExpandingRowBlacklist,
],
imports: [
CommonModule,
],
})
export class ExpandingRowModule {
}

View File

@ -1,207 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Host, HostListener, OnDestroy, ViewChild} from '@angular/core';
import {Subscription} from 'rxjs';
import {ExpandingRow} from './expanding_row';
import {expanding_row_css} from './expanding_row_css';
const KEY_CODE_TAB = 9;
/**
* This component should be used within cfc-expanding-row component. Note that
* summary is visible only when the row is collapsed.
*/
@Component({
selector: 'cfc-expanding-row-summary',
styles: [expanding_row_css],
template: `
<div *ngIf="!expandingRow.isExpanded"
#expandingRowSummaryMainElement
class="cfc-expanding-row-summary"
tabindex="-1"
(click)="expandingRow.handleSummaryClick()"
(focus)="handleFocus()">
<ng-content></ng-content>
<div class="cfc-expanding-row-accessibility-text">.</div>
<div class="cfc-expanding-row-accessibility-text"
i18n="This is the label used to indicate that the user is in a list of expanding rows.">
Row {{expandingRow.index + 1}} in list of expanding rows.
</div>
<div *ngIf="isPreviouslyFocusedRow()"
class="cfc-expanding-row-accessibility-text"
i18n="This is the label used for the first row in list of expanding rows.">
Use arrow keys to navigate.
</div>
</div>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExpandingRowSummary implements OnDestroy {
/**
* A reference to the main element. This element should be focusable. We need
* reference to compute collapsed height of the row. We also use this
* reference for focus and blur methods below.
*/
@ViewChild('expandingRowSummaryMainElement', {static: false})
mainElementRef !: ElementRef;
/** Subscription for changes in parent isExpanded property. */
private isExpandedSubscription: Subscription;
/** Subscription for changes in parent index property. */
private indexSubscription: Subscription;
/**
* We need the parent cfc-expanding-row component here to hide this element
* when the row is expanded. cfc-expanding-row-details-caption element
* will act as a header for expanded rows. We also need to relay tab-in and
* click events to the parent.
*/
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
this.expandingRow.summaryViewChild = this;
this.isExpandedSubscription =
this.expandingRow.isExpandedChange.subscribe(() => { changeDetectorRef.markForCheck(); });
this.indexSubscription =
this.expandingRow.indexChange.subscribe(() => { changeDetectorRef.markForCheck(); });
}
/** When component is destroyed, unlisten to isExpanded. */
ngOnDestroy(): void {
if (this.isExpandedSubscription) {
this.isExpandedSubscription.unsubscribe();
}
if (this.indexSubscription) {
this.indexSubscription.unsubscribe();
}
}
/**
* Handles focus event on the element. We basically want to detect any focus
* in this component and relay this information to parent cfc-expanding-row
* component.
*/
handleFocus(): void {
// Clicking causes a focus event to occur before the click event. Filter
// out click events using the cdkFocusMonitor.
//
// TODO(b/62385992) Use the KeyboardFocusService to detect focus cause
// instead of creating multiple monitors on a page.
if (this.expandingRow.expandingRowMainElement.nativeElement.classList.contains(
'cdk-mouse-focused')) {
return;
}
if (!this.expandingRow.isFocused && !this.expandingRow.isExpanded) {
this.expandingRow.handleSummaryFocus();
}
}
/**
* Handles tab & shift+tab presses on expanding row summaries in case there
* are tabbable elements inside the summaries.
*/
@HostListener('keydown', ['$event'])
handleKeyDown(event: KeyboardEvent) {
const charCode = event.which || event.keyCode;
if (charCode === KEY_CODE_TAB) {
this.handleTabKeypress(event);
}
}
/**
* Handles tab and shift+tab presses inside expanding row summaries;
*
* From inside collapsed row summary:
* - Tab: If focus was on the last focusable child, should shift focus to
* the next focusable element outside the list of expanding rows.
* - Shift+tab: If focus was on first focusable child, should shift focus to
* the main collapsed row summary element
* If focus was on main collapsed row summary element, should
* shift focus to the last focusable element before the list of
* expanding rows.
*/
handleTabKeypress(event: KeyboardEvent): void {
const focusableChildren = this.getFocusableChildren();
if (focusableChildren.length === 0) {
return;
}
// Shift+tab on expanding row summary should focus on last focusable element
// before expanding row list. Otherwise, if shift+tab is pressed on first
// focusable child inside expanding row summary, it should focus on main
// expanding row summary element.
if (event.shiftKey && document.activeElement === this.mainElementRef.nativeElement) {
event.preventDefault();
this.expandingRow.expandingRowHost.focusOnPreviousFocusableElement();
return;
} else if (event.shiftKey && document.activeElement === focusableChildren[0]) {
event.preventDefault();
this.expandingRow.focus();
}
// If tab is pressed on the last focusable element inside an expanding row
// summary, focus should be set to the next focusable element after the list
// of expanding rows.
if (!event.shiftKey &&
document.activeElement === focusableChildren[focusableChildren.length - 1]) {
event.preventDefault();
this.expandingRow.expandingRowHost.focusOnNextFocusableElement();
}
}
/**
* Finds the row that had focus before focus left the list of expanding rows
* and checks if the current row summary is that row.
*/
isPreviouslyFocusedRow(): boolean {
if (!this.expandingRow.expandingRowHost.contentRows) {
return false;
}
const expandingRowHost = this.expandingRow.expandingRowHost;
if (!this.mainElementRef || !expandingRowHost.lastFocusedRow) {
return false;
}
if (!expandingRowHost.lastFocusedRow.summaryViewChild.mainElementRef) {
return false;
}
// If the current expanding row summary was the last focused one before
// focus exited the list, then return true to trigger the screen reader
if (this.mainElementRef.nativeElement ===
expandingRowHost.lastFocusedRow.summaryViewChild.mainElementRef.nativeElement) {
return true;
}
return false;
}
/** Puts the DOM focus on the main element. */
focus(): void {
if (this.mainElementRef && document.activeElement !== this.mainElementRef.nativeElement) {
this.mainElementRef.nativeElement.focus();
}
}
/** Removes the DOM focus on the main element. */
blur(): void {
if (!this.mainElementRef) {
return;
}
this.mainElementRef.nativeElement.blur();
}
/** Returns array of focusable elements within this component. */
private getFocusableChildren(): HTMLElement[] { return []; }
}

View File

@ -1,22 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* This interface is used to send toggle (expand/collapse) events to the user
* code.
*/
export interface ExpandingRowToggleEvent {
/** The identifier of the row that was toggled. */
rowId: string;
/**
* A boolean indicating whether or not this row was expanded. This is set to
* false if the row was collapsed.
*/
isExpand: boolean;
}

View File

@ -1,39 +0,0 @@
<!doctype html>
<html>
<head>
<!-- Prevent the browser from requesting any favicon. -->
<link rel="icon" href="data:,">
</head>
<body>
<h1>Change Detection Benchmark</h1>
<div id="rendererMode">...</div>
<benchmark-root>loading...</benchmark-root>
<script>
addEventListener('DOMContentLoaded', () => {
// DevServer has automatic bootstrap code, so if we already have <scripts> than we don't need to bootstrap
var alreadyBootstraped = document.querySelectorAll('script').length > 1; // 1 for ourselves
if (!alreadyBootstraped) {
function loadScript(url) {
return new Promise(function (resolve, reject) {
var script = document.createElement('script');
script.src = url;
script.onload = resolve;
script.onerror = reject;
document.body.append(script);
});
}
// zone.js must be loaded and processed before Angular bundle gets executed
loadScript('/npm/node_modules/zone.js/dist/zone.js').then(function () {
loadScript(document.location.search.endsWith('debug') ? 'bundle.min_debug.js' : 'bundle.min.js');
});
}
});
</script>
</body>
</html>

View File

@ -1,20 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {enableProdMode} from '@angular/core';
import {platformBrowser} from '@angular/platform-browser';
import {ExpandingRowBenchmarkModule} from './benchmark';
import {ExpandingRowBenchmarkModuleNgFactory} from './benchmark.ngfactory';
setMode(ExpandingRowBenchmarkModule.hasOwnProperty('ngModuleDef') ? 'Ivy' : 'ViewEngine');
enableProdMode();
platformBrowser().bootstrapModuleFactory(ExpandingRowBenchmarkModuleNgFactory);
function setMode(name: string): void {
document.querySelector('#rendererMode') !.textContent = `Render Mode: ${name}`;
}

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵselect, ɵɵstyleProp, ɵɵstyling, ɵɵtext, ɵɵtextInterpolate1} from '@angular/core';
import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '@angular/core';
import {bindAction, profile} from '../../util';
import {createDom, destroyDom, detectChanges} from '../render3/tree';
@ -38,7 +38,7 @@ export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
ɵɵelementStart(0, 'tree');
{
ɵɵelementStart(1, 'span');
ɵɵstyling(null, c1);
ɵɵelementStyling(null, c1);
{ ɵɵtext(2); }
ɵɵelementEnd();
ɵɵcontainer(3);
@ -47,11 +47,8 @@ export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
ɵɵelementEnd();
}
if (rf & ɵRenderFlags.Update) {
ɵɵselect(1);
ɵɵstyleProp(0, ctx.depth % 2 ? '' : 'grey');
ɵɵstyling();
ɵɵselect(2);
ɵɵtextInterpolate1(' ', ctx.value, ' ');
ɵɵelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey');
ɵɵtextBinding(2, ɵɵinterpolation1(' ', ctx.value, ' '));
ɵɵcontainerRefreshStart(3);
{
if (ctx.left != null) {

View File

@ -1,7 +1,8 @@
{
"name": "angular-srcs",
"version": "8.1.0-next.3",
"version": "8.0.2",
"private": true,
"branchPattern": "2.0.*",
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
"bugs": "https://github.com/angular/angular/issues",
@ -42,7 +43,6 @@
"@schematics/angular": "^8.0.0-beta.15",
"@types/angular": "^1.6.47",
"@types/base64-js": "1.2.5",
"@types/bluebird": "^3.5.27",
"@types/chai": "^4.1.2",
"@types/chokidar": "^1.7.5",
"@types/convert-source-map": "^1.5.1",
@ -58,7 +58,6 @@
"@types/selenium-webdriver": "3.0.7",
"@types/shelljs": "^0.7.8",
"@types/source-map": "^0.5.1",
"@types/systemjs": "0.19.32",
"@types/yargs": "^11.1.1",
"@webcomponents/custom-elements": "^1.0.4",
"angular": "npm:angular@1.7",
@ -68,14 +67,12 @@
"angular-mocks-1.5": "npm:angular-mocks@1.5",
"angular-mocks-1.6": "npm:angular-mocks@1.6",
"base64-js": "1.2.1",
"bluebird": "^3.5.5",
"brotli": "^1.3.2",
"canonical-path": "1.0.0",
"chai": "^4.1.2",
"chalk": "^2.3.1",
"chokidar": "^2.1.1",
"convert-source-map": "^1.5.1",
"core-js": "^2.4.1",
"dependency-graph": "^0.7.2",
"diff": "^3.5.0",
"domino": "2.1.2",
@ -92,7 +89,6 @@
"minimist": "1.2.0",
"mock-fs": "^4.10.1",
"node-uuid": "1.4.8",
"nodejs-websocket": "^1.7.2",
"protractor": "^5.4.2",
"reflect-metadata": "^0.1.3",
"rollup": "^1.1.0",
@ -126,6 +122,7 @@
"@bazel/buildifier": "^0.25.1",
"@bazel/ibazel": "~0.9.0",
"@types/minimist": "^1.2.0",
"@types/systemjs": "0.19.32",
"browserstacktunnel-wrapper": "2.0.1",
"check-side-effects": "0.0.21",
"clang-format": "1.0.41",
@ -133,13 +130,14 @@
"cldr-data-downloader": "0.3.2",
"cldrjs": "0.5.0",
"conventional-changelog": "^2.0.3",
"core-js": "^2.4.1",
"cors": "2.8.4",
"entities": "1.1.1",
"firebase-tools": "5.1.1",
"firefox-profile": "1.0.3",
"glob": "7.1.2",
"gulp": "3.9.1",
"gulp-clang-format": "1.0.27",
"gulp-clang-format": "1.0.23",
"gulp-connect": "5.0.0",
"gulp-conventional-changelog": "^2.0.3",
"gulp-filter": "^5.1.0",

View File

@ -0,0 +1,29 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../../",
"paths": {
"@angular/animations": ["../../../../dist/packages/animations"],
"@angular/animations/browser": ["../../../../dist/packages/animations/browser"],
"@angular/core": ["../../../../dist/packages/core"]
},
"outDir": "../../../../dist/packages/animations"
},
"files": [
"public_api.ts",
"../../../../node_modules/@types/hammerjs/index.d.ts",
"../../../../node_modules/@types/jasmine/index.d.ts",
"../../../../node_modules/zone.js/dist/zone.js.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "testing.js",
"flatModuleId": "@angular/animations/browser/testing"
}
}

View File

@ -0,0 +1,28 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../",
"paths": {
"@angular/animations": ["../../../dist/packages/animations"],
"@angular/core": ["../../../dist/packages/core"]
},
"outDir": "../../../dist/packages/animations"
},
"files": [
"public_api.ts",
"../../../node_modules/@types/node/index.d.ts",
"../../../node_modules/zone.js/dist/zone.js.d.ts",
"../../system.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "browser.js",
"flatModuleId": "@angular/animations/browser"
}
}

View File

@ -0,0 +1,26 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"paths": {
"@angular/core": ["../../dist/packages/core"]
},
"outDir": "../../dist/packages/animations"
},
"files": [
"public_api.ts",
"../../node_modules/zone.js/dist/zone.js.d.ts",
"../system.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "animations.js",
"flatModuleId": "@angular/animations"
}
}

View File

@ -21,8 +21,6 @@
"node_modules/@angular/compiler-cli/**",
"node_modules/@angular/**/testing/**",
"node_modules/@angular/common/upgrade*",
"node_modules/@angular/router/upgrade*",
"node_modules/@angular/cdk/schematics*",
"node_modules/@angular/material/schematics*"
"node_modules/@angular/router/upgrade*"
]
}

View File

@ -61,38 +61,22 @@ describe('ng-add schematic', () => {
new SchematicTestRunner('@angular/bazel', require.resolve('../collection.json'));
});
it('throws if package.json is not found', async() => {
it('throws if package.json is not found', () => {
expect(host.files).toContain('/package.json');
host.delete('/package.json');
let message = 'No error';
try {
await schematicRunner.runSchematicAsync('ng-add', defaultOptions).toPromise();
} catch (e) {
message = e.message;
}
expect(message).toBe('Could not find package.json');
expect(() => schematicRunner.runSchematic('ng-add', defaultOptions))
.toThrowError('Could not find package.json');
});
it('throws if angular.json is not found', async() => {
it('throws if angular.json is not found', () => {
expect(host.files).toContain('/angular.json');
host.delete('/angular.json');
let message = 'No error';
try {
await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
} catch (e) {
message = e.message;
}
expect(message).toBe('Could not find angular.json');
expect(() => schematicRunner.runSchematic('ng-add', defaultOptions, host))
.toThrowError('Could not find angular.json');
});
it('should add @angular/bazel to package.json dependencies', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should add @angular/bazel to package.json dependencies', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).toContain('/package.json');
const content = host.readContent('/package.json');
@ -107,8 +91,8 @@ describe('ng-add schematic', () => {
expect(json.dependencies[core]).toBe(json.devDependencies[bazel]);
});
it('should add @bazel/* dev dependencies', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should add @bazel/* dev dependencies', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const content = host.readContent('/package.json');
const json = JSON.parse(content);
const devDeps = Object.keys(json.devDependencies);
@ -117,12 +101,12 @@ describe('ng-add schematic', () => {
expect(devDeps).toContain('@bazel/karma');
});
it('should replace an existing dev dependency', async() => {
it('should replace an existing dev dependency', () => {
expect(host.files).toContain('/package.json');
const packageJson = JSON.parse(host.readContent('/package.json'));
packageJson.devDependencies['@angular/bazel'] = '4.2.42';
host.overwrite('/package.json', JSON.stringify(packageJson));
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const content = host.readContent('/package.json');
// It is possible that a dep gets added twice if the package already exists.
expect(content.match(/@angular\/bazel/g) !.length).toEqual(1);
@ -130,29 +114,29 @@ describe('ng-add schematic', () => {
expect(json.devDependencies['@angular/bazel']).toBe('1.2.3');
});
it('should remove an existing dependency', async() => {
it('should remove an existing dependency', () => {
expect(host.files).toContain('/package.json');
const packageJson = JSON.parse(host.readContent('/package.json'));
packageJson.dependencies['@angular/bazel'] = '4.2.42';
expect(Object.keys(packageJson.dependencies)).toContain('@angular/bazel');
host.overwrite('/package.json', JSON.stringify(packageJson));
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const content = host.readContent('/package.json');
const json = JSON.parse(content);
expect(Object.keys(json.dependencies)).not.toContain('@angular/bazel');
expect(json.devDependencies['@angular/bazel']).toBe('1.2.3');
});
it('should not create Bazel workspace file', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should not create Bazel workspace file', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).not.toContain('/WORKSPACE');
expect(files).not.toContain('/BUILD.bazel');
});
it('should produce main.dev.ts and main.prod.ts for AOT', async() => {
it('should produce main.dev.ts and main.prod.ts for AOT', () => {
host.create('/src/main.ts', 'generated by CLI');
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
// main.dev.ts and main.prod.ts are used by Bazel for AOT
expect(files).toContain('/src/main.dev.ts');
@ -162,9 +146,9 @@ describe('ng-add schematic', () => {
expect(files).toContain('/src/main.ts');
});
it('should not overwrite index.html with script tags', async() => {
it('should not overwrite index.html with script tags', () => {
host.create('/src/index.html', '<html>Hello World</html>');
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).toContain('/src/index.html');
const content = host.readContent('/src/index.html');
@ -172,34 +156,34 @@ describe('ng-add schematic', () => {
expect(content).not.toMatch('<script src="/bundle.min.js"></script>');
});
it('should generate main.dev.ts and main.prod.ts', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should generate main.dev.ts and main.prod.ts', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).toContain('/src/main.dev.ts');
expect(files).toContain('/src/main.prod.ts');
});
it('should overwrite .gitignore for bazel-out directory', async() => {
it('should overwrite .gitignore for bazel-out directory', () => {
host.create('.gitignore', '\n# compiled output\n');
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).toContain('/.gitignore');
const content = host.readContent('/.gitignore');
expect(content).toMatch('\n# compiled output\n/bazel-out\n');
});
it('should create a backup for original angular.json', async() => {
it('should create a backup for original angular.json', () => {
expect(host.files).toContain('/angular.json');
const original = host.readContent('/angular.json');
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
expect(host.files).toContain('/angular.json.bak');
const content = host.readContent('/angular.json.bak');
expect(content.startsWith('// This is a backup file')).toBe(true);
expect(content).toMatch(original);
});
it('should update angular.json to use Bazel builder', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should update angular.json to use Bazel builder', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
const {files} = host;
expect(files).toContain('/angular.json');
const content = host.readContent('/angular.json');
@ -219,9 +203,9 @@ describe('ng-add schematic', () => {
expect(lint.builder).toBe('@angular-devkit/build-angular:tslint');
});
it('should get defaultProject if name is not provided', async() => {
it('should get defaultProject if name is not provided', () => {
const options = {};
host = await schematicRunner.runSchematicAsync('ng-add', options, host).toPromise();
host = schematicRunner.runSchematic('ng-add', options, host);
const content = host.readContent('/angular.json');
const json = JSON.parse(content);
const builder = json.projects.demo.architect.build.builder;
@ -244,7 +228,7 @@ describe('ng-add schematic', () => {
['~7.0.1', false],
];
for (const [version, upgrade] of cases) {
it(`should ${upgrade ? '' : 'not '}upgrade v${version}')`, async() => {
it(`should ${upgrade ? '' : 'not '}upgrade v${version}')`, () => {
host.overwrite('package.json', JSON.stringify({
name: 'demo',
dependencies: {
@ -255,7 +239,7 @@ describe('ng-add schematic', () => {
'typescript': '3.2.2',
},
}));
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
expect(host.files).toContain('/package.json');
const content = host.readContent('/package.json');
const json = JSON.parse(content);
@ -268,15 +252,15 @@ describe('ng-add schematic', () => {
}
});
it('should add a postinstall step to package.json', async() => {
host = await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
it('should add a postinstall step to package.json', () => {
host = schematicRunner.runSchematic('ng-add', defaultOptions, host);
expect(host.files).toContain('/package.json');
const content = host.readContent('/package.json');
const json = JSON.parse(content);
expect(json.scripts.postinstall).toBe('ngc -p ./angular-metadata.tsconfig.json');
});
it('should work when run on a minimal project (without test and e2e targets)', async() => {
it('should work when run on a minimal project (without test and e2e targets)', () => {
host.overwrite('angular.json', JSON.stringify({
projects: {
'demo': {
@ -291,15 +275,7 @@ describe('ng-add schematic', () => {
},
}));
let error: Error|null = null;
try {
await schematicRunner.runSchematicAsync('ng-add', defaultOptions, host).toPromise();
} catch (e) {
error = e;
}
expect(error).toBeNull();
expect(() => schematicRunner.runSchematic('ng-add', defaultOptions, host)).not.toThrowError();
});
});

View File

@ -16,18 +16,18 @@ describe('ng-new schematic', () => {
version: '7.0.0',
};
it('should call external @schematics/angular', async() => {
it('should call external @schematics/angular', () => {
const options = {...defaultOptions};
const host = await schematicRunner.runSchematicAsync('ng-new', options).toPromise();
const host = schematicRunner.runSchematic('ng-new', options);
const {files} = host;
// External schematic should produce workspace file angular.json
expect(files).toContain('/demo/angular.json');
expect(files).toContain('/demo/package.json');
});
it('should call ng-add to generate additional files needed by Bazel', async() => {
it('should call ng-add to generate additional files needed by Bazel', () => {
const options = {...defaultOptions};
const host = await schematicRunner.runSchematicAsync('ng-new', options).toPromise();
const host = schematicRunner.runSchematic('ng-new', options);
const {files} = host;
expect(files).toContain('/demo/src/main.dev.ts');
expect(files).toContain('/demo/src/main.prod.ts');

View File

@ -0,0 +1,21 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"module": "commonjs",
"baseUrl": ".",
"rootDir": ".",
"sourceRoot": ".",
"paths": {
"@angular/core": ["../../dist/packages/core"]
},
"outDir": "../../dist/packages/benchpress"
},
"files": [
"index.ts",
"../../node_modules/@types/node/index.d.ts",
"../../node_modules/@types/jasmine/index.d.ts",
"../../node_modules/zone.js/dist/zone.js.d.ts"
]
}

View File

@ -0,0 +1,27 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../../",
"paths": {
"@angular/core": ["../../../../dist/packages/core"],
"@angular/common": ["../../../../dist/packages/common"],
"@angular/common/http": ["../../../../dist/packages/common/http"],
"@angular/platform-browser": ["../../../../dist/packages/platform-browser"]
},
"outDir": "../../../../dist/packages/common"
},
"files": [
"public_api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "testing.js",
"flatModuleId": "@angular/common/http/testing"
}
}

View File

@ -0,0 +1,25 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../",
"paths": {
"@angular/common": ["../../../dist/packages/common"],
"@angular/core": ["../../../dist/packages/core"]
},
"outDir": "../../../dist/packages/common"
},
"files": [
"public_api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "http.js",
"flatModuleId": "@angular/common/http"
}
}

View File

@ -0,0 +1,27 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../../../dist/packages/common/locales",
"paths": {
"@angular/common": ["../../../dist/packages/common"],
"@angular/core": ["../../../dist/packages/core"]
},
"sourceMap": true,
"inlineSources": true,
"target": "es5",
"skipLibCheck": true,
"lib": ["es2015", "dom"]
},
"exclude": [
"./closure-locale.ts"
],
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"skipMetadataEmit": true
}
}

View File

@ -5,7 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵclassMap, ɵɵdefineDirective, ɵɵstyling, ɵɵstylingApply} from '@angular/core';
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core';
import {NgClassImpl, NgClassImplProvider} from './ng_class_impl';
@ -35,11 +35,11 @@ export const ngClassDirectiveDef__POST_R3__ = ɵɵdefineDirective({
factory: () => {},
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
if (rf & ɵRenderFlags.Create) {
ɵɵstyling();
ɵɵelementHostStyling();
}
if (rf & ɵRenderFlags.Update) {
ɵɵclassMap(ctx.getValue());
ɵɵstylingApply();
ɵɵelementHostStylingMap(ctx.getValue());
ɵɵelementHostStylingApply();
}
}
});

View File

@ -219,12 +219,12 @@ export class NgIf {
/**
* Assert the correct type of the expression bound to the `ngIf` input within the template.
*
* The presence of this static field is a signal to the Ivy template type check compiler that
* when the `NgIf` structural directive renders its template, the type of the expression bound
* to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to
* narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.
* The presence of this method is a signal to the Ivy template type check compiler that when the
* `NgIf` structural directive renders its template, the type of the expression bound to `ngIf`
* should be narrowed in some way. For `NgIf`, it is narrowed to be non-null, which allows the
* strictNullChecks feature of TypeScript to work with `NgIf`.
*/
static ngTemplateGuard_ngIf: 'binding';
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E> { return true; }
}
/**

View File

@ -5,7 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵstyleMap, ɵɵstyling, ɵɵstylingApply} from '@angular/core';
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core';
import {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl';
@ -35,11 +35,11 @@ export const ngStyleDirectiveDef__POST_R3__ = ɵɵdefineDirective({
factory: () => {},
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
if (rf & ɵRenderFlags.Create) {
ɵɵstyling();
ɵɵelementHostStyling();
}
if (rf & ɵRenderFlags.Update) {
ɵɵstyleMap(ctx.getValue());
ɵɵstylingApply();
ɵɵelementHostStylingMap(null, ctx.getValue());
ɵɵelementHostStylingApply();
}
}
});

View File

@ -6,7 +6,10 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ɵLOCALE_DATA as LOCALE_DATA, ɵLocaleDataIndex as LocaleDataIndex} from '@angular/core';
/**
* @publicApi
*/
export const LOCALE_DATA: {[localeId: string]: any} = {};
/**
* Register global data to be used internally by Angular. See the
@ -30,6 +33,32 @@ export function registerLocaleData(data: any, localeId?: string | any, extraData
}
}
/**
* Index of each type of locale data from the locale data array
*/
export const enum LocaleDataIndex {
LocaleId = 0,
DayPeriodsFormat,
DayPeriodsStandalone,
DaysFormat,
DaysStandalone,
MonthsFormat,
MonthsStandalone,
Eras,
FirstDayOfWeek,
WeekendRange,
DateFormat,
TimeFormat,
DateTimeFormat,
NumberSymbols,
NumberFormats,
CurrencySymbol,
CurrencyName,
Currencies,
PluralCase,
ExtraData
}
/**
* Index of each type of locale data from the extra locale data array
*/

View File

@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ɵLocaleDataIndex as LocaleDataIndex, ɵfindLocaleData as findLocaleData, ɵgetLocalePluralCase} from '@angular/core';
import localeEn from './locale_en';
import {LOCALE_DATA, LocaleDataIndex, ExtraLocaleDataIndex, CurrencyIndex} from './locale_data';
import {CURRENCIES_EN, CurrenciesSymbols} from './currencies';
import {CurrencyIndex, ExtraLocaleDataIndex} from './locale_data';
/**
* Format styles that can be used to represent numbers.
@ -31,8 +31,7 @@ export enum NumberFormatStyle {
* @see `NgPluralCase`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
*
* @publicApi
*/
* @publicApi */
export enum Plural {
Zero = 0,
One = 1,
@ -486,11 +485,19 @@ function getLocaleCurrencies(locale: string): {[code: string]: CurrenciesSymbols
}
/**
* @alias core/ɵgetLocalePluralCase
* Retrieves the plural function used by ICU expressions to determine the plural case to use
* for a given locale.
* @param locale A locale code for the locale format rules to use.
* @returns The plural function for the locale.
* @see `NgPlural`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
*
* @publicApi
*/
export const getLocalePluralCase: (locale: string) => ((value: number) => Plural) =
ɵgetLocalePluralCase;
export function getLocalePluralCase(locale: string): (value: number) => Plural {
const data = findLocaleData(locale);
return data[LocaleDataIndex.PluralCase];
}
function checkFullData(data: any) {
if (!data[LocaleDataIndex.ExtraData]) {
@ -602,7 +609,37 @@ function extractTime(time: string): Time {
return {hours: +h, minutes: +m};
}
/**
* Finds the locale data for a given locale.
*
* @param locale The locale code.
* @returns The locale data.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
*
* @publicApi
*/
export function findLocaleData(locale: string): any {
const normalizedLocale = locale.toLowerCase().replace(/_/g, '-');
let match = LOCALE_DATA[normalizedLocale];
if (match) {
return match;
}
// let's try to find a parent locale
const parentLocale = normalizedLocale.split('-')[0];
match = LOCALE_DATA[parentLocale];
if (match) {
return match;
}
if (parentLocale === 'en') {
return localeEn;
}
throw new Error(`Missing locale data for the locale "${locale}".`);
}
/**
* Retrieves the currency symbol for a given currency code.

View File

@ -25,7 +25,7 @@ export interface PopStateEvent {
*
* A service that applications can use to interact with a browser's URL.
*
* Depending on the `LocationStrategy` used, `Location` will either persist
* Depending on the {@link LocationStrategy} used, `Location` will either persist
* to the URL's path or the URL's hash segment.
*
* @usageNotes
@ -43,8 +43,7 @@ export interface PopStateEvent {
*
* ### Example
*
* <code-example path='common/location/ts/path_location_component.ts'
* region='LocationComponent'></code-example>
* {@example common/location/ts/path_location_component.ts region='LocationComponent'}
*
* @publicApi
*/

View File

@ -10,17 +10,18 @@ import {InjectionToken} from '@angular/core';
import {LocationChangeListener} from './platform_location';
/**
* Enables the `Location` service to read route state from the browser's URL.
* Angular provides two strategies:
* `HashLocationStrategy` and `PathLocationStrategy`.
* `LocationStrategy` is responsible for representing and reading route state
* from the browser's URL. Angular provides two strategies:
* {@link HashLocationStrategy} and {@link PathLocationStrategy}.
*
* Applications should use the `Router` or `Location` services to
* This is used under the hood of the {@link Location} service.
*
* Applications should use the {@link Router} or {@link Location} services to
* interact with application route state.
*
* For instance, `HashLocationStrategy` produces URLs like
* <code class="no-auto-link">http://example.com#/foo</code>,
* and `PathLocationStrategy` produces
* <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL.
* For instance, {@link HashLocationStrategy} produces URLs like
* `http://example.com#/foo`, and {@link PathLocationStrategy} produces
* `http://example.com/foo` as an equivalent URL.
*
* See these two classes for more.
*

View File

@ -22,7 +22,6 @@ export abstract class ViewportScroller {
// See #23917
/** @nocollapse */
static ngInjectableDef = ɵɵdefineInjectable({
token: ViewportScroller,
providedIn: 'root',
factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler))
});

View File

@ -204,20 +204,6 @@ describe('NgTemplateOutlet', () => {
fixture.componentInstance.value = 'baz';
detectChangesAndExpectText('');
});
// https://github.com/angular/angular/issues/30801
it('should not throw if the context is left blank', () => {
const template = `
<ng-template #testTemplate>test</ng-template>
<ng-template [ngTemplateOutlet]="testTemplate" [ngTemplateOutletContext]=""></ng-template>
`;
expect(() => {
fixture = createTestComponent(template);
detectChangesAndExpectText('test');
}).not.toThrow();
});
});
@Injectable()

View File

@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ɵfindLocaleData as findLocaleData} from '@angular/core';
import localeCaESVALENCIA from '@angular/common/locales/ca-ES-VALENCIA';
import localeEn from '@angular/common/locales/en';
import localeFr from '@angular/common/locales/fr';
@ -14,7 +13,7 @@ import localeZh from '@angular/common/locales/zh';
import localeFrCA from '@angular/common/locales/fr-CA';
import localeEnAU from '@angular/common/locales/en-AU';
import {registerLocaleData} from '../../src/i18n/locale_data';
import {getCurrencySymbol, getLocaleDateFormat, FormatWidth, getNumberOfCurrencyDigits} from '../../src/i18n/locale_data_api';
import {findLocaleData, getCurrencySymbol, getLocaleDateFormat, FormatWidth, getNumberOfCurrencyDigits} from '../../src/i18n/locale_data_api';
{
describe('locale data api', () => {

View File

@ -0,0 +1,27 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../",
"paths": {
"@angular/core": [
"../../../dist/packages/core"
],
"@angular/common": [
"../../../dist/packages/common"
]
},
"outDir": "../../../dist/packages/common"
},
"files": [
"public_api.ts",
"../../../node_modules/zone.js/dist/zone.js.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "testing.js",
"flatModuleId": "@angular/common/testing"
}
}

View File

@ -0,0 +1,25 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"paths": {
"@angular/core": ["../../dist/packages/core"]
},
"outDir": "../../dist/packages/common"
},
"files": [
"public_api.ts",
"../../node_modules/zone.js/dist/zone.js.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "common.js",
"flatModuleId": "@angular/common"
}
}

View File

@ -0,0 +1,29 @@
{
"extends": "../tsconfig-build.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "../",
"paths": {
"@angular/common": [
"../../../dist/packages/common"
],
"@angular/core": [
"../../../dist/packages/core"
],
"@angular/platform-browser": [
"../../../dist/packages/platform-browser"
]
},
"outDir": "../../../dist/packages/common"
},
"files": [
"public_api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": false,
"skipTemplateCodegen": true,
"flatModuleOutFile": "upgrade.js",
"flatModuleId": "@angular/common/upgrade"
}
}

View File

@ -29,7 +29,6 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/entry_point",
"//packages/compiler-cli/src/ngtsc/imports",
"//packages/compiler-cli/src/ngtsc/incremental",
"//packages/compiler-cli/src/ngtsc/indexer",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/partial_evaluator",
"//packages/compiler-cli/src/ngtsc/path",

View File

@ -12,7 +12,6 @@ import {EntryPointJsonProperty, EntryPointPackageJson} from './src/packages/entr
export {ConsoleLogger, LogLevel} from './src/logging/console_logger';
export {Logger} from './src/logging/logger';
export {NgccOptions, mainNgcc as process} from './src/main';
export {PathMappings} from './src/utils';
export function hasBeenProcessed(packageJson: object, format: string) {
// We are wrapping this function to hide the internal types.

View File

@ -6,9 +6,9 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as path from 'canonical-path';
import * as yargs from 'yargs';
import {AbsoluteFsPath} from '../src/ngtsc/path';
import {mainNgcc} from './src/main';
import {ConsoleLogger, LogLevel} from './src/logging/console_logger';
@ -56,7 +56,7 @@ if (require.main === module) {
'The formats option (-f/--formats) has been removed. Consider the properties option (-p/--properties) instead.');
process.exit(1);
}
const baseSourcePath = AbsoluteFsPath.resolve(options['s'] || './node_modules');
const baseSourcePath = path.resolve(options['s'] || './node_modules');
const propertiesToConsider: string[] = options['p'];
const targetEntryPointPath = options['t'] ? options['t'] : undefined;
const compileAllFormats = !options['first-only'];

View File

@ -6,6 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ConstantPool} from '@angular/compiler';
import {NOOP_PERF_RECORDER} from '@angular/compiler-cli/src/ngtsc/perf';
import * as path from 'canonical-path';
import * as fs from 'fs';
import * as ts from 'typescript';
import {BaseDefDecoratorHandler, ComponentDecoratorHandler, DirectiveDecoratorHandler, InjectableDecoratorHandler, NgModuleDecoratorHandler, PipeDecoratorHandler, ReferencesRegistry, ResourceLoader} from '../../../src/ngtsc/annotations';
@ -14,10 +17,9 @@ import {AbsoluteModuleStrategy, LocalIdentifierStrategy, LogicalProjectStrategy,
import {CompoundMetadataReader, CompoundMetadataRegistry, DtsMetadataReader, LocalMetadataRegistry} from '../../../src/ngtsc/metadata';
import {PartialEvaluator} from '../../../src/ngtsc/partial_evaluator';
import {AbsoluteFsPath, LogicalFileSystem} from '../../../src/ngtsc/path';
import {ClassDeclaration, ClassSymbol, Decorator} from '../../../src/ngtsc/reflection';
import {LocalModuleScopeRegistry, MetadataDtsModuleScopeResolver} from '../../../src/ngtsc/scope';
import {CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence} from '../../../src/ngtsc/transform';
import {FileSystem} from '../file_system/file_system';
import {DecoratedClass} from '../host/decorated_class';
import {NgccReflectionHost} from '../host/ngcc_host';
import {isDefined} from '../utils';
@ -26,10 +28,7 @@ export interface AnalyzedFile {
analyzedClasses: AnalyzedClass[];
}
export interface AnalyzedClass {
name: string;
decorators: Decorator[]|null;
declaration: ClassDeclaration;
export interface AnalyzedClass extends DecoratedClass {
diagnostics?: ts.Diagnostic[];
matches: {handler: DecoratorHandler<any, any>; analysis: any;}[];
}
@ -54,12 +53,11 @@ export interface MatchingHandler<A, M> {
* Simple class that resolves and loads files directly from the filesystem.
*/
class NgccResourceLoader implements ResourceLoader {
constructor(private fs: FileSystem) {}
canPreload = false;
preload(): undefined|Promise<void> { throw new Error('Not implemented.'); }
load(url: string): string { return this.fs.readFile(AbsoluteFsPath.resolve(url)); }
load(url: string): string { return fs.readFileSync(url, 'utf8'); }
resolve(url: string, containingFile: string): string {
return AbsoluteFsPath.resolve(AbsoluteFsPath.dirname(AbsoluteFsPath.from(containingFile)), url);
return path.resolve(path.dirname(containingFile), url);
}
}
@ -67,17 +65,16 @@ class NgccResourceLoader implements ResourceLoader {
* This Analyzer will analyze the files that have decorated classes that need to be transformed.
*/
export class DecorationAnalyzer {
resourceManager = new NgccResourceLoader(this.fs);
resourceManager = new NgccResourceLoader();
metaRegistry = new LocalMetadataRegistry();
dtsMetaReader = new DtsMetadataReader(this.typeChecker, this.reflectionHost);
fullMetaReader = new CompoundMetadataReader([this.metaRegistry, this.dtsMetaReader]);
refEmitter = new ReferenceEmitter([
new LocalIdentifierStrategy(),
new AbsoluteModuleStrategy(
this.program, this.typeChecker, this.options, this.host, this.reflectionHost),
new AbsoluteModuleStrategy(this.program, this.typeChecker, this.options, this.host),
// TODO(alxhub): there's no reason why ngcc needs the "logical file system" logic here, as ngcc
// projects only ever have one rootDir. Instead, ngcc should just switch its emitted import
// based on whether a bestGuessOwningModule is present in the Reference.
// projects only ever have one rootDir. Instead, ngcc should just switch its emitted imort based
// on whether a bestGuessOwningModule is present in the Reference.
new LogicalProjectStrategy(this.typeChecker, new LogicalFileSystem(this.rootDirs)),
]);
dtsModuleScopeResolver =
@ -113,7 +110,7 @@ export class DecorationAnalyzer {
];
constructor(
private fs: FileSystem, private program: ts.Program, private options: ts.CompilerOptions,
private program: ts.Program, private options: ts.CompilerOptions,
private host: ts.CompilerHost, private typeChecker: ts.TypeChecker,
private reflectionHost: NgccReflectionHost, private referencesRegistry: ReferencesRegistry,
private rootDirs: AbsoluteFsPath[], private isCore: boolean) {}
@ -136,18 +133,19 @@ export class DecorationAnalyzer {
}
protected analyzeFile(sourceFile: ts.SourceFile): AnalyzedFile|undefined {
const analyzedClasses = this.reflectionHost.findClassSymbols(sourceFile)
.map(symbol => this.analyzeClass(symbol))
.filter(isDefined);
return analyzedClasses.length ? {sourceFile, analyzedClasses} : undefined;
const decoratedClasses = this.reflectionHost.findDecoratedClasses(sourceFile);
return decoratedClasses.length ? {
sourceFile,
analyzedClasses: decoratedClasses.map(clazz => this.analyzeClass(clazz)).filter(isDefined)
} :
undefined;
}
protected analyzeClass(symbol: ClassSymbol): AnalyzedClass|null {
const declaration = symbol.valueDeclaration;
const decorators = this.reflectionHost.getDecoratorsOfSymbol(symbol);
protected analyzeClass(clazz: DecoratedClass): AnalyzedClass|null {
const matchingHandlers = this.handlers
.map(handler => {
const detected = handler.detect(declaration, decorators);
const detected =
handler.detect(clazz.declaration, clazz.decorators);
return {handler, detected};
})
.filter(isMatchingHandler);
@ -185,19 +183,13 @@ export class DecorationAnalyzer {
const matches: {handler: DecoratorHandler<any, any>, analysis: any}[] = [];
const allDiagnostics: ts.Diagnostic[] = [];
for (const {handler, detected} of detections) {
const {analysis, diagnostics} = handler.analyze(declaration, detected.metadata);
const {analysis, diagnostics} = handler.analyze(clazz.declaration, detected.metadata);
if (diagnostics !== undefined) {
allDiagnostics.push(...diagnostics);
}
matches.push({handler, analysis});
}
return {
name: symbol.name,
declaration,
decorators,
matches,
diagnostics: allDiagnostics.length > 0 ? allDiagnostics : undefined
};
return {...clazz, matches, diagnostics: allDiagnostics.length > 0 ? allDiagnostics : undefined};
}
protected compileFile(analyzedFile: AnalyzedFile): CompiledFile {

View File

@ -63,7 +63,7 @@ export class ModuleWithProvidersAnalyzer {
ngModule = {node: dtsNgModule, viaModule: null};
}
const dtsFile = dtsFn.getSourceFile();
const analysis = analyses.has(dtsFile) ? analyses.get(dtsFile) : [];
const analysis = analyses.get(dtsFile) || [];
analysis.push({declaration: dtsFn, ngModule});
analyses.set(dtsFile, analysis);
}

View File

@ -7,7 +7,6 @@
*/
import * as ts from 'typescript';
import {AbsoluteFsPath} from '../../../src/ngtsc/path';
import {Declaration} from '../../../src/ngtsc/reflection';
import {NgccReflectionHost} from '../host/ngcc_host';
import {hasNameIdentifier, isDefined} from '../utils';
@ -15,8 +14,8 @@ import {NgccReferencesRegistry} from './ngcc_references_registry';
export interface ExportInfo {
identifier: string;
from: AbsoluteFsPath;
dtsFrom?: AbsoluteFsPath|null;
from: string;
dtsFrom?: string|null;
alias?: string|null;
}
export type PrivateDeclarationsAnalyses = ExportInfo[];
@ -49,8 +48,8 @@ export class PrivateDeclarationsAnalyzer {
if (exports) {
exports.forEach((declaration, exportedName) => {
if (hasNameIdentifier(declaration.node)) {
if (privateDeclarations.has(declaration.node.name)) {
const privateDeclaration = privateDeclarations.get(declaration.node.name) !;
const privateDeclaration = privateDeclarations.get(declaration.node.name);
if (privateDeclaration) {
if (privateDeclaration.node !== declaration.node) {
throw new Error(`${declaration.node.name.text} is declared multiple times.`);
}
@ -94,12 +93,11 @@ export class PrivateDeclarationsAnalyzer {
});
return Array.from(privateDeclarations.keys()).map(id => {
const from = AbsoluteFsPath.fromSourceFile(id.getSourceFile());
const from = id.getSourceFile().fileName;
const declaration = privateDeclarations.get(id) !;
const alias = exportAliasDeclarations.has(id) ? exportAliasDeclarations.get(id) ! : null;
const alias = exportAliasDeclarations.get(id) || null;
const dtsDeclaration = this.host.getDtsDeclaration(declaration.node);
const dtsFrom =
dtsDeclaration && AbsoluteFsPath.fromSourceFile(dtsDeclaration.getSourceFile());
const dtsFrom = dtsDeclaration && dtsDeclaration.getSourceFile().fileName;
return {identifier: id.text, from, dtsFrom, alias};
});

View File

@ -1,107 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as ts from 'typescript';
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
import {FileSystem} from '../file_system/file_system';
import {isRequireCall} from '../host/commonjs_host';
import {DependencyHost, DependencyInfo} from './dependency_host';
import {ModuleResolver, ResolvedDeepImport, ResolvedRelativeModule} from './module_resolver';
/**
* Helper functions for computing dependencies.
*/
export class CommonJsDependencyHost implements DependencyHost {
constructor(private fs: FileSystem, private moduleResolver: ModuleResolver) {}
/**
* Find all the dependencies for the entry-point at the given path.
*
* @param entryPointPath The absolute path to the JavaScript file that represents an entry-point.
* @returns Information about the dependencies of the entry-point, including those that were
* missing or deep imports into other entry-points.
*/
findDependencies(entryPointPath: AbsoluteFsPath): DependencyInfo {
const dependencies = new Set<AbsoluteFsPath>();
const missing = new Set<AbsoluteFsPath|PathSegment>();
const deepImports = new Set<AbsoluteFsPath>();
const alreadySeen = new Set<AbsoluteFsPath>();
this.recursivelyFindDependencies(
entryPointPath, dependencies, missing, deepImports, alreadySeen);
return {dependencies, missing, deepImports};
}
/**
* Compute the dependencies of the given file.
*
* @param file An absolute path to the file whose dependencies we want to get.
* @param dependencies A set that will have the absolute paths of resolved entry points added to
* it.
* @param missing A set that will have the dependencies that could not be found added to it.
* @param deepImports A set that will have the import paths that exist but cannot be mapped to
* entry-points, i.e. deep-imports.
* @param alreadySeen A set that is used to track internal dependencies to prevent getting stuck
* in a
* circular dependency loop.
*/
private recursivelyFindDependencies(
file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>,
deepImports: Set<AbsoluteFsPath>, alreadySeen: Set<AbsoluteFsPath>): void {
const fromContents = this.fs.readFile(file);
if (!this.hasRequireCalls(fromContents)) {
// Avoid parsing the source file as there are no require calls.
return;
}
// Parse the source into a TypeScript AST and then walk it looking for imports and re-exports.
const sf =
ts.createSourceFile(file, fromContents, ts.ScriptTarget.ES2015, false, ts.ScriptKind.JS);
for (const statement of sf.statements) {
const declarations =
ts.isVariableStatement(statement) ? statement.declarationList.declarations : [];
for (const declaration of declarations) {
if (declaration.initializer && isRequireCall(declaration.initializer)) {
const importPath = declaration.initializer.arguments[0].text;
const resolvedModule = this.moduleResolver.resolveModuleImport(importPath, file);
if (resolvedModule) {
if (resolvedModule instanceof ResolvedRelativeModule) {
const internalDependency = resolvedModule.modulePath;
if (!alreadySeen.has(internalDependency)) {
alreadySeen.add(internalDependency);
this.recursivelyFindDependencies(
internalDependency, dependencies, missing, deepImports, alreadySeen);
}
} else {
if (resolvedModule instanceof ResolvedDeepImport) {
deepImports.add(resolvedModule.importPath);
} else {
dependencies.add(resolvedModule.entryPointPath);
}
}
} else {
missing.add(importPath);
}
}
}
}
}
/**
* Check whether a source file needs to be parsed for imports.
* This is a performance short-circuit, which saves us from creating
* a TypeScript AST unnecessarily.
*
* @param source The content of the source file to check.
*
* @returns false if there are definitely no require calls
* in this file, true otherwise.
*/
hasRequireCalls(source: string): boolean { return /require\(['"]/.test(source); }
}

View File

@ -1,19 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
export interface DependencyHost {
findDependencies(entryPointPath: AbsoluteFsPath): DependencyInfo;
}
export interface DependencyInfo {
dependencies: Set<AbsoluteFsPath>;
missing: Set<AbsoluteFsPath|PathSegment>;
deepImports: Set<AbsoluteFsPath>;
}

View File

@ -1,117 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as ts from 'typescript';
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
import {FileSystem} from '../file_system/file_system';
import {DependencyHost, DependencyInfo} from './dependency_host';
import {ModuleResolver, ResolvedDeepImport, ResolvedRelativeModule} from './module_resolver';
/**
* Helper functions for computing dependencies.
*/
export class EsmDependencyHost implements DependencyHost {
constructor(private fs: FileSystem, private moduleResolver: ModuleResolver) {}
/**
* Find all the dependencies for the entry-point at the given path.
*
* @param entryPointPath The absolute path to the JavaScript file that represents an entry-point.
* @returns Information about the dependencies of the entry-point, including those that were
* missing or deep imports into other entry-points.
*/
findDependencies(entryPointPath: AbsoluteFsPath): DependencyInfo {
const dependencies = new Set<AbsoluteFsPath>();
const missing = new Set<AbsoluteFsPath|PathSegment>();
const deepImports = new Set<AbsoluteFsPath>();
const alreadySeen = new Set<AbsoluteFsPath>();
this.recursivelyFindDependencies(
entryPointPath, dependencies, missing, deepImports, alreadySeen);
return {dependencies, missing, deepImports};
}
/**
* Compute the dependencies of the given file.
*
* @param file An absolute path to the file whose dependencies we want to get.
* @param dependencies A set that will have the absolute paths of resolved entry points added to
* it.
* @param missing A set that will have the dependencies that could not be found added to it.
* @param deepImports A set that will have the import paths that exist but cannot be mapped to
* entry-points, i.e. deep-imports.
* @param alreadySeen A set that is used to track internal dependencies to prevent getting stuck
* in a
* circular dependency loop.
*/
private recursivelyFindDependencies(
file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>,
deepImports: Set<string>, alreadySeen: Set<AbsoluteFsPath>): void {
const fromContents = this.fs.readFile(file);
if (!this.hasImportOrReexportStatements(fromContents)) {
return;
}
// Parse the source into a TypeScript AST and then walk it looking for imports and re-exports.
const sf =
ts.createSourceFile(file, fromContents, ts.ScriptTarget.ES2015, false, ts.ScriptKind.JS);
sf.statements
// filter out statements that are not imports or reexports
.filter(this.isStringImportOrReexport)
// Grab the id of the module that is being imported
.map(stmt => stmt.moduleSpecifier.text)
// Resolve this module id into an absolute path
.forEach(importPath => {
const resolvedModule = this.moduleResolver.resolveModuleImport(importPath, file);
if (resolvedModule) {
if (resolvedModule instanceof ResolvedRelativeModule) {
const internalDependency = resolvedModule.modulePath;
if (!alreadySeen.has(internalDependency)) {
alreadySeen.add(internalDependency);
this.recursivelyFindDependencies(
internalDependency, dependencies, missing, deepImports, alreadySeen);
}
} else {
if (resolvedModule instanceof ResolvedDeepImport) {
deepImports.add(resolvedModule.importPath);
} else {
dependencies.add(resolvedModule.entryPointPath);
}
}
} else {
missing.add(importPath);
}
});
}
/**
* Check whether the given statement is an import with a string literal module specifier.
* @param stmt the statement node to check.
* @returns true if the statement is an import with a string literal module specifier.
*/
isStringImportOrReexport(stmt: ts.Statement): stmt is ts.ImportDeclaration&
{moduleSpecifier: ts.StringLiteral} {
return ts.isImportDeclaration(stmt) ||
ts.isExportDeclaration(stmt) && !!stmt.moduleSpecifier &&
ts.isStringLiteral(stmt.moduleSpecifier);
}
/**
* Check whether a source file needs to be parsed for imports.
* This is a performance short-circuit, which saves us from creating
* a TypeScript AST unnecessarily.
*
* @param source The content of the source file to check.
*
* @returns false if there are definitely no import or re-export statements
* in this file, true otherwise.
*/
hasImportOrReexportStatements(source: string): boolean {
return /(import|export)\s.+from/.test(source);
}
}

View File

@ -1,280 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AbsoluteFsPath} from '../../../src/ngtsc/path';
import {FileSystem} from '../file_system/file_system';
import {PathMappings, isRelativePath} from '../utils';
/**
* This is a very cut-down implementation of the TypeScript module resolution strategy.
*
* It is specific to the needs of ngcc and is not intended to be a drop-in replacement
* for the TS module resolver. It is used to compute the dependencies between entry-points
* that may be compiled by ngcc.
*
* The algorithm only finds `.js` files for internal/relative imports and paths to
* the folder containing the `package.json` of the entry-point for external imports.
*
* It can cope with nested `node_modules` folders and also supports `paths`/`baseUrl`
* configuration properties, as provided in a `ts.CompilerOptions` object.
*/
export class ModuleResolver {
private pathMappings: ProcessedPathMapping[];
constructor(private fs: FileSystem, pathMappings?: PathMappings, private relativeExtensions = [
'.js', '/index.js'
]) {
this.pathMappings = pathMappings ? this.processPathMappings(pathMappings) : [];
}
/**
* Resolve an absolute path for the `moduleName` imported into a file at `fromPath`.
* @param moduleName The name of the import to resolve.
* @param fromPath The path to the file containing the import.
* @returns A path to the resolved module or null if missing.
* Specifically:
* * the absolute path to the package.json of an external module
* * a JavaScript file of an internal module
* * null if none exists.
*/
resolveModuleImport(moduleName: string, fromPath: AbsoluteFsPath): ResolvedModule|null {
if (isRelativePath(moduleName)) {
return this.resolveAsRelativePath(moduleName, fromPath);
} else {
return this.pathMappings.length && this.resolveByPathMappings(moduleName, fromPath) ||
this.resolveAsEntryPoint(moduleName, fromPath);
}
}
/**
* Convert the `pathMappings` into a collection of `PathMapper` functions.
*/
private processPathMappings(pathMappings: PathMappings): ProcessedPathMapping[] {
const baseUrl = AbsoluteFsPath.from(pathMappings.baseUrl);
return Object.keys(pathMappings.paths).map(pathPattern => {
const matcher = splitOnStar(pathPattern);
const templates = pathMappings.paths[pathPattern].map(splitOnStar);
return {matcher, templates, baseUrl};
});
}
/**
* Try to resolve a module name, as a relative path, from the `fromPath`.
*
* As it is relative, it only looks for files that end in one of the `relativeExtensions`.
* For example: `${moduleName}.js` or `${moduleName}/index.js`.
* If neither of these files exist then the method returns `null`.
*/
private resolveAsRelativePath(moduleName: string, fromPath: AbsoluteFsPath): ResolvedModule|null {
const resolvedPath = this.resolvePath(
AbsoluteFsPath.resolve(AbsoluteFsPath.dirname(fromPath), moduleName),
this.relativeExtensions);
return resolvedPath && new ResolvedRelativeModule(resolvedPath);
}
/**
* Try to resolve the `moduleName`, by applying the computed `pathMappings` and
* then trying to resolve the mapped path as a relative or external import.
*
* Whether the mapped path is relative is defined as it being "below the `fromPath`" and not
* containing `node_modules`.
*
* If the mapped path is not relative but does not resolve to an external entry-point, then we
* check whether it would have resolved to a relative path, in which case it is marked as a
* "deep-import".
*/
private resolveByPathMappings(moduleName: string, fromPath: AbsoluteFsPath): ResolvedModule|null {
const mappedPaths = this.findMappedPaths(moduleName);
if (mappedPaths.length > 0) {
const packagePath = this.findPackagePath(fromPath);
if (packagePath !== null) {
for (const mappedPath of mappedPaths) {
const isRelative =
mappedPath.startsWith(packagePath) && !mappedPath.includes('node_modules');
if (isRelative) {
return this.resolveAsRelativePath(mappedPath, fromPath);
} else if (this.isEntryPoint(mappedPath)) {
return new ResolvedExternalModule(mappedPath);
} else if (this.resolveAsRelativePath(mappedPath, fromPath)) {
return new ResolvedDeepImport(mappedPath);
}
}
}
}
return null;
}
/**
* Try to resolve the `moduleName` as an external entry-point by searching the `node_modules`
* folders up the tree for a matching `.../node_modules/${moduleName}`.
*
* If a folder is found but the path does not contain a `package.json` then it is marked as a
* "deep-import".
*/
private resolveAsEntryPoint(moduleName: string, fromPath: AbsoluteFsPath): ResolvedModule|null {
let folder = fromPath;
while (!AbsoluteFsPath.isRoot(folder)) {
folder = AbsoluteFsPath.dirname(folder);
if (folder.endsWith('node_modules')) {
// Skip up if the folder already ends in node_modules
folder = AbsoluteFsPath.dirname(folder);
}
const modulePath = AbsoluteFsPath.resolve(folder, 'node_modules', moduleName);
if (this.isEntryPoint(modulePath)) {
return new ResolvedExternalModule(modulePath);
} else if (this.resolveAsRelativePath(modulePath, fromPath)) {
return new ResolvedDeepImport(modulePath);
}
}
return null;
}
/**
* Attempt to resolve a `path` to a file by appending the provided `postFixes`
* to the `path` and checking if the file exists on disk.
* @returns An absolute path to the first matching existing file, or `null` if none exist.
*/
private resolvePath(path: AbsoluteFsPath, postFixes: string[]): AbsoluteFsPath|null {
for (const postFix of postFixes) {
const testPath = AbsoluteFsPath.fromUnchecked(path + postFix);
if (this.fs.exists(testPath)) {
return testPath;
}
}
return null;
}
/**
* Can we consider the given path as an entry-point to a package?
*
* This is achieved by checking for the existence of `${modulePath}/package.json`.
*/
private isEntryPoint(modulePath: AbsoluteFsPath): boolean {
return this.fs.exists(AbsoluteFsPath.join(modulePath, 'package.json'));
}
/**
* Apply the `pathMappers` to the `moduleName` and return all the possible
* paths that match.
*
* The mapped path is computed for each template in `mapping.templates` by
* replacing the `matcher.prefix` and `matcher.postfix` strings in `path with the
* `template.prefix` and `template.postfix` strings.
*/
private findMappedPaths(moduleName: string): AbsoluteFsPath[] {
const matches = this.pathMappings.map(mapping => this.matchMapping(moduleName, mapping));
let bestMapping: ProcessedPathMapping|undefined;
let bestMatch: string|undefined;
for (let index = 0; index < this.pathMappings.length; index++) {
const mapping = this.pathMappings[index];
const match = matches[index];
if (match !== null) {
// If this mapping had no wildcard then this must be a complete match.
if (!mapping.matcher.hasWildcard) {
bestMatch = match;
bestMapping = mapping;
break;
}
// The best matched mapping is the one with the longest prefix.
if (!bestMapping || mapping.matcher.prefix > bestMapping.matcher.prefix) {
bestMatch = match;
bestMapping = mapping;
}
}
}
return (bestMapping && bestMatch) ? this.computeMappedTemplates(bestMapping, bestMatch) : [];
}
/**
* Attempt to find a mapped path for the given `path` and a `mapping`.
*
* The `path` matches the `mapping` if if it starts with `matcher.prefix` and ends with
* `matcher.postfix`.
*
* @returns the wildcard segment of a matched `path`, or `null` if no match.
*/
private matchMapping(path: string, mapping: ProcessedPathMapping): string|null {
const {prefix, postfix, hasWildcard} = mapping.matcher;
if (path.startsWith(prefix) && path.endsWith(postfix)) {
return hasWildcard ? path.substring(prefix.length, path.length - postfix.length) : '';
}
return null;
}
/**
* Compute the candidate paths from the given mapping's templates using the matched
* string.
*/
private computeMappedTemplates(mapping: ProcessedPathMapping, match: string) {
return mapping.templates.map(
template =>
AbsoluteFsPath.resolve(mapping.baseUrl, template.prefix + match + template.postfix));
}
/**
* Search up the folder tree for the first folder that contains `package.json`
* or `null` if none is found.
*/
private findPackagePath(path: AbsoluteFsPath): AbsoluteFsPath|null {
let folder = path;
while (!AbsoluteFsPath.isRoot(folder)) {
folder = AbsoluteFsPath.dirname(folder);
if (this.fs.exists(AbsoluteFsPath.join(folder, 'package.json'))) {
return folder;
}
}
return null;
}
}
/** The result of resolving an import to a module. */
export type ResolvedModule = ResolvedExternalModule | ResolvedRelativeModule | ResolvedDeepImport;
/**
* A module that is external to the package doing the importing.
* In this case we capture the folder containing the entry-point.
*/
export class ResolvedExternalModule {
constructor(public entryPointPath: AbsoluteFsPath) {}
}
/**
* A module that is relative to the module doing the importing, and so internal to the
* source module's package.
*/
export class ResolvedRelativeModule {
constructor(public modulePath: AbsoluteFsPath) {}
}
/**
* A module that is external to the package doing the importing but pointing to a
* module that is deep inside a package, rather than to an entry-point of the package.
*/
export class ResolvedDeepImport {
constructor(public importPath: AbsoluteFsPath) {}
}
function splitOnStar(str: string): PathMappingPattern {
const [prefix, postfix] = str.split('*', 2);
return {prefix, postfix: postfix || '', hasWildcard: postfix !== undefined};
}
interface ProcessedPathMapping {
baseUrl: AbsoluteFsPath;
matcher: PathMappingPattern;
templates: PathMappingPattern[];
}
interface PathMappingPattern {
prefix: string;
postfix: string;
hasWildcard: boolean;
}

View File

@ -1,111 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as ts from 'typescript';
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
import {FileSystem} from '../file_system/file_system';
import {getImportsOfUmdModule, parseStatementForUmdModule} from '../host/umd_host';
import {DependencyHost, DependencyInfo} from './dependency_host';
import {ModuleResolver, ResolvedDeepImport, ResolvedRelativeModule} from './module_resolver';
/**
* Helper functions for computing dependencies.
*/
export class UmdDependencyHost implements DependencyHost {
constructor(private fs: FileSystem, private moduleResolver: ModuleResolver) {}
/**
* Find all the dependencies for the entry-point at the given path.
*
* @param entryPointPath The absolute path to the JavaScript file that represents an entry-point.
* @returns Information about the dependencies of the entry-point, including those that were
* missing or deep imports into other entry-points.
*/
findDependencies(entryPointPath: AbsoluteFsPath): DependencyInfo {
const dependencies = new Set<AbsoluteFsPath>();
const missing = new Set<AbsoluteFsPath|PathSegment>();
const deepImports = new Set<AbsoluteFsPath>();
const alreadySeen = new Set<AbsoluteFsPath>();
this.recursivelyFindDependencies(
entryPointPath, dependencies, missing, deepImports, alreadySeen);
return {dependencies, missing, deepImports};
}
/**
* Compute the dependencies of the given file.
*
* @param file An absolute path to the file whose dependencies we want to get.
* @param dependencies A set that will have the absolute paths of resolved entry points added to
* it.
* @param missing A set that will have the dependencies that could not be found added to it.
* @param deepImports A set that will have the import paths that exist but cannot be mapped to
* entry-points, i.e. deep-imports.
* @param alreadySeen A set that is used to track internal dependencies to prevent getting stuck
* in a
* circular dependency loop.
*/
private recursivelyFindDependencies(
file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>,
deepImports: Set<string>, alreadySeen: Set<AbsoluteFsPath>): void {
const fromContents = this.fs.readFile(file);
if (!this.hasRequireCalls(fromContents)) {
// Avoid parsing the source file as there are no require calls.
return;
}
// Parse the source into a TypeScript AST and then walk it looking for imports and re-exports.
const sf =
ts.createSourceFile(file, fromContents, ts.ScriptTarget.ES2015, false, ts.ScriptKind.JS);
if (sf.statements.length !== 1) {
return;
}
const umdModule = parseStatementForUmdModule(sf.statements[0]);
const umdImports = umdModule && getImportsOfUmdModule(umdModule);
if (umdImports === null) {
return;
}
umdImports.forEach(umdImport => {
const resolvedModule = this.moduleResolver.resolveModuleImport(umdImport.path, file);
if (resolvedModule) {
if (resolvedModule instanceof ResolvedRelativeModule) {
const internalDependency = resolvedModule.modulePath;
if (!alreadySeen.has(internalDependency)) {
alreadySeen.add(internalDependency);
this.recursivelyFindDependencies(
internalDependency, dependencies, missing, deepImports, alreadySeen);
}
} else {
if (resolvedModule instanceof ResolvedDeepImport) {
deepImports.add(resolvedModule.importPath);
} else {
dependencies.add(resolvedModule.entryPointPath);
}
}
} else {
missing.add(umdImport.path);
}
});
}
/**
* Check whether a source file needs to be parsed for imports.
* This is a performance short-circuit, which saves us from creating
* a TypeScript AST unnecessarily.
*
* @param source The content of the source file to check.
*
* @returns false if there are definitely no require calls
* in this file, true otherwise.
*/
hasRequireCalls(source: string): boolean { return /require\(['"]/.test(source); }
}

View File

@ -1,38 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
/**
* A basic interface to abstract the underlying file-system.
*
* This makes it easier to provide mock file-systems in unit tests,
* but also to create clever file-systems that have features such as caching.
*/
export interface FileSystem {
exists(path: AbsoluteFsPath): boolean;
readFile(path: AbsoluteFsPath): string;
writeFile(path: AbsoluteFsPath, data: string): void;
readdir(path: AbsoluteFsPath): PathSegment[];
lstat(path: AbsoluteFsPath): FileStats;
stat(path: AbsoluteFsPath): FileStats;
pwd(): AbsoluteFsPath;
copyFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
moveFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
ensureDir(path: AbsoluteFsPath): void;
}
/**
* Information about an object in the FileSystem.
* This is analogous to the `fs.Stats` class in Node.js.
*/
export interface FileStats {
isFile(): boolean;
isDirectory(): boolean;
isSymbolicLink(): boolean;
}

View File

@ -1,30 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as fs from 'fs';
import {cp, mkdir, mv} from 'shelljs';
import {AbsoluteFsPath, PathSegment} from '../../../src/ngtsc/path';
import {FileSystem} from './file_system';
/**
* A wrapper around the Node.js file-system (i.e the `fs` package).
*/
export class NodeJSFileSystem implements FileSystem {
exists(path: AbsoluteFsPath): boolean { return fs.existsSync(path); }
readFile(path: AbsoluteFsPath): string { return fs.readFileSync(path, 'utf8'); }
writeFile(path: AbsoluteFsPath, data: string): void {
return fs.writeFileSync(path, data, 'utf8');
}
readdir(path: AbsoluteFsPath): PathSegment[] { return fs.readdirSync(path) as PathSegment[]; }
lstat(path: AbsoluteFsPath): fs.Stats { return fs.lstatSync(path); }
stat(path: AbsoluteFsPath): fs.Stats { return fs.statSync(path); }
pwd() { return AbsoluteFsPath.from(process.cwd()); }
copyFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void { cp(from, to); }
moveFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void { mv(from, to); }
ensureDir(path: AbsoluteFsPath): void { mkdir('-p', path); }
}

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