Compare commits

..

225 Commits

Author SHA1 Message Date
cf4edbce40 feat(compiler-cli): expose ngtsc as a TscPlugin
This lets us run ngtsc under the tsc_wrapped custom compiler (Used in Bazel)
It also allows others to simply wire ngtsc into an existing typescript compilation binary
2019-01-28 14:52:06 -08:00
73dcd72afb refactor(ivy): expose resolving URLs in the ResourceLoader (#28199)
Resources can be loaded in the context of another file, which
means that the path to the resource file must be resolved
before it can be loaded.

Previously the API of this interface did not allow the client
code to get access to the resolved URL which is used to load
the resource.

Now this API has been refactored so that you must do the
resource URL resolving first and the loading expects a
resolved URL.

PR Close #28199
2019-01-18 11:03:53 -08:00
7bdf3fe41c revert: "ci: use image based cache for windows BuildKite (#27990)" (#28160)
This reverts commit eb1aae4043.

PR Close #28160
2019-01-18 10:21:38 -08:00
38343a2388 build: set a default module_name for ts_library rules (#28051)
PR Close #28051
2019-01-18 10:16:39 -08:00
45bf911df8 feat(forms): add markAllAsTouched() to AbstractControl (#26812)
Add functionality to mark a control and its descendant controls as touched

Closes #19400

PR Close #26812
2019-01-18 10:12:21 -08:00
ab2bf83398 fix(ivy): destroy injector when module is destroyed (#27793)
Destroys the module's injector when an `NgModule` is destroyed which in turn calls the `ngOnDestroy` methods on the instantiated providers.

This PR resolves FW-739.

PR Close #27793
2019-01-18 10:10:32 -08:00
2b9cc8503d fix(ivy): Ensure proper namespace is used to create elements in JIT (#28144)
PR Close #28144
2019-01-18 09:56:41 -08:00
a58fd210e9 feat(compiler-cli): resolve generated Sass/Less files to .css inputs (#28166)
Users might have run the CSS Preprocessor tool *before* the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

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

PR Close #28166
2019-01-18 09:49:19 -08:00
6940992932 fix(ivy): ensure animation component host listeners are rendered in the sub component (#28210)
Due to the fact that animations in Angular are defined in the component metadata,
all animation trigger definitions are localized to the component and are
inaccessible outside of it. Animation host listeners in Ivy are
rendered in the context of the parent component, but the VE renders them
differently. This patch ensures that animation host listeners are
always registered in the sub component's renderer

Jira issue: FW-943
Jira issue: FW-958

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

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

PR Close #28215
2019-01-18 09:07:52 -08:00
73616ab237 fix(bazel): increase node memory limit for ng_module rule to prevent OOM for big modules (#28237)
This came up as a request from an internal Google team.

Context:
- http://cl/229881085
- https://groups.google.com/a/google.com/forum/#!topic/nodejs/GLqDEOW0MV4

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

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

Jira: FW-967

PR Close #28211
2019-01-17 14:11:42 -08:00
f8ad4d1e99 test(language-service): Improve integration test (#28168)
The current integration test for language service involves piping the
results of one process to another using Unix pipes.
This makes the test hard to debug, and hard to configure.

This commit refactors the integration test to use regular Jasmine
scaffolding.

More importantly, it tests the way the language service will actually
be installed by end users. Users would not have to add
`@angular/language-service` to the plugins section in tsconfig.json
Instead, all they need to do is install the *extension* from
the VS Code Marketplace and Angular Language Service will be loaded
as a global plugin.

PR Close #28168
2019-01-17 14:11:28 -08:00
5a582a8afd fix(ivy): ensure element removal triggers host removal animations (#28162)
Prior to this fix Ivy would not execute any animation triggers
that exist as host bindings on an element if it is removed by
the parent template.

PR Close #28162
2019-01-17 09:58:50 -08:00
e172e97e13 fix(ivy): ensure animation @trigger ordering is correctly delivered to the renderer (#28165)
In Ivy when elements are created a series of static attribute names are provided
over to the construction instruction of that element. Static attribute names
include non-binding attribues (like `<div selected>`) as well as animation bindings
that do not have a RHS value (like `<div @foo>`). Because of this distinction,
value-less animation triggers are rendered first before value-full animation
bindings are and this improper ordering has caused various existing tests to fail.
This patch ensures that animation bindings are evaluated in the order that they
exist within the HTML template code (or host binding code).

PR Close #28165
2019-01-17 09:58:29 -08:00
0d6913f037 fix(ivy): ensure interpolated style/classes do not cause tracking issues for bindings (#28190)
With the refactoring or how styles/classes are implmented in Ivy,
interpolation has caused the binding code to mess up since interpolation
itself takes up its own slot in Ivy's memory management code. This patch
makes sure that interpolation works as expected with class and style
bindings.

Jira issue: FW-944

PR Close #28190
2019-01-17 09:58:14 -08:00
896cf35afb fix(ivy): ensure renderer begin/end methods are only called during change detection (#28192)
In VE the renderer.begin() and renderer.end() methods are only called
when CD is called on an element. This patch ensures that Ivy does the
same thing.

Jira issue: FW-945

PR Close #28192
2019-01-17 09:57:52 -08:00
1f7d3b9a57 fix(ivy): TestBed should use annotation for the last match rather than the first (#28195)
When we look for matching annotations in TestBed, we should always take the last
matching annotation. Otherwise, we will return superclass data for subclasses,
which would have unintended consequences like directives matching the wrong selectors.

PR Close #28195
2019-01-17 09:57:30 -08:00
8a08ff1571 docs: fix comments in services example (#26194)
PR Close #26194
2019-01-16 17:38:23 -08:00
50cf2ac6d8 fix(docs-infra): improve a11y (#28086)
Issue #27723

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

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

PR Close #28139
2019-01-16 17:37:22 -08:00
1a85de302d test(ivy): add root cause analysis for the remaining projection test (#28152)
Initial thinking was that the bug is in the content projection logic but
it turned out to be a wrong assumption - hence adding a test to illustrate
that basic content projection of view containers works correctly.

What fails in the marked test is the logic quering debug nodes - content
peojection is fine but we never create the 'B' text node since we call
show() method on the "wrong" directive instance.

PR Close #28152
2019-01-16 17:36:54 -08:00
808898d015 fix(ivy): properly project individual nodes (#28152)
PR Close #28152
2019-01-16 17:36:54 -08:00
f59f18c13e feat(bazel): Add support for SASS (#28167)
This commit adds the appropriate rules to the WORKSPACE for a project
that requires SASS support.

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

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

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

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

PR Close #28194
2019-01-16 16:09:58 -08:00
e7d5c12ea4 release: cut the v8.0.0-beta.0 release 2019-01-16 14:06:50 -08:00
1e5e62ef56 docs: release notes for the v7.2.1 release 2019-01-16 13:42:28 -08:00
bac71ef419 fix(ivy): componentFactories not populated in ModuleWithComponentFactories (#28112)
Fixes the `ModuleWithComponentFactories.componentFactories` not being populated when calling `compileModuleAndAllComponentsSync` in Ivy.

These changes resolve FW-929.

PR Close #28112
2019-01-16 09:52:15 -08:00
da1d19b40f test(ivy): add compiler.getModuleId support in R3TestBed (#28097)
This update brings `getModuleId` function support to R3TestBed-specific Compiler instance.

PR Close #28097
2019-01-16 09:51:26 -08:00
9a81f0d9a8 fix(ivy): update i18n/i18nStart and i18nAttributes instruction order (#28163)
Prior to this change element's i18n attributes like "i18n-title" were processed after "i18n" ones that placed "i18n" and "i18nAttributes" instructions in wrong order, thus "i18nAttributes" failed to target its host element at runtime. This change updates processing order and puts "i18nAttributes" instructions in front of "i18n" ones to resolve the problem.

PR Close #28163
2019-01-16 09:50:53 -08:00
c61ea1d5bd fix(ivy): support for multiple ICU expressions in the same i18n block (#28083)
There were two issues with multiple ICU expressions in the same i18n block:
- the regexp that was used to parse the text wasn't able to handle multiple ICU expressions, I've replaced it with parsing the text and searching for brackets (which is what we ended up doing in the end anyway)
- we allocate node indexes for nodes generated by the ICU expressions which increases the expando value, but we would create the nodes for those cases during the update phase. In the mean time we would create some nodes during the creation phase (comment nodes for ICU expressions, text nodes, ...) with an auto increment index. This means that any node created after an ICU expression would get the following index value, but the ICU case nodes expected to use the same index as well... There was a mismatch between the auto generated index, and the expected index which was causing problems when we needed to select those nodes for updates later on. To fix it, I've added the expected node index to the list of mutate codes that we generate, and we do not use an auto increment value anymore.

FW-905 #resolve
PR Close #28083
2019-01-16 09:49:54 -08:00
47665c9937 build(docs-infra): upgrade cli command docs sources to 4ae713b5a (#28175)
Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master).
Relevant changes in [commit range](71e72ecdb...4ae713b5a):

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

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

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

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

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

Jira issue: FW-939

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

PR Close #28181
2019-01-16 09:45:01 -08:00
f983e99fb2 test(ivy): enable passing animation test (#28156)
PR Close #28156
2019-01-15 14:09:52 -08:00
4f009e7a03 refactor(ivy): minor code duplication cleanup (#28155)
PR Close #28155
2019-01-15 14:09:05 -08:00
29bff0f02e feat(ivy): implement compileComponents method for TestBedRender3 (#27778)
The implementation of the `compileComponents` method for `TestBedRender3` was missing.
We now pass each component through `resolveComponentResources` when `TestBed.compileComponents` is called so that `templateUrl` and `styleUrls` can be resolved asynchronously and used once `TestBed.createComponent` is called.
The component's metadata are overriden in `TestBed` instead of mutating the original metadata like this is the case outside of TestBed. The reason for that is that we need to ensure that we didn't mutate anything so that the following tests can run with the same original metadata, otherwise we it could trigger or hide some errors.

FW-553 #resolve

PR Close #27778
2019-01-15 14:08:20 -08:00
3a31a2795e refactor(language-service): Cleanup ts_plugin (#28145)
This commit removes the unnecessary typescriptOnly() helper from
ts_plugin and all unused methods related to that.

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

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

PR Close #28150

PR Close #28151
2019-01-15 11:27:54 -08:00
bc02e31185 fix(ivy): normalize summary and factory shim files paths (#28006)
At the moment, paths stored in `maps` are not normalized and in Windows is causing files not to be found when enabling factory shimming.

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

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

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

PR Close #28006
2019-01-15 11:21:58 -08:00
6072ca87e1 fix(ivy): deps are actually supported (#28076)
This code was throwing if the `deps` array of a provider has several elements, but at the next line it resolves them... With this check `ngtsc` couldn’t compile `ng-bootstrap` for example.

PR Close #28076
2019-01-15 11:01:00 -08:00
9460218f36 docs(router): add clarification for Router config (#28159)
PR Close #28159
2019-01-15 10:54:49 -08:00
850b86749c docs: add api doc for switch directives (#27378)
PR Close #27378
2019-01-15 10:53:03 -08:00
a24120011e docs(core): fix typo (#28042)
PR Close #28042
2019-01-15 09:52:48 -08:00
d49d1e7d73 fix(service-worker): navigation urls backwards compatibility (#27244)
PR Close #27244
2019-01-15 09:50:31 -08:00
2e5752eb06 docs: update the triage and labels doc with the latest processes (#28127)
Fixes #28058

PR Close #28127
2019-01-15 09:48:18 -08:00
da8ee29e72 fix(ivy): throw meaningful error for uninitialized output (#28085)
Throws a similar error to ViewEngine when encountering an `@Output` that hasn't been initialized to an `Observable`.

These changes resolve FW-680.

PR Close #28085
2019-01-15 09:47:21 -08:00
693045165c refactor(ivy): remove def.attributes in favor of the elementHostAttrs instruction (#28089)
Up until this point, all static attribute values (things like `title` and `id`)
defined within the `host` are of a Component/Directive definition were
generated into a `def.attributes` array and then processed at runtime.
This design decision does not lend itself well to tree-shaking and is
inconsistent with other static values such as styles and classes.

This fix ensures that all static attribute values (attributes, classes,
and styles) that exist within a host definition for components and
directives are all assigned via the `elementHostAttrs` instruction.

```
// before
defineDirective({
  ...
  attributes: ['title', 'my title']
  ...
})

//now
defineDirective({
  ...
  hostBindings: function() {
    if (create) {
      elementHostAttrs(..., ['title', 'my-title']);
    }
    ...
  }
  ...
})
```

PR Close #28089
2019-01-15 09:45:41 -08:00
e62eeed7d4 fix(ivy): ensure component/directive class selectors are properly understood (#27849)
Angular allows for `<ng-content>` elements to include a selector which
filters which content-projected entries are inserted into the container
depending on whether or not the selector is matched.

With Ivy this feature has not fully worked due to the massive changes
that took place inside of Ivy's styling algorithm code (which is
responsible for assigning classes and styles to an element). This
fix ensures that content-projection can correctly identify which slot
an element should be placed into when class-based selectors are used.

PR Close #27849
2019-01-15 09:44:50 -08:00
06e5bf1661 fix(bazel): Bazel schematics should add router package (#28141)
This commit fixes a bug whereby a Bazel project created by the
schematics would not compiled if project contains routing module.

It is missing a dependency on the router package.

PR Close #28141
2019-01-14 17:12:00 -08:00
60fecc1284 fixup! refactor(ivy): simplify context discover based on feedback (#28101)
PR Close #28101
2019-01-14 17:11:11 -08:00
b6510a320b fix(ivy): debug node references not returning template ref (#28101)
Fixes the `DebugNode.references` returning a reference to the underlying comment node, rather than the `TemplateRef` that the reference is pointing to. The issue comes from the fact that `discoverLocalRefs` falls back directly to returning the native node, if the ref isn't pointing to a directive, rather than looking through the locals.

These changes resolve FW-870.

PR Close #28101
2019-01-14 17:11:11 -08:00
fa53150692 test(ivy): NodeInjector should know how to get itself (INJECTOR) (#28009)
PR Close #28009
2019-01-14 17:09:26 -08:00
b5c2ef2877 fix(ivy): clone queries correctly for multiple component instances (#27892)
When requesting a queries instance for a node, it was previously
decided whether it needs to be cloned if the node was not already marked
as hosting a query. This check is in place to have only a single queries
instance per node.

The issue with this approach is that no clone is created for subsequent
instantiations of a component, as the TNode is already marked as hosting
a query during first template pass, whereas the cloning of queries
should be independent of first template pass.

To overcome this issue, the queries are assigned an owner TNode such
that it can reliably be determined if a clone needs to be created.

PR Close #27892
2019-01-14 17:08:26 -08:00
ddd8cd0573 docs(ivy): remove duplicated words in architecture doc (#27471)
PR Close #27471
2019-01-14 17:06:42 -08:00
cfb41452ce docs: update testing doc example style for HostListener (#26372)
HostListener is preferred over host metadata by official style guide

PR Close #26372
2019-01-14 17:04:46 -08:00
f1fb62d1e5 fix(core): proper @internal and @nocollapse combined usage fix (#28138)
This update fixes the way the @internal and @nocollapse annotations are used together, which produced errors while running it with Closure compiler. Now two annotations are a part of the same comment block.

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

PR Close #28137
2019-01-14 14:12:18 -08:00
68bdbf0520 fix(ivy): validate props and attrs with "on" prefix at runtime (#28054)
Prior to this change we performed prop and attr name validation at compile time, which failed in case a given prop/attr is an input to a Directive (thus should not be a subject to this check). Since Directive matching in Ivy happens at runtime, the corresponding checks are now moved to runtime as well.

PR Close #28054
2019-01-14 10:53:03 -08:00
857fcfe048 docs: ng config link fix (#28115)
Fixed 'ng config' link to lead to proper CLI command site
PR Close #28115
2019-01-14 10:47:05 -08:00
60fb27c4ab build(docs-infra): upgrade cli command docs sources to 71e72ecdb (#28100)
Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master).
Relevant changes in [commit range](02d2ec250...71e72ecdb):

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

PR Close #28100
2019-01-14 10:46:23 -08:00
4c0104c846 fix(docs-infra): Add crossed through styling (#28111)
PR Close #28111
2019-01-14 10:45:46 -08:00
72f2428cd8 fix(docs-infra): change style of deprecated markers (#28111)
PR Close #28111
2019-01-14 10:45:46 -08:00
d577b8df75 fix(docs-infra): render deprecated markers for CLI command options (#28111)
fixes #27563
fixes #27423

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

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

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

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

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

PR Close #27995
2019-01-14 10:42:13 -08:00
2c9f0139a3 docs: fix typo in singleton services guide (#27948)
PR Close #27948
2019-01-14 10:41:30 -08:00
fc881390d0 docs(bazel): Getting started with Bazel + CLI (#27784)
PR Close #27784
2019-01-14 10:40:38 -08:00
1ec01d6758 docs: change in(what should I import? answer) NgModule FAQs (#27677)
I think only should be after BrowserModule , because we can import more than BrowserModule and I think we need to import other modules to AppModule in most of cases and we should import BrowserModule only in AppModule,so that thing seems okay.

PR Close #27677
2019-01-14 10:39:03 -08:00
4bb5f638bc docs: fix typo in dependency injection guide (#27616)
~~`HeroService` must provided in some parent injector~~
*`HeroService` must be provided in some parent injector*

PR Close #27616
2019-01-14 10:38:05 -08:00
0897ebac9e docs: fix typo in docs.md (#27484)
Added a period to the end of the last sentence in the first paragraph
PR Close #27484
2019-01-14 10:37:21 -08:00
657cf733a2 docs: ngComponentOutlet doc updated with new Injector creation (#27291)
PR Close #27291
2019-01-14 10:36:02 -08:00
d6aca79410 docs: updates to minor spelling mistakes in pipes guide (#27208)
PR Close #27208
2019-01-14 10:34:17 -08:00
e4c899e4ba docs: add browser polyfills for IE11 with hash-based routing (#27135)
Closes #26511

PR Close #27135
2019-01-14 10:33:23 -08:00
5e6e96d844 docs: fix GitHub pages deployment command (#26896)
closes #26803
PR Close #26896
2019-01-14 10:32:31 -08:00
9c2f6d72d6 docs: minor wording change in code example comment (#26835)
PR Close #26835
2019-01-14 10:31:23 -08:00
638375b7ca docs: fix typo in testing guide (#26828)
PR Close #26828
2019-01-14 10:30:33 -08:00
c5b67b95b7 docs: update link in universal guide (#26628)
Link to the document "53 percent of mobile site visits" was changed, updated link. Old link led to a page that didn't have the statistics on it.

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

PR Close #28103
2019-01-14 10:04:58 -08:00
6fff74e576 test(ivy): re-enable passing tests and misc cleanup (#28093)
PR Close #28093
2019-01-14 10:03:57 -08:00
978ffa9d32 refactor(ivy): refactor more files in DI to prepare it for bazel packages (#28098)
PR Close #28098
2019-01-14 09:55:30 -08:00
6a9a48b0ac test: improve symbol-extractor test by ignoring $1 suffix (#28098)
PR Close #28098
2019-01-14 09:55:30 -08:00
da2880d7c4 fixup! fix(ivy): add missing @nocollapse annotation to __NG_ELEMENT_ID__ fields (#28050) (#28066)
PR Close #28066
2019-01-11 16:24:03 -08:00
fca185e191 refactor(ivy): create Injector interface; remove dependency on Ivy (#28066)
This change is a prerequasity for a later change which will turn the
'di' into its own bazel package. In order to do that we have to:
- have `Injector` type be importable by Ivy. This means that we need
  to create `Injector` as a pure type in `interface` folder which is
  already a bazel package which Ivy can depend on.
- Remove the dependency of `class Injector` on Ivy so that it can be
  compiled in isolation. We do that by using `-1` as special value for
  `__NG_ELEMENT_ID__` which tells the Ivy `NodeInjector` than
  `Injector` is being requested.

PR Close #28066
2019-01-11 16:24:03 -08:00
e082fc24b2 docs: add library doc to guides in aio (#27581)
PR Close #27581
2019-01-11 16:22:19 -08:00
133fe5e561 test(ivy): update root causes for animation tests (#28091)
PR Close #28091
2019-01-11 16:21:27 -08:00
2afbcafab7 test(bazel): Use local_repository to load Angular (#28061)
The current integration test for Bazel schematics downloads a
published version of Angular as required by the http_archive
rule in the CLI created WORKSPACE.
However, this makes the test less useful because it does not
actually test any changes to the Angular repo at source.
This PR replaces the http_archive method in the WORSPACE
with local_repository so that any local changes to the Angular
repo are tested accordingly.

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

PR Close #28061
2019-01-11 16:19:59 -08:00
605f450251 fix(bazel): Add ibazel to deps of Bazel project (#28090)
Incremental rebuilds is a fundamental part of the development
workflow. `@bazel/ibazel` should be added to the dev dependencies
of a Bazel project.

PR Close #28090
2019-01-11 15:58:38 -08:00
9260b5e0b4 fix(ivy): ignore empty bindings (#28059)
This update aligns Ivy behavior with ViewEngine related to empty bindings (for example <div [someProp]></div>): empty bindings are ignored.

PR Close #28059
2019-01-11 15:17:54 -08:00
9a128a8068 docs(forms): fix up @see tags for AbstractContol (#28069)
PR Close #28069
2019-01-11 14:35:23 -08:00
cd51775390 build(docs-infra): render @see information in members (#28069)
Previously `@see` tags were only rendered for top level class-like
docs. Now these tags are rendered for methods and properties too.

PR Close #28069
2019-01-11 14:35:23 -08:00
fe4d3a1619 test(ivy): re-enable passing upgrade tests (#28088)
PR Close #28088
2019-01-11 14:34:27 -08:00
b73d6781da build: support external angular in ng_rollup_bundle (#28049)
PR Close #28049
2019-01-11 14:31:11 -08:00
0c6fa1df52 refactor(ivy): update parameter for executeInitHooks to be more accurate (#27965)
Co-Authored-By: benlesh <ben@benlesh.com>
PR Close #27965
2019-01-11 14:28:35 -08:00
ce51dfb499 fix(bazel): ts_web_test_suite now properly includes init_browser_spec.js (#27965)
There was an issue where init_browser_spec.js was being run out of order, this change adds it as a runtime dependency so it is executed when it needs to be preventing tests from bombing when they try to read from isNode from global scope before it is defined

PR Close #27965
2019-01-11 14:28:35 -08:00
8ebdb437dc fix(ivy): ngOnChanges only runs for binding updates (#27965)
PR Close #27965
2019-01-11 14:28:35 -08:00
b0caf02d4f feat(ivy): properly handle inheriting lifecycle hooks from plain classes (#27965)
PR Close #27965
2019-01-11 14:28:35 -08:00
091a8a6fd5 fix(ivy): add missing @nocollapse annotation to __NG_ELEMENT_ID__ fields (#28050)
__NG_ELEMENT_ID__ static fields are a part of how the Ivy node injector
works. In order to survive closure minification correctly, they need to
be annotated with @nocollapse.

PR Close #28050
2019-01-11 11:19:32 -08:00
61bc61fc59 fix(ivy): ensure @nocollapse is added to static fields (#28050)
ngtsc has a hack to add @nocollapse jsdoc annotations to generated static
fields. This hack is currently broken (likely due to a TypeScript change
in the way writeFile() works).

This commit fixes the hack and introduces an ngtsc_spec test to ensure it
does not regress again.

PR Close #28050
2019-01-11 11:19:32 -08:00
df292c2ce0 fix(ivy): TestBed should not clobber compilation of global-scope modules (#28033)
When an @NgModule decorator executes, the module is added to a queue in
render3/jit/module.ts. Reading an ngComponentDef property causes this queue
to be flushed, ensuring that the component gets the correct module scope
applied.

In before_each.ts, a global beforeEach is added to all Angular tests which
calls TestBed.resetTestingModule() prior to running each test. This in turn
clears the module compilation queue (which is correct behavior, as modules
declared within the test should not leak outside of it via the queue).

So far this is okay. But before the first test runs, the module compilation
queue is full of modules declared in global scope. No definitions have been
read, so no flushes of the queue have been triggered. The global beforeEach
triggers a reset of the queue, aborting all of the in-progress global
compilation, breaking those classes when they're later used in tests.

This commit adds logic to TestBedRender3 to respect the state of the module
queue before the TestBed is first initialized or reset. The queue is flushed
prior to such an operation to ensure global compilation is allowed to finish
properly.

With this fix, a platform-server test now passes (previously the <my-child>
element was not detected as a component, because the encompassing module
never finished compilation.

FW-887 #resolve

PR Close #28033
2019-01-11 11:18:10 -08:00
51e716b6f2 feat(ivy): implement a Compiler for use in TestBedRender3 (#28033)
Previously when testing code injected the Compiler, it received the
top-level Compiler implementation defined in linker/compiler.ts
(and governed by the __PRE_R3__ switch). Code running under the
TestBed, however, should always use a TestBed-aware Compiler
implementation.

This commit adds such an implementation to the TestBedRender3,
which passes compiled modules through the _compileNgModule()
function.

With this change, 3 formerly disabled router integration tests
now pass.

FW-855 #resolve

PR Close #28033
2019-01-11 11:18:10 -08:00
94893accdb fix(ivy): fix invalid provider error messages under TestBed (#28033)
An @NgModule with invalid provider declarations produces errors under
normal circumstances. However, within the TestBed two small issues with
provider overrides interfered with the correct production of these errors:

1. a 'null' provider object caused a premature crash when the TestBed
   attempted to check for a 'provide' property on it with hasOwnProperty().
2. the array of providers would have an empty override array appended to it
   for each input provider, which would pollute the error messages produced
   down the line.

This commit fixes both of these issues, by 1) checking for null and 2)
filtering out the empty override arrays.

Testing strategy: future commits change the way the TestBed compiles
modules, causing tests to become sensitive to this bug if not fixed.

PR Close #28033
2019-01-11 11:18:10 -08:00
6c6d43086f fix(ivy): make module registration by id idempotent (#28033)
An @NgModule with an 'id' property has its type registered in a global map
of modules by id. This happens during compilation of the module.

In Ivy, modules are first compiled when the @NgModule decorator executes.
In tests, they might be passed again through the TestBed's compiler,
resulting in a second compilation and registration.

Before this fix, this second registration would cause an error, as the id
was previously registered. This commit makes the registration idempotent,
so if the same module type is being registered for the same id then no
error is thrown.

Testing strategy: future commits change the way the TestBed compiles
modules, causing tests to become sensitive to this bug if not fixed.

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

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

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

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

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

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

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

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

PR Close #28020
2019-01-11 11:17:17 -08:00
3ea9f0974a docs(router): remove obsolete sections in README.md (#27880)
PR Close #27880
2019-01-11 11:15:59 -08:00
a100472b5d build: bump year (#27880)
PR Close #27880
2019-01-11 11:15:59 -08:00
a6f7fe394a docs: add schematics terms to glossary (#27862)
PR Close #27862
2019-01-11 11:15:08 -08:00
e31afb7118 fix(ivy): ngcc - identify all ESM5 decorated classes (#27848)
In ESM5 decorated classes can be indicated by calls to `__decorate()`.
Previously the `ReflectionHost.findDecoratedClasses()` call would identify
helper calls of the form:

```
SomeClass = tslib_1.__decorate(...);
```

But it was missing calls of the form:

```
SomeClass = SomeClass_1 = tslib_1.__decorate(...);
```

This form is common in `@NgModule()` decorations, where the class
being decorated is referenced inside the decorator or another
member.

This commit now ensures that a chain of assignments, of any length,
is now identified as a class decoration if it results in a call to
`__decorate()`.

Fixes #27841

PR Close #27848
2019-01-11 11:14:01 -08:00
d505468fb7 docs: re-write interpolation section and add example (#25170)
PR Close #25170
2019-01-11 11:12:44 -08:00
f854eb7dec test(ivy): mark tests where checkNoChanges results are different in the view engine and ivy (#28073)
PR Close #28073
2019-01-11 10:18:03 -08:00
b0f3c20a4c test(ivy): resolve root cause for core animation tests (#28062)
PR Close #28062
2019-01-10 17:13:31 -08:00
26a8c095d0 docs(router): fixed a typo in CanLoad title text (#27894)
* Interface that a class can implement to be a guard deciding if a children can be loaded.
'...if a children...' changed to '...if children...'
 * Interface that a class can implement to be a guard deciding if children can be loaded.

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

PR Close #27879
2019-01-10 17:06:05 -08:00
acb2caced0 docs: fix typo (#27865)
PR Close #27865
2019-01-10 17:04:54 -08:00
96f4969a2b docs: fix broken html for deployment.md (#27851)
without the closing quote the text and link are not displayed correctly

PR Close #27851
2019-01-10 17:03:54 -08:00
aebec4b156 refactor(core): improve type for EventEmitter (#27228)
PR Close #27228
2019-01-10 17:02:52 -08:00
9277142d54 fix(ivy): support multiple exportAs (#27996)
Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`.

These changes fix FW-708.

PR Close #27996
2019-01-10 16:53:26 -08:00
b78351cc7e build(bazel): Bump @bazel/typescript & @bazel/karma to 0.22.1 (#28031)
PR Close #28031
2019-01-10 16:49:56 -08:00
885f1af509 build: extract interface and util sub compilation from core (#28028)
PR Close #28028
2019-01-10 16:31:44 -08:00
b05baa59e0 fix(bazel): Add /bazel-out to .gitignore (#27874)
PR Close #27874
2019-01-10 13:40:28 -08:00
ad6569c744 fix(ivy): markForCheck() should not schedule change detection (#28048)
Previously, we had the logic to schedule a change detection tick
inside markViewDirty(). This is fine when used in markDirty(),
the user-facing API, because it should always schedule change
detection. However, this doesn't work when used in markForCheck()
because historically markForCheck() does not trigger change
detection.

To be backwards compatible, this commit moves the scheduling
logic out of markViewDirty() and into markDirty(), so
markForCheck no longer triggers a tick.

PR Close #28048
2019-01-10 13:37:40 -08:00
feebe03523 fix(ivy): pass ngContentSelectors through to defineComponent() calls (#27867)
Libraries that create components dynamically using component factories,
such as `@angular/upgrade` need to pass blocks of projected content
through to the `ComponentFactory.create()` method. These blocks
are extracted from the content by matching CSS selectors defined in
`<ng-content select="..">` tags found in the component's template.

The Angular compiler collects these CSS selectors when compiling a component's
template, and exposes them via the `ComponentFactory.ngContentSelectors`
property.

This change ensures that this property is filled correctly when the
component factory is created by compiling a component with the Ivy engine.

PR Close #27867
2019-01-10 13:36:37 -08:00
e8a57f0ee6 test(upgrade): log more info to help debug CI flakes (#28045)
Related Jira issue: FW-939

PR Close #28045
2019-01-10 11:03:26 -08:00
a6ba789599 fix(ivy): init hooks being re-run if an exception is throw (#28024)
Fixes Ivy running the init hooks if an exception is thrown in one of them.

These changes fix FW-830.

PR Close #28024
2019-01-10 11:01:37 -08:00
3bafc002ae test(ivy): update root cause for @angular/core (#28046)
FW-822 is a delibrate breaking change so changing the status of the
corresponding test from fixmeIvy to modifiedInIvy.

PR Close #28046
2019-01-10 10:57:51 -08:00
afaea110c7 fix(ivy): pipe returning WrappedValue should invalidate correct binding (#28044)
When a pipe returns an instance of WrappedValue we should "invalidate" value
of a binding where the pipe in question is used.

Before this change we've always wrtten the invalidation value (NO_CHANGE) to
the binding root this invalidating the first binding in a LView. This commit
corrects the binding index calculation so the binding with a pipe is invalidated.

PR Close #28044
2019-01-10 10:57:01 -08:00
dffcb9cda3 ci: onlyInIvy tests should not be triggered for FIND_PASSING_TESTS mode (#28036)
Previous to this change, there was a lot of noise when
trying to find tests in FIND_PASSING_TESTS mode because
tests marked "onlyInIvy" were also listed as "already
passing". Since these tests are not "fixmes" that need
to be enabled, it is not useful to have them listed.

This commit removes "onlyInIvy" tests from consideration
when running in this manual mode. The tests should still
run on CI by default (since FIND_PASSING_TESTS mode will
be false).

PR Close #28036
2019-01-10 10:55:58 -08:00
ee60c7679a test(ivy): turn on passing i18n test in CI (#28035)
PR Close #28035
2019-01-10 10:54:38 -08:00
e0e92cfef6 test(ivy): diagnose root causes of remaining failing router tests (#28035)
PR Close #28035
2019-01-10 10:54:37 -08:00
65e72e958e fix(bazel): protractor rule does not run spec files with underscore (#28022)
There are various e2e tests with the `_spec.ts` suffix in the Angular project. Currently the protractor Bazel rule does not pick up these files and just ignores them. Since underscore is commonly used, we should support this.

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

PR Close #28022
2019-01-10 10:53:25 -08:00
76ed13bffe fix(ivy): directives without selector should not be supported (#28021)
PR Close #28021
2019-01-10 10:51:30 -08:00
7374dfd1fa docs: document why not using compare-url orb (#28010)
Discussed in
https://github.com/angular/angular/pull/27775#issuecomment-452565603.

PR Close #28010
2019-01-10 10:50:30 -08:00
c5ab3e8fd2 fix(ivy): proper resolution of Enums in Component decorator (#27971)
Prior to this change Component decorator was resolving `encapsulation` value a bit incorrectly, which resulted in `encapsulation: NaN` in compiled code. Now we resolve the value as Enum memeber and throw if it's not the case. As a part of this update, the `changeDetection` field handling is also added, the resolution logic is the same as the one used for `encapsulation` field.

PR Close #27971
2019-01-10 10:49:03 -08:00
142553abc6 feat(ivy): accept multiple values for exportAs in the compiler (#28001)
exportAs in @Directive metadata supports multiple values, separated by
commas. Previously it was treated as a single value string.

This commit modifies the compiler to understand that exportAs is a
string[]. It stops short of carrying the multiple values through to the
runtime. Instead, it only emits the first one. A future commit will modify
the runtime to accept all the values.

PR Close #28001
2019-01-10 10:47:49 -08:00
6003145422 fix(ivy): properly rewrite imports in generated factory shims (#27998)
Generated factory shims can import from @angular/core. However, we have
special logic in place to rewrite self-imports when generating code for
@angular/core.

This commit leverages the new standalone ImportRewriter interface to
properly rewrite imports in generated factory shims. Before this fix,
a generated factory file for core would look like:

```typescript
import * as i0 from './r3_symbols';

export var ApplicationModuleNgFactory = new ɵNgModuleFactory(...);
```

This is invalid, as ɵNgModuleFactory is just NgModuleFactory when imported
via r3_symbols.

FW-881 #resolve

PR Close #27998
2019-01-10 10:46:32 -08:00
3cf1b62722 refactor(ivy): extract import rewriting into a separate interface (#27998)
Currently the ImportManager class handles various rewriting actions of
imports when compiling @angular/core. This is required as code compiled
within @angular/core cannot import from '@angular/core'. To work around
this, imports are rewritten to get core symbols from a particular file,
r3_symbols.ts.

In this refactoring, this rewriting logic is moved out of the ImportManager
and put behind an interface, ImportRewriter. There are three implementers
of the interface:

* NoopImportRewriter, used for compiling all non-core packages.
* R3SymbolsImportRewriter, used when ngtsc compiles @angular/core.
* NgccFlatImportRewriter, used when ngcc compiles @angular/core (special
  logic is needed because ngcc has to rewrite imports in flat bundles
  differently than in non-flat bundles).

This is a precursor to using this rewriting logic in other contexts besides
the ImportManager.

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

PR Close #28032
2019-01-09 17:45:16 -08:00
4694c93315 refactor(ivy): avoid transitiveScopesFor function duplication in TestBed (#27860)
TestBed used to have its own implementation of the `transitiveScopesFor` function, customized for TestBed needs (to compile NgModules). This change unifies the `transitiveScopesFor` function usage by importing it from the `jit/module.ts` script and adding extra argument to configure its behavior (how to compile NgModule), so that TestBed can leverage it.

PR Close #27860
2019-01-09 17:13:11 -08:00
94c0b7a362 fix(ivy): ensure animation @bindings work for {key:value} and empty bindings (#28026)
PR Close #28026
2019-01-09 16:12:17 -08:00
0136274f33 test(ivy): update root causes for animation tests (#28026)
PR Close #28026
2019-01-09 16:12:17 -08:00
8934b736c8 test(ivy): re-enable passing upgrade tests (#28030)
PR Close #28030
2019-01-09 16:03:02 -08:00
11325bad4a test(ivy): mark jit_summaries_integration_spec as obsolete in Ivy (#28027)
These tests validate the ability of the View Engine TestBed to consume
summary metadata, a mechanism which allows the TestBed to use
AOT-compiled components & directives in tests. It achieves this through
two operations which are independently obsolete in Ivy:

1. It injects CompileMetadataResolver, a View Engine specific compiler
   internal class which extracts global analysis metadata from classes,
   and uses it to construct summary metadata. This happens in a
   beforeEach() block which calls createSummaries().

2. It uses TestBed.initTestEnvironment to pass summary metadata to the
   TestBed itself. Any such metadata is ignored in Ivy.

Operation #1 makes it impossible to run these tests under Ivy, as the
CompileMetadataResolver is not available with an Ivy compiler.

Ivy itself does not rely on summary data, and the R3TestBed can depend
directly on AOT compiled components without it. Thus, the spirit of thes
tests is obsolete in an Ivy world.

FW-838 #resolve

PR Close #28027
2019-01-09 15:38:48 -08:00
d0c3e252a3 docs: remove deprecated fromPromise from RxJS guide (#28015)
Follow-up to #27443.

PR Close #28015
2019-01-09 15:37:52 -08:00
e1e4887feb refactor(ivy): merge canInsertNativeNode and getParentNative (#28011)
Previously the canInsertNativeNode and getRenderParent functions had almost
_exaclty_ the same logic. What was worse that getRenderParent was calling
canInsertNativeNode thus executing the same, non-trivial logic twice.

This commit merges canInsertNativeNode and getRenderParent into one function.
Now getRenderParent will return a native parent or null if a node can't be
inserted (content projection, root of a view that is not inserted etc.).

PR Close #28011
2019-01-09 15:35:57 -08:00
6f9881f85f refactor(ivy): remove concept of RENDER_PARENT from LContainer (#28011)
PR Close #28011
2019-01-09 15:35:57 -08:00
6beeb76ac0 fix(ivy): don't cache render parent on LContainer to support ngUpgrade (#28011)
PR Close #28011
2019-01-09 15:35:57 -08:00
1f904bffbc refactor(ivy): simplify logic around canInsertNativeNode (#28011)
Previously presence and type of a parent tNode was split among
canInsertNativeNode, canInsertNativeChildOfView and canInsertNativeChildOfElement.
This commit centralises the logic in canInsertNativeNode thus simplifying
the overall logic and making canInsertNativeChildOfElement trivial.

PR Close #28011
2019-01-09 15:35:57 -08:00
9b2b9b3bef docs(core): add missing closing backtick (`) (#27908)
PR Close #27908
2019-01-09 12:44:13 -08:00
91a8a4fb28 docs(forms): remove duplicated link (#27884)
PR Close #27884
2019-01-09 12:43:29 -08:00
582395b8f5 docs: fix typo PageNotFoundCompponent (#27799)
closes: #27795

PR Close #27799
2019-01-09 12:42:39 -08:00
76580b98f0 ci: add brandonroberts to @angular/docs-infra codeowners (#28023)
Brandon is joining the docs-infra team in addition to the docs team.

PR Close #28023
2019-01-09 11:50:40 -08:00
5609764886 test(ivy): add root causes for router TestBed failures (#28014)
PR Close #28014
2019-01-09 11:49:45 -08:00
29e3144269 build(bazel): List explicit dependencies in WORKSPACE (#28000)
Instead of relying on implicit dependencies through Angular, the WORKSPACE
of the project should explicitly add rules_nodejs and rules_typescript so
it can better control the versions.

PR Close #28000
2019-01-09 11:49:08 -08:00
d68ad3e617 fix(ivy): ngcc - recognize synthesized constructors (#27897)
A constructor function may have been "synthesized" by TypeScript during
JavaScript emit, in the case no user-defined constructor exists and e.g.
property initializers are used. Those initializers need to be emitted
into a constructor in JavaScript, so the TypeScript compiler generates a
synthetic constructor.

This commit adds identification of such constructors as ngcc needs to be
able to tell if a class did originally have a constructor in the
TypeScript source. When a class has a superclass, a synthesized
constructor must not be considered as a user-defined constructor as that
prevents a base factory call from being created by ngtsc, resulting in a
factory function that does not inject the dependencies of the superclass.
Hence, we identify a default synthesized super call in the constructor
body, according to the structure that TypeScript emits.

PR Close #27897
2019-01-09 11:48:10 -08:00
d6cfe2ed7e build: use cross platform workspace_status_command (#27431)
PR Close #27431
2019-01-09 10:47:13 -08:00
eb1aae4043 ci: use image based cache for windows BuildKite (#27990)
PR Close #27990
2019-01-09 10:45:59 -08:00
935ce63b73 fix(bazel): flat module misses AMD module name on windows (#27839)
* Fixes that the flat module out files do not have a proper AMD module name on Windows. This is currently blocking serving a `ng_module` using the Bazel TypeScript `devserver` on Windows.

PR Close #27839
2019-01-09 10:42:37 -08:00
31fdff7121 build: re-enable disabled e2e tests (#27979)
Re-enables a few e2e tests which have been disabled a long time ago. Since these pass now, we should re-enable them.

PR Close #27979
2019-01-09 10:41:16 -08:00
c7d1890aaa build: remove travisci leftovers (#27979)
PR Close #27979
2019-01-09 10:41:16 -08:00
c7346bfdba fix(aio): Treating some deprecated (#27981)
PR Close #27981
2019-01-09 10:39:25 -08:00
d2b2d813d5 docs(core): fix characters that corrupt link (#27982)
PR Close #27982
2019-01-09 10:38:22 -08:00
72fc0a747d test(ivy): updating root causes for tests within @angular/core (#28003)
The problem that `fixmeIvy`s refer to is resolved, but the tests are still broken due to other issue (not possible to retrieve host property bindings for DebugElement).

PR Close #28003
2019-01-09 10:34:50 -08:00
cea3b8f885 test(ivy): update root cause of linker test (#28004)
PR Close #28004
2019-01-09 10:33:54 -08:00
5e7c71e51c build(docs-infra): remove unnecessary script to workaround cli issue (#28012)
The cli issue has been fixed and we no longer need to work around it.
This is essentially reverting #23470.

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

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

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

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

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

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

Jira issue: FW-924

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

PR Close #28013
2019-01-09 10:27:46 -08:00
c3aa24c3f9 fix(ivy): sanitization for Host Bindings (#27939)
This commit adds sanitization for `elementProperty` and `elementAttribute` instructions used in `hostBindings` function, similar to what we already have in the `template` function. Main difference is the fact that for some attributes (like "href" and "src") we can't define which SecurityContext they belong to (URL vs RESOURCE_URL) in Compiler, since information in Directive selector may not be enough to calculate it. In order to resolve the problem, Compiler injects slightly different sanitization function which detects proper Security Context at runtime.

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

PR Close #26790
2019-01-08 17:16:45 -08:00
1c39ad38d3 feat(ivy): reference external classes by their exported name (#27743)
Previously, ngtsc would assume that a given directive/pipe being imported
from an external package was importable using the same name by which it
was declared. This isn't always true; sometimes a package will export a
directive under a different name. For example, Angular frequently prefixes
directive names with the 'ɵ' character to indicate that they're part of
the package's private API, and not for public consumption.

This commit introduces the TsReferenceResolver class which, given a
declaration to import and a module name to import it from, can determine
the exported name of the declared class within the module. This allows
ngtsc to pick the correct name by which to import the class instead of
making assumptions about how it was exported.

This resolver is used to select a correct symbol name when creating an
AbsoluteReference.

FW-517 #resolve
FW-536 #resolve

PR Close #27743
2019-01-08 16:36:18 -08:00
0b9094ec63 feat(ivy): produce diagnostics for missing exports, incorrect entrypoint (#27743)
This commit adds tracking of modules, directives, and pipes which are made
visible to consumers through NgModules exported from the package entrypoint.
ngtsc will now produce a diagnostic if such classes are not themselves
exported via the entrypoint (as this is a requirement for downstream
consumers to use them with Ivy).

To accomplish this, a graph of references is created and populated via the
ReferencesRegistry. Symbols exported via the package entrypoint are compared
against the graph to determine if any publicly visible symbols are not
properly exported. Diagnostics are produced for each one which also show the
path by which they become visible.

This commit also introduces a diagnostic (instead of a hard compiler crash)
if an entrypoint file cannot be correctly determined.

PR Close #27743
2019-01-08 16:36:18 -08:00
ac157170c8 feat(forms): export NumberValueAccessor & RangeValueAccessor directives (#27743)
@angular/forms declares several directives and a module which are not
exported from the package via the entrypoint, either intentionally or as a
historical accident.

Ivy's locality principle necessitates that directives used in user code be
importable from the package which defines them. This requires these forms
directives to be exported.

Several directives which define ControlValueAccessors are exported:

* NumberValueAccessor
* RangeValueAccessor

A few more directives and a module are exported privately (with a ɵ prefix):

* NgNoValidate
* NgSelectMultipleOption
* InternalFormsSharedModule

PR Close #27743
2019-01-08 16:36:18 -08:00
f4a9f5dae8 refactor(ivy): prep ngtsc and ngcc for upcoming import resolution work (#27743)
Upcoming work to implement import resolution will change the dependencies
of some higher-level classes in ngtsc & ngcc. This necessitates changes in
how these classes are created and the lifecycle of the ts.Program in ngtsc
& ngcc.

To avoid complicating the implementation work with refactoring as a result
of the new dependencies, the refactoring is performed in this commit as a
separate prepatory step.

In ngtsc, the testing harness is modified to allow easier access to some
aspects of the ts.Program.

In ngcc, the main change is that the DecorationAnalyzer is created with the
ts.Program as a constructor parameter. This is not a lifecycle change, as
it was previously created with the ts.TypeChecker which is derived from the
ts.Program anyways. This change requires some reorganization in ngcc to
accommodate, especially in testing harnesses where DecorationAnalyzer is
created manually in a number of specs.

PR Close #27743
2019-01-08 16:36:18 -08:00
2a6108af97 refactor(ivy): split apart the 'metadata' package in the ngtsc compiler (#27743)
This refactoring moves code around between a few of the ngtsc subpackages,
with the goal of having a more logical package structure. Additional
interfaces are also introduced where they make sense.

The 'metadata' package formerly contained both the partial evaluator,
the TypeScriptReflectionHost as well as some other reflection functions,
and the Reference interface and various implementations. This package
was split into 3 parts.

The partial evaluator now has its own package 'partial_evaluator', and
exists behind an interface PartialEvaluator instead of a top-level
function. In the future this will be useful for reducing churn as the
partial evaluator becomes more complicated.

The TypeScriptReflectionHost and other miscellaneous functions have moved
into a new 'reflection' package. The former 'host' package which contained
the ReflectionHost interface and associated types was also merged into this
new 'reflection' package.

Finally, the Reference APIs were moved to the 'imports' package, which will
consolidate all import-related logic in ngtsc.

PR Close #27743
2019-01-08 16:36:18 -08:00
37b716b298 refactor(ivy): move the flat module index generator to its own package (#27743)
This commit moves the FlatIndexGenerator to its own package, in preparation
to expand its capabilities and support re-exporting of private declarations
from NgModules.

PR Close #27743
2019-01-08 16:36:18 -08:00
f6c91c5a5a docs: update rxjs example and change fromPromise to from (#27443)
the first example at https://angular.io/guide/rx-library,
https://github.com/ReactiveX/rxjs-tslint/issues/7

PR Close #27443
2019-01-08 16:15:53 -08:00
b621a69cda test: fix outDir in TS 3.2 integration test (#27774)
PR Close #27774
2019-01-08 16:00:26 -08:00
3fba6eff79 ci: fix public api rule in codeowners (#27999)
@alxhub spotted that the public api rule in codeowners is being overriden by the Build & CI Owners rule.

swapping the two sections fixes the problem.

PR Close #27999
2019-01-08 15:56:13 -08:00
b9c6df6da7 fix(ivy): use NgZone.onStable when bootstraped using PlatformRef (#27898)
PR Close #27898
2019-01-08 14:10:53 -08:00
1a7f92c423 test(ivy): re-enable passing animation tests (#27997)
PR Close #27997
2019-01-08 14:07:31 -08:00
a0840242d7 ci: update payload size for cli-hello-world (#27994)
PR Close #27994
2019-01-08 11:58:40 -08:00
090801532e test(ivy): update root cause analysis for the remaining query-related test (#27985)
PR Close #27985
2019-01-08 11:54:16 -08:00
b541c48688 docs: group fixes and features for 7.2.0 in changelog desc (#27974)
PR Close #27974
2019-01-08 11:28:27 -08:00
b432eb1cae refactor(ivy): simplify signature of appendChild / removeChild (#27987)
Previously the appendChild / removeChild could take null as an argument for
a child to be added / removed. This is difficult to understand since the
mentioned methods are noop if a child is null.

This commit clarifies the appendChild / removeChild signature to systematically
require a child node to be added removed. It turns out that null could be passed
only for a very specific i18n cases so now we guard a call to removeChild with
an explicit check on the i18n side.

PR Close #27987
2019-01-08 11:26:07 -08:00
cc5fb914bc docs: remove Travis status from README (#27973)
we no longer use TravisCI
PR Close #27973
2019-01-08 10:38:34 -08:00
d72ae7b71e ci: compute commit range for rerun workflows (#27775)
On push builds, CircleCI provides `CIRCLE_COMPARE_URL`, which we use to
extract the commit range for a given build. When a workflow is rerun
(e.g. to recover from a flaked job), `CIRCLE_COMPARE_URL` is not
defined, causing some jobs to fail.

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

PR Close #27775
2019-01-08 10:37:59 -08:00
aaa97f11d7 test(ivy): mark changed behaviour for queries and ng-container (#27977)
PR Close #27977
2019-01-08 10:37:39 -08:00
4b5b1f6d16 test(ivy): enable i18n test for nested templates (#27984)
The bug that was causing this test to fail has been resolved (see FW-903). The test now runs correctly.
PR Close #27984
2019-01-08 10:36:55 -08:00
c2f19515d6 test(ivy): enable last test in view injector integration spec (#27989)
PR Close #27989
2019-01-08 10:35:24 -08:00
6e7c46af1b fix(ivy): adding event listeners for global objects (window, document, body) (#27772)
This update introduces support for global object (window, document, body) listeners, that can be defined via host listeners on Components and Directives.

PR Close #27772
2019-01-08 10:33:17 -08:00
917c09cfc8 ci: update recommended buildkite VM (#27728)
PR Close #27728
2019-01-08 10:30:54 -08:00
f5471107d9 test(ivy): root causes update for 'platform-browser-dynamic' and i18n tests (#27972)
PR Close #27972
2019-01-07 20:27:50 -08:00
e6ab55daa0 fix(ivy): don't throw in i18nAttributes when a component is re-rendered (#27911)
`i18nAttributes` was throwing an error when it was called multiple times in the create part of the template function with the same index, for example when we create multiple components with the same template. It shouldn't throw in this case, and just use the cache when available.

FW-903 #resolve
PR Close #27911
2019-01-07 20:21:49 -08:00
7db05c408c ci: remove required ci status for travis from angular-robot.yaml (#27970)
we missed this one!! oops

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

PR Close #27970
2019-01-07 15:42:21 -08:00
483f8250bf build: increase parallelism for "test_docs_examples" job (#27937)
PR Close #27937
2019-01-07 15:35:10 -08:00
8e530a03b6 build: group sharded "test_docs_examples" jobs within circleci (#27937)
* Groups the two sharded `test_docs_examples` job using CircleCI's `parallelism` feature.  This makes the amount of jobs that show up on a PR, more reduced and also reduces code duplication for maintaining the Circle job definition.

PR Close #27937
2019-01-07 15:35:10 -08:00
b47c43af45 build: bazel integration test using limited resources (#27937)
PR Close #27937
2019-01-07 15:35:10 -08:00
4fc41517d1 build: shard integration tests on circleci (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
c80071dd59 test: fix integration/platform-server test which had missing @types/node devDep (#27937)
I'm not sure why this problem is visible only now or how this worked before, but the CI
is now failing because @types/node is missing.

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

PR Close #27937
2019-01-07 15:35:09 -08:00
98472da03f build: remove "build.sh" script (#27937)
this script is now obsolete and not needed any more. yay!!!

PR Close #27937
2019-01-07 15:35:09 -08:00
7ac8b02ec5 build: remove "test.sh" script (#27937)
test.sh is no longer needed... all the tests should now be executed via bazel.

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

PR Close #27937
2019-01-07 15:35:09 -08:00
0199e26167 ci: remove travis ci setup (#27937)
we no longer need it... yay!!!

PR Close #27937
2019-01-07 15:35:09 -08:00
17291e66a0 ci: run legacy e2e tests in parallel (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
7de7b7a16a ci: move e2e tests from travis to circleci (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
bb5ddee710 ci: remove build steps that are no longer needed (#27937)
the metadata build seems to be needed only by the offline compiler tests which is currently disabled

PR Close #27937
2019-01-07 15:35:09 -08:00
04ca3bcf10 ci: move local and saucelabs unit tests to circle (#27937)
Moving the tests over to CircleCI in pretty much "as-is" state just so that we can drop the dependency on Travis.

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

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

This change was coauthored with @devversion

PR Close #27937
2019-01-07 15:35:09 -08:00
c1dacdd890 fix(ivy): QueryList not instance of exported QueryList (#27942)
Fixes Ivy's `QueryList` not being an instance of the exported ViewEnginer `QueryList`.

Also reworks `first`, `last` and `length` to be regular properties, rather than setters. Reworking `length` was required to be able to extend the ViewEngine `QueryList`, but I reworked `first` and `last` as well since getters generate a lot more code when transpiled to ES5.

These changes fix FW-706.

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

PR Close #27915
2019-01-07 14:49:44 -08:00
4613864fc8 test(ivy): add i18n integration tests via TestBed (#27852)
PR Close #27852
2019-01-07 14:47:24 -08:00
ac5f5ed0a6 test(bazel): re-enable ng_package golden testing on ci (#27829)
* Enables the ng_package golden testing on the CI
* Fixes the ng_package golden testing for Windows

PR Close #27829
2019-01-07 14:46:47 -08:00
8122970f63 test(bazel): fix all ng_package tests not working on windows (#27829)
PR Close #27829
2019-01-07 14:46:47 -08:00
8473d68ea8 fix(bazel): packager not properly removing amd directives on windows (#27829)
PR Close #27829
2019-01-07 14:46:46 -08:00
4caf6540d1 fix(bazel): ng_package creates invalid typings reexport on windows (#27829)
Currently when building a package on Windows, the typings re-export for secondary entry-points is not valid TypeScript. Similarly the metadata and the "package.json" files use non-posix paths and cause inconsistency within the NPM package.

For example:

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

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

PR Close #27829
2019-01-07 14:46:46 -08:00
a75c734471 fix(ivy): restore NG defs after running tests in TestBed (#27786)
`R3TestBed` allows consumers to configure a "testing module", declare components, override various metadata, etc. To do this, it implements its own JIT compilation, where components/directives/modules have Ivy definition fields generated based on testing metadata. It results in tests interfering with each other. One test might override something in a component that another test tries to use normally, causing failures.

In order to resolve this problem, we store current components/directives/modules defs before applying overrides and re-compiling. Once the test is complete, we restore initial defs, so the next tests interact with "clean" components.

PR Close #27786
2019-01-07 14:44:14 -08:00
e775313188 fix(ivy): ngOnDestroy hooks should be called on providers (#27955)
PR Close #27955
2019-01-07 14:43:33 -08:00
996435b79a refactor(ivy): remove TView.pipeDestroyHooks (#27955)
PR Close #27955
2019-01-07 14:43:33 -08:00
45880532bf test(ivy): update root causes for @angular/core tests (#27961)
PR Close #27961
2019-01-07 08:44:57 -08:00
e08feb7e54 refactor(ivy): unify native node handling around render parent and element / ICU containers (#27925)
PR Close #27925
2019-01-07 08:36:51 -08:00
8a3cebde8b fix(ivy): support ICU messages inside <ng-container> (#27925)
PR Close #27925
2019-01-07 08:36:51 -08:00
d80c32310a refactor(ivy): remove code duplication in native nodes manipulation (#27925)
PR Close #27925
2019-01-07 08:36:51 -08:00
3ac249b2ab refactor(ivy): renames and documentation updates (#27925)
PR Close #27925
2019-01-07 08:36:50 -08:00
e94e7eef4c docs: add Alyle UI to resources (#27954)
PR Close #27954
2019-01-07 08:35:40 -08:00
654055b22f ci: add brandonroberts to @angular/framework-global-approvers-for-docs-only-changes (#27949)
I’ve observed that Brandon reviews many docs-only PRs and then we still need me or Jeniffer to approve them.

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

PR Close #27949
2019-01-07 08:35:22 -08:00
490 changed files with 13891 additions and 9373 deletions

View File

@ -43,7 +43,9 @@ test --nolegacy_external_runfiles
###############################
# Releases should always be stamped with version control info
build:release --workspace_status_command=./tools/bazel_stamp_vars.sh
# This command assumes node on the path and is a workaround for
# https://github.com/bazelbuild/bazel/issues/4802
build:release --workspace_status_command="node ./tools/bazel_stamp_vars.js"
###############################
# Output #

View File

@ -5,9 +5,9 @@
# VM creation:
# In Google Cloud Platform, create a Compute Engine instance.
# We recommend machine type n1-highcpu-16 (16 vCPUs, 14.4 GB memory).
# Use a windows boot disk with container support such as
# "Windows Server version 1803 Datacenter Core for Containers".
# 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 disk.
# Give it a name, then click "Create".
# VM setup:
@ -54,6 +54,8 @@ 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.

View File

@ -1,3 +1,35 @@
<a name="8.0.0-beta.0"></a>
# [8.0.0-beta.0](https://github.com/angular/angular/compare/7.2.0...8.0.0-beta.0) (2019-01-16)
### Bug Fixes
* **bazel:** Add [@bazel](https://github.com/bazel)/bazel to dev deps ([#28032](https://github.com/angular/angular/issues/28032)) ([5a0deb8](https://github.com/angular/angular/commit/5a0deb8))
* **bazel:** Add /bazel-out to .gitignore ([#27874](https://github.com/angular/angular/issues/27874)) ([b05baa5](https://github.com/angular/angular/commit/b05baa5))
* **bazel:** Add ibazel to deps of Bazel project ([#28090](https://github.com/angular/angular/issues/28090)) ([605f450](https://github.com/angular/angular/commit/605f450))
* **bazel:** Bazel schematics should add router package ([#28141](https://github.com/angular/angular/issues/28141)) ([06e5bf1](https://github.com/angular/angular/commit/06e5bf1))
* **bazel:** flat module misses AMD module name on windows ([#27839](https://github.com/angular/angular/issues/27839)) ([935ce63](https://github.com/angular/angular/commit/935ce63))
* **bazel:** incorrectly always uses ngc-wrapped from "npm" workspace ([#28137](https://github.com/angular/angular/issues/28137)) ([d12db4e](https://github.com/angular/angular/commit/d12db4e))
* **bazel:** ng_package creates invalid typings reexport on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([4caf654](https://github.com/angular/angular/commit/4caf654))
* **bazel:** packager not properly removing amd directives on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([8473d68](https://github.com/angular/angular/commit/8473d68))
* **bazel:** protractor rule does not run spec files with underscore ([#28022](https://github.com/angular/angular/issues/28022)) ([65e72e9](https://github.com/angular/angular/commit/65e72e9))
* **bazel:** protractor utils cannot start server on windows ([#27915](https://github.com/angular/angular/issues/27915)) ([9de9c8a](https://github.com/angular/angular/commit/9de9c8a))
* **bazel:** replay compilation uses wrong compiler for building esm5 ([#28053](https://github.com/angular/angular/issues/28053)) ([cd04513](https://github.com/angular/angular/commit/cd04513))
* **bazel:** ts_web_test_suite now properly includes init_browser_spec.js ([#27965](https://github.com/angular/angular/issues/27965)) ([ce51dfb](https://github.com/angular/angular/commit/ce51dfb))
* **service-worker:** navigation urls backwards compatibility ([#27244](https://github.com/angular/angular/issues/27244)) ([d49d1e7](https://github.com/angular/angular/commit/d49d1e7))
### Features
* **forms:** export NumberValueAccessor & RangeValueAccessor directives ([#27743](https://github.com/angular/angular/issues/27743)) ([ac15717](https://github.com/angular/angular/commit/ac15717))
### Performance Improvements
* **platform-server:** use shared `DomElementSchemaRegistry` instance ([#28150](https://github.com/angular/angular/issues/28150)) ([#28151](https://github.com/angular/angular/issues/28151)) ([ce3a746](https://github.com/angular/angular/commit/ce3a746))
<a name="7.2.1"></a>
## [7.2.1](https://github.com/angular/angular/compare/7.2.0...7.2.1) (2019-01-16)

View File

@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2014-2018 Google, Inc. http://angular.io
Copyright (c) 2010-2019 Google LLC. http://angular.io/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

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

View File

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

View File

@ -2,7 +2,7 @@
@description
The MIT License
Copyright (c) 2014-2018 Google, Inc.
Copyright (c) 2010-2019 Google LLC. http://angular.io/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@
"build": "yarn ~~build",
"prebuild-local": "yarn setup-local",
"build-local": "yarn ~~build",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 02d2ec250",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 4ae713b5a",
"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",

View File

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

View File

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

View File

@ -1071,7 +1071,7 @@ describe('AppComponent', () => {
it('should set the id of the doc viewer container based on the current doc', () => {
initializeTest(false);
const container = fixture.debugElement.query(By.css('section.sidenav-content'));
const container = fixture.debugElement.query(By.css('main.sidenav-content'));
navigateTo('guide/pipes');
expect(component.pageId).toEqual('guide-pipes');
@ -1088,7 +1088,7 @@ describe('AppComponent', () => {
it('should not be affected by changes to the query', () => {
initializeTest(false);
const container = fixture.debugElement.query(By.css('section.sidenav-content'));
const container = fixture.debugElement.query(By.css('main.sidenav-content'));
navigateTo('guide/pipes');
navigateTo('guide/other?search=http');

View File

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

View File

@ -1,23 +1,20 @@
<div class="grid-fluid">
<div class="footer-block" *ngFor="let node of nodes">
<h3>{{node.title}}</h3>
<ul>
<li *ngFor="let item of node.children">
<a class="link" [href]="item.url"
[title]="item.tooltip || item.title">{{ item.title }}</a>
</li>
</ul>
</div>
<div class="grid-fluid">
<div class="footer-block" *ngFor="let node of nodes">
<h3>{{node.title}}</h3>
<ul>
<li *ngFor="let item of node.children">
<a class="link" [href]="item.url" [title]="item.tooltip || item.title">{{ item.title }}</a>
</li>
</ul>
</div>
</div>
<p>
Powered by Google ©2010-2018.
Code licensed under an <a href="license" title="License text" >MIT-style License</a>.
Documentation licensed under
<a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
</p>
<p>
Version {{versionInfo?.full}}.
</p>
<!-- TODO: twitter widget (but only on pages that use twitter) -->
<p>
Super-powered by Google ©2010-2019.
Code licensed under an <a href="license" title="License text">MIT-style License</a>.
Documentation licensed under
<a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
</p>
<p>
Version {{versionInfo?.full}}.
</p>

View File

@ -1,9 +1,3 @@
/*
Copyright 2016 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 http://angular.io/license
*/
import { NgZone, Injectable } from '@angular/core';
import { ConnectableObservable, Observable, race, ReplaySubject, timer } from 'rxjs';
import { concatMap, first, publishReplay } from 'rxjs/operators';

View File

@ -1,9 +1,3 @@
/*
Copyright 2016 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 http://angular.io/license
*/
import {NgZone} from '@angular/core';
import {Observable} from 'rxjs';

View File

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

View File

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

View File

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

View File

@ -1,3 +1,10 @@
/*
Copyright Google LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
/**
* WEB VERSION FOR CURRENT ANGULAR BUILD
* (based on systemjs.config.js in angular.io)
@ -94,9 +101,3 @@
});
})(this);
/*
Copyright 2016 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 http://angular.io/license
*/

View File

@ -1,3 +1,9 @@
/*
Copyright Google LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
/**
* WEB ANGULAR VERSION
* (based on systemjs.config.js in angular.io)
@ -80,9 +86,3 @@
});
})(this);
/*
Copyright 2016 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 http://angular.io/license
*/

View File

@ -51,9 +51,9 @@ class StackblitzBuilder {
}
_buildCopyrightStrings() {
var copyright = 'Copyright 2017-2018 Google Inc. All Rights Reserved.\n'
+ 'Use of this source code is governed by an MIT-style license that\n'
+ 'can be found in the LICENSE file at http://angular.io/license';
var copyright = 'Copyright Google LLC. All Rights Reserved.\n' +
'Use of this source code is governed by an MIT-style license that\n' +
'can be found in the LICENSE file at http://angular.io/license';
var pad = '\n\n';
this.copyrights.jsCss = `${pad}/*\n${copyright}\n*/`;
this.copyrights.html = `${pad}<!-- \n${copyright}\n-->`;

View File

@ -133,7 +133,7 @@ Bazel supports the ability to include non-hermetic information from the version
You can see an overview at https://www.kchodorow.com/blog/2017/03/27/stamping-your-builds/
In our repo, here is how it's configured:
1) In `tools/bazel_stamp_vars.sh` we run the `git` commands to generate our versioning info.
1) In `tools/bazel_stamp_vars.js` we run the `git` commands to generate our versioning info.
1) In `.bazelrc` we register this script as the value for the `workspace_status_command` flag. Bazel will run the script when it needs to stamp a binary.
Note that Bazel has a `--stamp` argument to `yarn bazel build`, but this has no effect since our stamping takes place in Skylark rules. See https://github.com/bazelbuild/bazel/issues/1054

View File

@ -65,6 +65,7 @@ What kind of problem is this?
## Caretaker Triage Process (Primary Triage)
It is the caretaker's responsibility to assign `comp: *` to each new issue as they come in.
Issues that haven't been triaged can be found by selecting the issues with no milestone.
If it's obvious that the issue or PR is related to a release regression, the caretaker is also responsible for assigning the `severity(5): regression` label to make the issue or PR highly visible.
@ -72,10 +73,12 @@ The primary triage should be done on a daily basis so that the issues become ava
The reason why we limit the responsibility of the caretaker to this one label is that it is likely that without domain knowledge the caretaker could mislabel issues or lack knowledge of duplicate issues.
Once the primary triage is done, the ng-bot automatically adds the milestone `needsTriage`.
## Component's owner Triage Process
The component owner is responsible for assigning one of the labels from each of these categories:
The component owner is responsible for assigning one of the labels from each of these categories to the issues that have the milestone `needsTriage`:
- `type: *`
- `frequency: *`
@ -83,6 +86,8 @@ The component owner is responsible for assigning one of the labels from each of
We've adopted the issue categorization based on [user pain](http://www.lostgarden.com/2008/05/improving-bug-triage-with-user-pain.html) used by AngularJS. In this system every issue is assigned frequency and severity based on which the total user pain score is calculated.
The issues with type `type: feature`, `type: refactor` and `type: RFC / Discussion / question` do not require a frequency and severity.
Following is the definition of various frequency and severity levels:
1. `freq(score): *` How often does this issue come up? How many developers does this affect?
@ -105,10 +110,16 @@ These criteria are then used to calculate a "user pain" score as follows:
This score can then be used to estimate the impact of the issue which helps with prioritization.
Once the component's owner triage is done, the ng-bot automatically changes the milestone from `needsTriage` to `Backlog`.
## Triaging PRs
Triaging PRs is the same as triaging issues, except that PRs have additional label categories that should be used to signal their state.
Triaging PRs is the same as triaging issues, except that the labels `frequency: *` and `severity: *` are replaced by:
- `effort*`
- `risk: *`
PRs also have additional label categories that should be used to signal their state.
Every triaged PR must have a `pr_action` label assigned to it:
@ -138,7 +149,7 @@ To communicate the target we use the following labels:
* `PR target: LTS-only`: the PR should be merged only into the active LTS branch(es). Only security and critical fixes are allowed in these branches. Always send a new PR targeting just the LTS branch and request review approval from @IgorMinar.
* `PR target: TBD`: the target is yet to be determined.
If a PR is missing the "PR target: *" label, or if the label is set to "TBD" when the PR is sent to the caretaker, the caretaker should reject the PR and request the appropriate target label to be applied before the PR is merged.
If a PR is missing the `PR target: *` label, or if the label is set to "TBD" when the PR is sent to the caretaker, the caretaker should reject the PR and request the appropriate target label to be applied before the PR is merged.
## PR Approvals
@ -161,3 +172,10 @@ Only issues with `cla:yes` should be merged into master.
### `aio: preview`
Applying this label to a PR makes the angular.io preview available regardless of the author. [More info](../aio/aio-builds-setup/docs/overview--security-model.md)
### `PR action: merge-assistance`
This label can be added to let the caretaker know that the PR needs special attention.
There should always be a comment added to the PR to explain why the caretaker's assistance is needed.
The comment should be formatted like this: `merge-assistance: <explain what kind of assistance you need, and if not obvious why>`
For example, the PR owner might not be a Googler and needs help to run g3sync; or one of the checks is failing due to external causes and the PR should still be merged.

View File

@ -3,7 +3,7 @@
"master": {
"uncompressed": {
"runtime": 1497,
"main": 187112,
"main": 187437,
"polyfills": 59608
}
}
@ -12,7 +12,7 @@
"master": {
"uncompressed": {
"runtime": 1440,
"main": 507677,
"main": 584077,
"polyfills": 38390
}
}

View File

@ -0,0 +1,53 @@
{
"name": "demo",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "file:../angular/dist/packages-dist/animations",
"@angular/common": "file:../angular/dist/packages-dist/common",
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
"@angular/core": "file:../angular/dist/packages-dist/core",
"@angular/forms": "file:../angular/dist/packages-dist/forms",
"@angular/platform-browser": "file:../angular/dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../angular/dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../angular/dist/packages-dist/router",
"core-js": "^2.5.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
"@angular/cli": "~7.2.1",
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../angular/dist/packages-dist/language-service",
"@bazel/bazel": "^0.21.0",
"@bazel/ibazel": "^0.9.0",
"@bazel/karma": "^0.22.1",
"@bazel/typescript": "^0.22.1",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}

View File

@ -13,6 +13,7 @@ function testBazel() {
# TODO(kyliau) Remove this once the type annotations are added to AppPage
# https://github.com/angular/angular-cli/pull/13406
cp ../app.po.ts ./e2e/src/
cp ../package.json.replace ./package.json
# Run build
# TODO(kyliau): Use `bazel build` for now. Running `ng build` requires
# node_modules to be available in project directory.

View File

@ -73,7 +73,7 @@
"@angular-devkit/architect" "^0.10.6"
"@angular-devkit/core" "^7.0.4"
"@angular-devkit/schematics" "^7.0.4"
"@bazel/typescript" "^0.21.0"
"@bazel/typescript" "^0.22.1"
"@schematics/angular" "^7.0.4"
"@types/node" "6.0.84"
semver "^5.6.0"
@ -115,12 +115,13 @@
"@bazel/bazel-linux_x64" "0.21.0"
"@bazel/bazel-win32_x64" "0.21.0"
"@bazel/typescript@^0.21.0":
version "0.21.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.21.0.tgz#41c304f77a42c6a016280d0f4c20e0749c3f4b2a"
integrity sha512-ASXj0RFybmqoa3LwqkTU3gNkX9bY9wL/VDNo5hlp9pynYWl4RMpe9V3m/qDIdtSuLJ+qD+Z3FKT/OcpWQHMlYA==
"@bazel/typescript@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.22.1.tgz#b52c00e8560019e2f9d273d45c04785e0ec9d9bd"
integrity sha512-88DaCCnNg8rPlKP0eAQEZuoiJkEPeiItpUS3oBR1sFQNBRJb56D25ahK8+N6LJk4qaH+ZQ1/AHOPDhfEEWvDzA==
dependencies:
protobufjs "5.0.3"
semver "5.6.0"
source-map-support "0.5.9"
tsutils "2.27.2"
@ -1907,7 +1908,7 @@ semver-intersect@1.4.0:
dependencies:
semver "^5.0.0"
"semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0:
"semver@2 || 3 || 4 || 5", semver@5.6.0, semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==

View File

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

View File

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

View File

@ -30,7 +30,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0-rc.0",
"@angular/cli": "~7.2.0-rc.0",
"@angular/cli": "file:../../node_modules/@angular/cli",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../../dist/packages-dist/language-service",
"@types/node": "~8.9.4",

View File

@ -10,6 +10,14 @@
"@angular-devkit/core" "7.2.0-rc.0"
rxjs "6.3.3"
"@angular-devkit/architect@0.12.1":
version "0.12.1"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.12.1.tgz#397768d1ccd0cef76db96d6b39db8aebad68c031"
integrity sha512-1ozBP0ZAApkSfuPpZ7b9vShU8smNxb98jW+65S12cPOxv1bVVxCj5sTmC3sSfXapgq/pMzblbaVSKOG7Ajz0vQ==
dependencies:
"@angular-devkit/core" "7.2.1"
rxjs "6.3.3"
"@angular-devkit/build-angular@~0.12.0-rc.0":
version "0.12.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.12.0-rc.0.tgz#b82d96bf359d5e1c32736499944a161d3e80e882"
@ -94,41 +102,50 @@
rxjs "6.3.3"
source-map "0.7.3"
"@angular-devkit/schematics@7.2.0-rc.0":
version "7.2.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.2.0-rc.0.tgz#e902b86705067dc92880cfb0a97ed7863c0c484f"
integrity sha512-p6YDFZxLuDorqwYDOeenfJf5QdXD7NL+NHx39FxjeJMM/AT0AcmHmLc2ARm+Z/HRuqlZIG2pvvPeaEAptkTV0Q==
"@angular-devkit/core@7.2.1":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-7.2.1.tgz#8c6df59eab77bcc98a348c8cdf9eb217c8b751a5"
integrity sha512-zOozPswSM1cTkltw5LeSPoZ/fJ2d3vN304IVgKgrM5/Fs54bd7nTaBcAK+HvjKS+5KmykYrXW47Q4CdFJikluQ==
dependencies:
"@angular-devkit/core" "7.2.0-rc.0"
ajv "6.6.2"
chokidar "2.0.4"
fast-json-stable-stringify "2.0.0"
rxjs "6.3.3"
source-map "0.7.3"
"@angular-devkit/schematics@7.2.1":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.2.1.tgz#9c1c784f4a81a3a840fa4a1435948c6203be6062"
integrity sha512-jEhwkeDn8exgJBfUwMc6rdtDkxHJkUmKPTn4M436bkMMMa9KFPFbPpzp9weKpB3SbRjM3Mu90JprO4C7qDtCcg==
dependencies:
"@angular-devkit/core" "7.2.1"
rxjs "6.3.3"
"@angular/animations@file:../../dist/packages-dist/animations":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/cli@~7.2.0-rc.0":
version "7.2.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-7.2.0-rc.0.tgz#fd008e760dcdf6e037d5dd6634eab28657cb5edf"
integrity sha512-01nwPfXvRAybwnl2AU/kXw0Qh2YtiQteAP/uRC/34WhWuU5AbJMFY5cPkmPTdVzJAAmxz1vKnbewpcHYZDkhmw==
"@angular/cli@file:../../node_modules/@angular/cli":
version "7.2.1"
dependencies:
"@angular-devkit/architect" "0.12.0-rc.0"
"@angular-devkit/core" "7.2.0-rc.0"
"@angular-devkit/schematics" "7.2.0-rc.0"
"@schematics/angular" "7.2.0-rc.0"
"@schematics/update" "0.12.0-rc.0"
"@angular-devkit/architect" "0.12.1"
"@angular-devkit/core" "7.2.1"
"@angular-devkit/schematics" "7.2.1"
"@schematics/angular" "7.2.1"
"@schematics/update" "0.12.1"
inquirer "6.2.1"
opn "5.3.0"
semver "5.5.1"
symbol-observable "1.2.0"
"@angular/common@file:../../dist/packages-dist/common":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
canonical-path "1.0.0"
chokidar "^1.4.2"
@ -143,40 +160,40 @@
yargs "9.0.1"
"@angular/compiler@file:../../dist/packages-dist/compiler":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/core@file:../../dist/packages-dist/core":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/forms@file:../../dist/packages-dist/forms":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/http@file:../../dist/packages-dist/http":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/language-service@file:../../dist/packages-dist/language-service":
version "7.2.0-rc.0"
version "7.2.0"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
"@angular/router@file:../../dist/packages-dist/router":
version "7.2.0-rc.0"
version "7.2.0"
dependencies:
tslib "^1.9.0"
@ -279,22 +296,22 @@
tree-kill "1.2.0"
webpack-sources "1.2.0"
"@schematics/angular@7.2.0-rc.0":
version "7.2.0-rc.0"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-7.2.0-rc.0.tgz#0546363c302d3887d87c7e9c0e86fc0a3e3c8dfb"
integrity sha512-2XljCin8qP0uryoRNNjMQzIDgHidAgkqIcx6NoywNiZs0u1O//n+EflNogmoJ15HvLRh5wmF9d6400Wn2vEFmw==
"@schematics/angular@7.2.1":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-7.2.1.tgz#9eeab1354ec8d970121cc067e9636098ab84e152"
integrity sha512-UdqU8udVr693BZ6uaZ7+el/VFlTjrmp56OS+6YaziyAko84e1Q1Fcx+fwdHugy4V3YmQhTVsyOPSEsphnwSwOA==
dependencies:
"@angular-devkit/core" "7.2.0-rc.0"
"@angular-devkit/schematics" "7.2.0-rc.0"
"@angular-devkit/core" "7.2.1"
"@angular-devkit/schematics" "7.2.1"
typescript "3.2.2"
"@schematics/update@0.12.0-rc.0":
version "0.12.0-rc.0"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.12.0-rc.0.tgz#2936bd61804d117c885e1f5c0f3569ef8fe05d33"
integrity sha512-YkVmVJw/ZUE42ki47Y8DZ6HLFmELJmk8BnHFIrtQQm702dZvQQkivfDMSWaaJ3r7837maepIFIcCzyPXbz+RqQ==
"@schematics/update@0.12.1":
version "0.12.1"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.12.1.tgz#44d853321ae8a56c43a579c0639d26d625001037"
integrity sha512-P92tDxy0AA1NPhaThiJ7fIFxIC4jzlGK7sJlpbnRREBImsI/O9gmGaV8Kjy+75vaEjqpWaU2oj1hnWqkmxSK1A==
dependencies:
"@angular-devkit/core" "7.2.0-rc.0"
"@angular-devkit/schematics" "7.2.0-rc.0"
"@angular-devkit/core" "7.2.1"
"@angular-devkit/schematics" "7.2.1"
"@yarnpkg/lockfile" "1.1.0"
ini "1.3.5"
pacote "9.1.1"
@ -324,11 +341,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
"@types/node@^6.0.46":
version "6.14.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.14.2.tgz#40b3dbb1221c7d66802cbcc32fe3b85e54569c77"
integrity sha512-JWB3xaVfsfnFY8Ofc9rTB/op0fqqTSqy4vBcVk1LuRJvta7KTX+D//fCkiTMeLGhdr2EbFZzQjC97gvmPilk9Q==
"@types/node@~8.9.4":
version "8.9.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976"
@ -339,10 +351,10 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5"
integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU=
"@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39":
version "2.53.43"
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz#2de3d718819bc20165754c4a59afb7e9833f6707"
integrity sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==
"@types/selenium-webdriver@^3.0.0":
version "3.0.14"
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.14.tgz#0b20a2370e6b1b8322c9c3dfcaa409e6c7c0c0a9"
integrity sha512-4GbNCDs98uHCT/OMv40qQC/OpoPbYn9XdXeTiFwHBBFO6eJhYEPUu2zDKirXSbHlvDV8oZ9l8EQ+HrEx/YS9DQ==
"@types/source-list-map@*":
version "0.1.2"
@ -554,12 +566,7 @@ acorn@^5.0.0, acorn@^5.6.2:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
adm-zip@0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736"
integrity sha1-ph7VrmkFw66lizplfSUDMJEFJzY=
adm-zip@^0.4.7, adm-zip@^0.4.9:
adm-zip@^0.4.9:
version "0.4.13"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a"
integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==
@ -569,14 +576,6 @@ after@0.8.2:
resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"
integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=
agent-base@2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7"
integrity sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=
dependencies:
extend "~3.0.0"
semver "~5.0.1"
agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
@ -1045,10 +1044,10 @@ block-stream@*:
dependencies:
inherits "~2.0.0"
blocking-proxy@0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.5.tgz#462905e0dcfbea970f41aa37223dda9c07b1912b"
integrity sha1-RikF4Nz76pcPQao3Ij3anAexkSs=
blocking-proxy@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-1.0.1.tgz#81d6fd1fe13a4c0d6957df7f91b75e98dac40cb2"
integrity sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==
dependencies:
minimist "^1.2.0"
@ -1203,6 +1202,13 @@ browserslist@^4.3.6:
electron-to-chromium "^1.3.92"
node-releases "^1.1.1"
browserstack@^1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.2.tgz#17d8bb76127a1cc0ea416424df80d218f803673f"
integrity sha512-+6AFt9HzhKykcPF79W6yjEUJcdvZOV0lIXdkORXMJftGrDl0OKWqRF4GHqpDNkxiceDT/uB7Fb/aDwktvXX7dg==
dependencies:
https-proxy-agent "^2.2.1"
buffer-alloc-unsafe@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
@ -1754,6 +1760,11 @@ core-js@^2.2.0, core-js@^2.4.0:
"core-js@file:../../node_modules/core-js":
version "2.5.7"
core-js@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.3.0.tgz#fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65"
integrity sha1-+rg/uwstjchfpjbEudNMdUIMbWU=
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@ -1912,7 +1923,7 @@ debug@*, debug@^4.1.0:
dependencies:
ms "^2.1.1"
debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8:
debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
@ -2282,6 +2293,11 @@ es6-promise@^4.0.3:
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054"
integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==
es6-promise@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.0.2.tgz#010d5858423a5f118979665f46486a95c6ee2bb6"
integrity sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=
es6-promisify@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
@ -2507,7 +2523,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2:
assign-symbols "^1.0.0"
is-extendable "^1.0.1"
extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.2:
extend@^3.0.0, extend@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
@ -3223,15 +3239,6 @@ https-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
https-proxy-agent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6"
integrity sha1-NffabEjOTdv6JkiRrFk+5f+GceY=
dependencies:
agent-base "2"
debug "2"
extend "3"
https-proxy-agent@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
@ -3288,6 +3295,11 @@ image-size@~0.5.0:
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
import-cwd@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
@ -3820,7 +3832,12 @@ istanbul@0.4.5:
which "^1.1.1"
wordwrap "^1.0.0"
jasmine-core@~2.99.0, jasmine-core@~2.99.1:
jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=
jasmine-core@~2.99.1:
version "2.99.1"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15"
integrity sha1-5kAN8ea1bhMLYcS80JPap/boyhU=
@ -3832,14 +3849,14 @@ jasmine-spec-reporter@~4.2.1:
dependencies:
colors "1.1.2"
jasmine@^2.5.3:
version "2.99.0"
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7"
integrity sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=
jasmine@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e"
integrity sha1-awicChFXax8W3xG4AUbZHU6Lij4=
dependencies:
exit "^0.1.2"
glob "^7.0.6"
jasmine-core "~2.99.0"
jasmine-core "~2.8.0"
jasminewd2@^2.1.0:
version "2.2.0"
@ -3939,6 +3956,17 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
jszip@^3.1.3:
version "3.1.5"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.1.5.tgz#e3c2a6c6d706ac6e603314036d43cd40beefdf37"
integrity sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==
dependencies:
core-js "~2.3.0"
es6-promise "~3.0.2"
lie "~3.1.0"
pako "~1.0.2"
readable-stream "~2.0.6"
karma-chrome-launcher@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf"
@ -4092,6 +4120,13 @@ license-webpack-plugin@2.0.4:
"@types/webpack-sources" "^0.1.5"
webpack-sources "^1.2.0"
lie@~3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=
dependencies:
immediate "~3.0.5"
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
@ -4949,11 +4984,6 @@ optionator@^0.8.1:
type-check "~0.3.2"
wordwrap "~1.0.0"
options@>=0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f"
integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=
original@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f"
@ -5100,6 +5130,11 @@ pacote@9.1.1:
unique-filename "^1.1.1"
which "^1.3.1"
pako@~1.0.2:
version "1.0.8"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.8.tgz#6844890aab9c635af868ad5fecc62e8acbba3ea4"
integrity sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==
pako@~1.0.5:
version "1.0.7"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.7.tgz#2473439021b57f1516c82f58be7275ad8ef1bb27"
@ -5385,6 +5420,11 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=
process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
@ -5423,22 +5463,22 @@ protoduck@^5.0.1:
genfun "^5.0.0"
"protractor@file:../../node_modules/protractor":
version "5.1.2"
version "5.4.2"
dependencies:
"@types/node" "^6.0.46"
"@types/q" "^0.0.32"
"@types/selenium-webdriver" "~2.53.39"
blocking-proxy "0.0.5"
"@types/selenium-webdriver" "^3.0.0"
blocking-proxy "^1.0.0"
browserstack "^1.5.1"
chalk "^1.1.3"
glob "^7.0.3"
jasmine "^2.5.3"
jasmine "2.8.0"
jasminewd2 "^2.1.0"
optimist "~0.6.0"
q "1.4.1"
saucelabs "~1.3.0"
selenium-webdriver "3.0.1"
saucelabs "^1.5.0"
selenium-webdriver "3.6.0"
source-map-support "~0.4.0"
webdriver-js-extender "^1.0.0"
webdriver-js-extender "2.1.0"
webdriver-manager "^12.0.6"
proxy-addr@~2.0.4:
@ -5659,6 +5699,18 @@ read-pkg@^2.0.0:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readable-stream@~2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
integrity sha1-j5A0HmilPMySh4jaz80Rs265t44=
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
readdirp@^2.0.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
@ -5932,23 +5984,18 @@ sass-loader@7.1.0:
pify "^3.0.0"
semver "^5.5.0"
saucelabs@~1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee"
integrity sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=
saucelabs@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d"
integrity sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==
dependencies:
https-proxy-agent "^1.0.0"
https-proxy-agent "^2.2.1"
sax@0.5.x:
version "0.5.8"
resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1"
integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=
sax@0.6.x:
version "0.6.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9"
integrity sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=
sax@>=0.6.0, sax@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
@ -5991,27 +6038,16 @@ select-hose@^2.0.0:
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=
selenium-webdriver@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7"
integrity sha1-ot6l2kqX9mcuiefKcnbO+jZRR6c=
selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz#2ba87a1662c020b8988c981ae62cb2a01298eafc"
integrity sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==
dependencies:
adm-zip "^0.4.7"
jszip "^3.1.3"
rimraf "^2.5.4"
tmp "0.0.30"
xml2js "^0.4.17"
selenium-webdriver@^2.53.2:
version "2.53.3"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085"
integrity sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=
dependencies:
adm-zip "0.4.4"
rimraf "^2.2.8"
tmp "0.0.24"
ws "^1.0.1"
xml2js "0.4.4"
selfsigned@^1.9.1:
version "1.10.4"
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.4.tgz#cdd7eccfca4ed7635d47a08bf2d5d3074092e2cd"
@ -6043,11 +6079,6 @@ semver@5.5.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==
semver@~5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
integrity sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=
semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@ -6602,6 +6633,11 @@ string_decoder@^1.0.0:
dependencies:
safe-buffer "~5.1.0"
string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
@ -6787,11 +6823,6 @@ timers-browserify@^2.0.4:
dependencies:
setimmediate "^1.0.4"
tmp@0.0.24:
version "0.0.24"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12"
integrity sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=
tmp@0.0.30:
version "0.0.30"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed"
@ -7000,11 +7031,6 @@ uglifyjs-webpack-plugin@^1.2.4:
webpack-sources "^1.1.0"
worker-farm "^1.5.2"
ultron@1.0.x:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"
integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=
ultron@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
@ -7179,13 +7205,13 @@ wbuf@^1.1.0, wbuf@^1.7.2:
dependencies:
minimalistic-assert "^1.0.0"
webdriver-js-extender@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515"
integrity sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=
webdriver-js-extender@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7"
integrity sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==
dependencies:
"@types/selenium-webdriver" "^2.53.35"
selenium-webdriver "^2.53.2"
"@types/selenium-webdriver" "^3.0.0"
selenium-webdriver "^3.0.1"
webdriver-manager@^12.0.6:
version "12.1.0"
@ -7396,14 +7422,6 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
ws@^1.0.1:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51"
integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==
dependencies:
options ">=0.0.5"
ultron "1.0.x"
ws@~3.3.1:
version "3.3.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
@ -7413,14 +7431,6 @@ ws@~3.3.1:
safe-buffer "~5.1.0"
ultron "~1.1.0"
xml2js@0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d"
integrity sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=
dependencies:
sax "0.6.x"
xmlbuilder ">=1.0.0"
xml2js@^0.4.17:
version "0.4.19"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7"
@ -7429,11 +7439,6 @@ xml2js@^0.4.17:
sax ">=0.6.0"
xmlbuilder "~9.0.1"
xmlbuilder@>=1.0.0:
version "10.1.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz#8cae6688cc9b38d850b7c8d3c0a4161dcaf475b0"
integrity sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==
xmlbuilder@~9.0.1:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,3 @@
*.js
*.js
tsserver.log
ti-*.log

View File

@ -1,260 +0,0 @@
[
{
"type": "response",
"command": "configure",
"success": true
},
{
"type": "response",
"command": "compilerOptionsForInferredProjects",
"success": true,
"body": true
},
{
"type": "response",
"command": "completions",
"success": true,
"body": [
{
"name": "anchor",
"kind": "method",
"kindModifiers": "",
"sortText": "anchor"
},
{
"name": "big",
"kind": "method",
"kindModifiers": "",
"sortText": "big"
},
{
"name": "blink",
"kind": "method",
"kindModifiers": "",
"sortText": "blink"
},
{
"name": "bold",
"kind": "method",
"kindModifiers": "",
"sortText": "bold"
},
{
"name": "charAt",
"kind": "method",
"kindModifiers": "",
"sortText": "charAt"
},
{
"name": "charCodeAt",
"kind": "method",
"kindModifiers": "",
"sortText": "charCodeAt"
},
{
"name": "codePointAt",
"kind": "method",
"kindModifiers": "",
"sortText": "codePointAt"
},
{
"name": "concat",
"kind": "method",
"kindModifiers": "",
"sortText": "concat"
},
{
"name": "endsWith",
"kind": "method",
"kindModifiers": "",
"sortText": "endsWith"
},
{
"name": "fixed",
"kind": "method",
"kindModifiers": "",
"sortText": "fixed"
},
{
"name": "fontcolor",
"kind": "method",
"kindModifiers": "",
"sortText": "fontcolor"
},
{
"name": "fontsize",
"kind": "method",
"kindModifiers": "",
"sortText": "fontsize"
},
{
"name": "includes",
"kind": "method",
"kindModifiers": "",
"sortText": "includes"
},
{
"name": "indexOf",
"kind": "method",
"kindModifiers": "",
"sortText": "indexOf"
},
{
"name": "italics",
"kind": "method",
"kindModifiers": "",
"sortText": "italics"
},
{
"name": "lastIndexOf",
"kind": "method",
"kindModifiers": "",
"sortText": "lastIndexOf"
},
{
"name": "length",
"kind": "property",
"kindModifiers": "",
"sortText": "length"
},
{
"name": "link",
"kind": "method",
"kindModifiers": "",
"sortText": "link"
},
{
"name": "localeCompare",
"kind": "method",
"kindModifiers": "",
"sortText": "localeCompare"
},
{
"name": "match",
"kind": "method",
"kindModifiers": "",
"sortText": "match"
},
{
"name": "normalize",
"kind": "method",
"kindModifiers": "",
"sortText": "normalize"
},
{
"name": "repeat",
"kind": "method",
"kindModifiers": "",
"sortText": "repeat"
},
{
"name": "replace",
"kind": "method",
"kindModifiers": "",
"sortText": "replace"
},
{
"name": "search",
"kind": "method",
"kindModifiers": "",
"sortText": "search"
},
{
"name": "slice",
"kind": "method",
"kindModifiers": "",
"sortText": "slice"
},
{
"name": "small",
"kind": "method",
"kindModifiers": "",
"sortText": "small"
},
{
"name": "split",
"kind": "method",
"kindModifiers": "",
"sortText": "split"
},
{
"name": "startsWith",
"kind": "method",
"kindModifiers": "",
"sortText": "startsWith"
},
{
"name": "strike",
"kind": "method",
"kindModifiers": "",
"sortText": "strike"
},
{
"name": "sub",
"kind": "method",
"kindModifiers": "",
"sortText": "sub"
},
{
"name": "substr",
"kind": "method",
"kindModifiers": "",
"sortText": "substr"
},
{
"name": "substring",
"kind": "method",
"kindModifiers": "",
"sortText": "substring"
},
{
"name": "sup",
"kind": "method",
"kindModifiers": "",
"sortText": "sup"
},
{
"name": "toLocaleLowerCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLocaleLowerCase"
},
{
"name": "toLocaleUpperCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLocaleUpperCase"
},
{
"name": "toLowerCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLowerCase"
},
{
"name": "toString",
"kind": "method",
"kindModifiers": "",
"sortText": "toString"
},
{
"name": "toUpperCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toUpperCase"
},
{
"name": "trim",
"kind": "method",
"kindModifiers": "",
"sortText": "trim"
},
{
"name": "valueOf",
"kind": "method",
"kindModifiers": "",
"sortText": "valueOf"
}
]
}
]

View File

@ -1,68 +0,0 @@
[
{
"seq": 0,
"type": "request",
"command": "configure",
"arguments": {
"hostInfo": "vscode"
}
},
{
"seq": 1,
"type": "request",
"command": "compilerOptionsForInferredProjects",
"arguments": {
"options": {
"module": "CommonJS",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"allowNonTsExtensions": true,
"allowJs": true,
"jsx": "Preserve"
}
}
},
{
"seq": 4,
"type": "request",
"command": "open",
"arguments": {
"file": "$$PWD$$/project/app/app.component.ts",
"fileContent": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'my-app',\n template: `<h1>Hello {{name}}</h1>`,\n})\nexport class AppComponent { name = 'Angular'; }\n"
}
},
{
"seq": 7,
"type": "request",
"command": "geterr",
"arguments": {
"delay": 0,
"files": [
"$$PWD$$/project/app/app.component.ts"
]
}
},
{
"seq": 12,
"type": "request",
"command": "change",
"arguments": {
"file": "$$PWD$$/project/app/app.component.ts",
"line": 5,
"offset": 30,
"endLine": 5,
"endOffset": 30,
"insertString": "."
}
},
{
"seq": 13,
"type": "request",
"command": "completions",
"arguments": {
"file": "$$PWD$$/project/app/app.component.ts",
"line": 5,
"offset": 31
}
}
]

View File

@ -1,45 +0,0 @@
[
{
"seq": 0,
"type": "request",
"command": "configure",
"arguments": {
"hostInfo": "vscode"
}
},
{
"seq": 1,
"type": "request",
"command": "compilerOptionsForInferredProjects",
"arguments": {
"options": {
"module": "CommonJS",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"allowNonTsExtensions": true,
"allowJs": true,
"jsx": "Preserve"
}
}
},
{
"seq": 2,
"type": "request",
"command": "open",
"arguments": {
"file": "$$PWD$$/app/app.module.ts",
"fileContent": ""
}
},
{
"seq": 3,
"type": "request",
"command": "geterr",
"arguments": {
"delay": 0,
"files": [
"$$PWD$$/app/app.module.ts"
]
}
}
]

View File

@ -0,0 +1,22 @@
/**
* @fileOverview
* This file serves as the entry point for generating goldens file for the
* language service integration test. It expects each golden file that needs
* to be generated to be passed in as command line arguments.
* For example, to generate golden file for the 'configure' request, run
* `yarn golden configure.json`.
* To generate multiple golden files, run
* `yarn golden configure.json completionInfo.json`.
*
* This is different from just running `yarn jasmine test.js` because this
* allows passing in arbitrary arguments.
*/
import Jasmine = require('jasmine');
function main() {
const jasmine = new Jasmine({});
jasmine.execute(['test.js']);
}
main()

View File

@ -1,13 +1,8 @@
[
{
"type": "response",
"command": "configure",
"success": true
},
{
{
"seq": 0,
"type": "response",
"command": "compilerOptionsForInferredProjects",
"request_seq": 1,
"success": true,
"body": true
}
]
}

View File

@ -0,0 +1,266 @@
{
"seq": 0,
"type": "response",
"command": "completionInfo",
"request_seq": 5,
"success": true,
"body": {
"isGlobalCompletion": false,
"isMemberCompletion": false,
"isNewIdentifierLocation": false,
"entries": [
{
"name": "anchor",
"kind": "method",
"kindModifiers": "",
"sortText": "anchor"
},
{
"name": "big",
"kind": "method",
"kindModifiers": "",
"sortText": "big"
},
{
"name": "blink",
"kind": "method",
"kindModifiers": "",
"sortText": "blink"
},
{
"name": "bold",
"kind": "method",
"kindModifiers": "",
"sortText": "bold"
},
{
"name": "charAt",
"kind": "method",
"kindModifiers": "",
"sortText": "charAt"
},
{
"name": "charCodeAt",
"kind": "method",
"kindModifiers": "",
"sortText": "charCodeAt"
},
{
"name": "codePointAt",
"kind": "method",
"kindModifiers": "",
"sortText": "codePointAt"
},
{
"name": "concat",
"kind": "method",
"kindModifiers": "",
"sortText": "concat"
},
{
"name": "endsWith",
"kind": "method",
"kindModifiers": "",
"sortText": "endsWith"
},
{
"name": "fixed",
"kind": "method",
"kindModifiers": "",
"sortText": "fixed"
},
{
"name": "fontcolor",
"kind": "method",
"kindModifiers": "",
"sortText": "fontcolor"
},
{
"name": "fontsize",
"kind": "method",
"kindModifiers": "",
"sortText": "fontsize"
},
{
"name": "includes",
"kind": "method",
"kindModifiers": "",
"sortText": "includes"
},
{
"name": "indexOf",
"kind": "method",
"kindModifiers": "",
"sortText": "indexOf"
},
{
"name": "italics",
"kind": "method",
"kindModifiers": "",
"sortText": "italics"
},
{
"name": "lastIndexOf",
"kind": "method",
"kindModifiers": "",
"sortText": "lastIndexOf"
},
{
"name": "length",
"kind": "property",
"kindModifiers": "",
"sortText": "length"
},
{
"name": "link",
"kind": "method",
"kindModifiers": "",
"sortText": "link"
},
{
"name": "localeCompare",
"kind": "method",
"kindModifiers": "",
"sortText": "localeCompare"
},
{
"name": "match",
"kind": "method",
"kindModifiers": "",
"sortText": "match"
},
{
"name": "normalize",
"kind": "method",
"kindModifiers": "",
"sortText": "normalize"
},
{
"name": "repeat",
"kind": "method",
"kindModifiers": "",
"sortText": "repeat"
},
{
"name": "replace",
"kind": "method",
"kindModifiers": "",
"sortText": "replace"
},
{
"name": "search",
"kind": "method",
"kindModifiers": "",
"sortText": "search"
},
{
"name": "slice",
"kind": "method",
"kindModifiers": "",
"sortText": "slice"
},
{
"name": "small",
"kind": "method",
"kindModifiers": "",
"sortText": "small"
},
{
"name": "split",
"kind": "method",
"kindModifiers": "",
"sortText": "split"
},
{
"name": "startsWith",
"kind": "method",
"kindModifiers": "",
"sortText": "startsWith"
},
{
"name": "strike",
"kind": "method",
"kindModifiers": "",
"sortText": "strike"
},
{
"name": "sub",
"kind": "method",
"kindModifiers": "",
"sortText": "sub"
},
{
"name": "substr",
"kind": "method",
"kindModifiers": "",
"sortText": "substr"
},
{
"name": "substring",
"kind": "method",
"kindModifiers": "",
"sortText": "substring"
},
{
"name": "sup",
"kind": "method",
"kindModifiers": "",
"sortText": "sup"
},
{
"name": "toLocaleLowerCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLocaleLowerCase"
},
{
"name": "toLocaleUpperCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLocaleUpperCase"
},
{
"name": "toLowerCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toLowerCase"
},
{
"name": "toString",
"kind": "method",
"kindModifiers": "",
"sortText": "toString"
},
{
"name": "toUpperCase",
"kind": "method",
"kindModifiers": "",
"sortText": "toUpperCase"
},
{
"name": "trim",
"kind": "method",
"kindModifiers": "",
"sortText": "trim"
},
{
"name": "trimLeft",
"kind": "method",
"kindModifiers": "",
"sortText": "trimLeft"
},
{
"name": "trimRight",
"kind": "method",
"kindModifiers": "",
"sortText": "trimRight"
},
{
"name": "valueOf",
"kind": "method",
"kindModifiers": "",
"sortText": "valueOf"
}
]
}
}

View File

@ -0,0 +1,7 @@
{
"seq": 0,
"type": "response",
"command": "configure",
"request_seq": 0,
"success": true
}

View File

@ -0,0 +1,32 @@
import { writeFileSync } from 'fs';
const goldens: string[] = process.argv.slice(2);
export const goldenMatcher: jasmine.CustomMatcherFactories = {
toMatchGolden(util: jasmine.MatchersUtil): jasmine.CustomMatcher {
return {
compare(actual: {command: string}, golden: string): jasmine.CustomMatcherResult {
const expected = require(`./goldens/${golden}`);
const pass = util.equals(actual, expected);
if (!pass && goldens.indexOf(golden) >= 0) {
console.error(`Writing golden file ${golden}`);
writeFileSync(`./goldens/${golden}`, JSON.stringify(actual, null, 2));
return { pass : true };
}
return {
pass,
message: `Expected response for '${actual.command}' to match golden file ${golden}.\n` +
`To generate new golden file, run "yarn golden ${golden}".`,
};
}
};
},
};
declare global {
namespace jasmine {
interface Matchers<T> {
toMatchGolden(golden: string): void
}
}
}

View File

@ -4,23 +4,16 @@
"license": "MIT",
"description": "Angular Language Service plugin integration test",
"dependencies": {
"@angular/animations": "file:../../dist/packages-dist/animations",
"@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/language-service": "file:../../dist/packages-dist/language-service",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@types/minimist": "^1.2.0",
"@types/node": "^7.0.5",
"minimist": "^1.2.0",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../node_modules/zone.js"
"@types/node": "file:../../node_modules/@types/node",
"jasmine": "file:../../node_modules/jasmine",
"typescript": "file:../../node_modules/typescript"
},
"scripts": {
"postinstall": "scripts/install.sh",
"test": "tsc -p tools && scripts/test.sh"
"build": "tsc -p tsconfig.json",
"cleanup": "rm -rf ti-*.log tsserver.log",
"golden": "node generate.js",
"test": "yarn cleanup && yarn build && jasmine test.js"
}
}

View File

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

View File

@ -1,2 +0,0 @@
TYPESCRIPTS=2.3
FIXTURES="smokeTest getCompletions"

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
cd `dirname $0`
cd ..
source scripts/env.sh
# Setup TypeScripts
for TYPESCRIPT in ${TYPESCRIPTS[@]}
do
(
cd typescripts/$TYPESCRIPT
yarn
)
done

View File

@ -1,30 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
cd `dirname $0`
cd ..
source scripts/env.sh
HOST="node tools/typescript_host.js"
VALIDATE="node tools/typescript_validator.js"
# Ensure the languages service can load correctly in node before typescript loads it.
# This verifies its dependencies and emits any exceptions, both of which are only
# emitted to the typescript logs (not the validated output).
node tools/load_test.js
for TYPESCRIPT in ${TYPESCRIPTS[@]}
do
SERVER="node typescripts/$TYPESCRIPT/node_modules/typescript/lib/tsserver.js"
for FIXTURE_BASE in ${FIXTURES[@]}
do
FIXTURE=fixtures/$FIXTURE_BASE.json
EXPECTED=fixtures/$FIXTURE_BASE-expected-$TYPESCRIPT.json
if [[ ${UPDATE_GOLDEN} == true ]]; then
$HOST --file $FIXTURE --pwd $(pwd) | $SERVER | $VALIDATE --golden > $EXPECTED
else
$HOST --file $FIXTURE --pwd $(pwd) | $SERVER | $VALIDATE --expect $EXPECTED
fi
done
done

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
cd `dirname $0`
cd ..
UPDATE_GOLDEN=true scripts/test.sh

View File

@ -0,0 +1,104 @@
import { fork, ChildProcess } from 'child_process';
import { join } from 'path';
import { Client } from './tsclient';
import { goldenMatcher } from './matcher';
describe('Angular Language Service', () => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; /* 10 seconds */
const PWD = process.env.PWD!;
const SERVER_PATH = "./node_modules/typescript/lib/tsserver.js";
let server: ChildProcess;
let client: Client;
beforeEach(() => {
jasmine.addMatchers(goldenMatcher);
server = fork(SERVER_PATH, [
'--globalPlugins', '@angular/language-service',
'--logVerbosity', 'verbose',
'--logFile', join(PWD, 'tsserver.log'),
], {
stdio: ['pipe', 'pipe', 'inherit', 'ipc'],
});
client = new Client(server);
client.listen();
});
afterEach(async () => {
client.sendRequest('exit', {});
// Give server process some time to flush all messages
await new Promise((resolve) => setTimeout(resolve, 1000));
});
it('should be launched as tsserver plugin', async () => {
let response = await client.sendRequest('configure', {
hostInfo: 'vscode',
});
expect(response).toMatchGolden('configure.json');
response = await client.sendRequest('compilerOptionsForInferredProjects', {
"options": {
module: "CommonJS",
target: "ES6",
allowSyntheticDefaultImports: true,
allowNonTsExtensions: true,
allowJs: true,
jsx: "Preserve"
}
});
expect(response).toMatchGolden('compilerOptionsForInferredProjects.json');
// Server does not send response to open request
// https://github.com/Microsoft/TypeScript/blob/master/lib/protocol.d.ts#L1055
client.sendRequest('open', {
file: `${PWD}/project/app/app.module.ts`,
fileContent: ""
});
// Server does not send response to geterr request
// https://github.com/Microsoft/TypeScript/blob/master/lib/protocol.d.ts#L1770
client.sendRequest('geterr', {
delay: 0,
files: [`${PWD}/project/app/app.module.ts`]
});
});
it('should perform completions', async () => {
await client.sendRequest('configure', {
hostInfo: 'vscode',
});
await client.sendRequest('compilerOptionsForInferredProjects', {
"options": {
module: "CommonJS",
target: "ES6",
allowSyntheticDefaultImports: true,
allowNonTsExtensions: true,
allowJs: true,
jsx: "Preserve"
}
});
client.sendRequest('open', {
file: `${PWD}/project/app/app.component.ts`,
fileContent: "import { Component } from '@angular/core';\n\n@Component({\n selector: 'my-app',\n template: `<h1>Hello {{name}}</h1>`,\n})\nexport class AppComponent { name = 'Angular'; }\n"
});
client.sendRequest('geterr', {
delay: 0,
files: [`${PWD}/project/app/app.component.ts`]
});
client.sendRequest('change', {
file: `${PWD}/project/app/app.component.ts`,
line: 5,
offset: 30,
endLine: 5,
endOffset: 30,
insertString: '.',
});
const response = await client.sendRequest('completionInfo', {
file: `${PWD}/project/app/app.component.ts`,
line: 5,
offset: 31,
});
expect(response).toMatchGolden('completionInfo.json');
});
});

View File

@ -1,35 +0,0 @@
const ts = require('typescript');
const Module = require('module');
const existingRequire = Module.prototype.require;
const recordedRequires: string[] = [];
function recordingRequire(path: string) {
recordedRequires.push(path);
return existingRequire.call(this, path);
}
Module.prototype.require = recordingRequire;
try {
const lsf = require('@angular/language-service');
const ls = lsf({typescript: ts});
// Assert that the only module that should have been required are '@angular/language-service', 'fs', and 'path'
const allowedLoads = new Set(["@angular/language-service", "fs", "path"]);
const invalidModules = recordedRequires.filter(m => !allowedLoads.has(m));
if (invalidModules.length > 0) {
console.error(`FAILED: Loading the language service required: ${invalidModules.join(', ')}`);
process.exit(1);
}
} catch (e) {
console.error(`FAILED: Loading the language service caused the following exception: ${e.stack || e}`);
process.exit(1);
}
console.log('SUCCESS: Loading passed')
process.exit(0);

View File

@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": true,
"skipLibCheck": true,
"sourceMap": false,
"lib": ["es2015", "dom"],
"types": [
"node",
"minimist"
]
},
"files": [
"typescript_host.ts",
"typescript_validator.ts",
"load_test.ts"
]
}

View File

@ -1,77 +0,0 @@
import * as fs from 'fs';
import * as minimist from 'minimist';
const RE_PWD = /\$\$PWD\$\$/g;
let errorsDetected = false;
function reportError(arg: string): boolean {
console.error(`Unknown argument: ${arg}`);
errorsDetected = true;
return false;
}
function help() {
console.log('TypeScript Host')
console.log(`${process.argv[1]} --file <file-name> [--pwd <pwd>]`);
console.log(`
Send JSON message using the JSON RPC protocol to stdout.
`)
}
let args = minimist(process.argv.slice(2), { string: ['file', 'pwd'], unknown: reportError });
if (errorsDetected) {
help();
process.exit(2);
}
const file = args['file'];
if (!file) {
console.log('stdin form not supported yet.')
process.exit(1);
}
// Sender
const pending: string[] = [];
let writing = false;
function writeMessage(message: string) {
writing = true;
process.stdout.write(message + '\n', checkPending);
}
function checkPending() {
writing = false;
if (pending.length) {
writeMessage(pending.shift());
}
}
function send(message: string) {
if (writing) {
pending.push(message);
} else {
writeMessage(message);
}
}
try {
let content = fs.readFileSync(file, 'utf8');
if (args['pwd']) {
content = content.replace(RE_PWD, args['pwd']);
}
const json = JSON.parse(content);
if (Array.isArray(json)) {
for (const message of json) {
send(JSON.stringify(message));
}
} else {
throw Error('Expected an array for input messages.')
}
} catch(e) {
console.error(`Error: ${e.message}`);
process.exit(2);
}

View File

@ -1,164 +0,0 @@
import * as fs from 'fs';
import * as minimist from 'minimist';
let errorsDetected = false;
const start = Date.now();
function reportError(arg: string): boolean {
console.error(`Unknown argument: ${arg}`);
errorsDetected = true;
return false;
}
function help() {
console.log('TypeScript Validator')
console.log(`${process.argv[1]} [--expect <file-name> | --golden] [--pwd <dir>]`);
console.log(`
Validate that the emitted output produces the expect JSON.`)
}
let args = minimist(process.argv.slice(2), { string: ['expect', 'pwd'], boolean: ['golden'], unknown: reportError });
if (!args.golden && !args.expect) {
console.log('Expected -golden or -expect');
errorsDetected = true;
}
if (args.golden && args.expect) {
console.log('Expected -golded or -expect but not both');
errorsDetected = true;
}
if (errorsDetected) {
help();
process.exit(2);
}
var expected: any;
if (args.expect) {
expected = JSON.parse(fs.readFileSync(args.expect, 'utf8'));
}
// Reader
let pending = Buffer.alloc(0);
const prefix = 'Content-Length: ';
function tryReadMessage(cb: (message: any) => void) {
const firstLine = pending.indexOf(10);
if (firstLine >= 1) {
const line = pending.toString('utf8', 0, firstLine);
if (!line.startsWith(prefix)) {
throw Error(`Unexpected input: ${line}`);
}
const length = +line.substring(prefix.length, firstLine - 1);
const dataStart = firstLine + 2;
const messageText = pending.toString('utf8', dataStart, dataStart + length);
const message = JSON.parse(messageText);
pending = pending.slice(dataStart + length + 1);
cb(message);
tryReadMessage(cb);
}
}
function collect(cb: (error: any, messages: any[]) => void) {
const result: any[] = [];
function report(error: any, messages: any[]) {
cb(error, messages);
cb = () => {};
}
process.stdin.on('error', report);
process.stdin.on('data', (data: Buffer) => {
try {
pending = Buffer.concat([pending, data], pending.length + data.length);
tryReadMessage((message: any) => {
result.push(message);
});
} catch (e) {
report(e, []);
}
});
process.stdin.on('close', () => {
report(null, result);
});
}
function sanitize(messages: any[]): any[] {
return messages.filter((message: any) => {
return message && message.type == 'response';
}).map((message: any) => {
// Only preserve a fixed set of fields.
const result: any = {};
if (message.type != null) result.type = message.type;
if (message.command != null) result.command = message.command;
if (message.success != null) result.success = message.success;
if (message.body != null) result.body = message.body;
return result;
});
}
function isPrimitive(value: any): boolean {
return Object(value) !== value;
}
function expectPrimitive(received: any, expected: any) {
if (received !== expected) {
throw new Error(`Expected ${expected} but received ${received}`);
}
}
function expectArray(received: any, expected: any[]) {
if (!Array.isArray(received)) {
throw new Error(`Expected an array, received ${JSON.stringify(received)}`);
}
if (received.length != expected.length) {
throw new Error(`Expected an array length ${expected.length}, received ${JSON.stringify(received)}`);
}
for (let i = 0; i < expected.length; i++) {
expect(received[i], expected[i]);
}
}
function expectObject(received: any, expected: any) {
for (const name of Object.getOwnPropertyNames(expected)) {
if (!received.hasOwnProperty(name)) {
throw new Error(`Expected object an object containing a field ${name}, received ${JSON.stringify(expected)}`);
}
expect(received[name], expected[name]);
}
}
function expect(received: any, expected: any) {
if (isPrimitive(expected)) {
expectPrimitive(received, expected);
} else if (Array.isArray(expected)) {
expectArray(received, expected);
} else {
expectObject(received, expected);
}
}
collect((err: any, messages: any[]) => {
if (err) {
console.error(err.message);
process.exit(1);
}
if (args.golden) {
console.log(JSON.stringify(sanitize(messages), null, ' '));
} else {
try {
expect(sanitize(messages), expected);
console.log('PASSED:', Date.now() - start, 'ms');
process.exit(0);
} catch(e) {
console.log('FAILED:', e.message);
process.exit(1);
}
}
});

View File

@ -0,0 +1,70 @@
import { ChildProcess } from "child_process";
import { EventEmitter } from "events";
/**
* Provides a client for tsserver. Tsserver does not use standard JSON-RPC
* protocol thus the need for this custom client.
*/
export class Client {
private data: Buffer|undefined;
private id = 0;
private responseEmitter = new EventEmitter();
constructor(private readonly server: ChildProcess) {}
listen() {
this.server.stdout.on('data', (data: Buffer) => {
this.data = this.data ? Buffer.concat([this.data, data]) : data;
const CONTENT_LENGTH = 'Content-Length: '
const index = this.data.indexOf(CONTENT_LENGTH);
if (index < 0) {
return;
}
let start = index + CONTENT_LENGTH.length;
let end = this.data.indexOf('\r\n', start);
if (end < start) {
return;
}
const contentLengthStr = this.data.slice(start, end).toString();
const contentLength = Number(contentLengthStr);
if (isNaN(contentLength) || contentLength < 0) {
return;
}
start = end + 4;
end = start + contentLength;
if (end > this.data.length) {
return;
}
const content = this.data.slice(start, end).toString();
this.data = this.data.slice(end);
try {
const payload = JSON.parse(content);
if (payload.type === "event") {
return;
}
this.responseEmitter.emit('response', payload);
}
catch (error) {
this.responseEmitter.emit('error', error);
}
});
}
async send(type: string, command: string, params: {}) {
const request = {
seq: this.id++,
type,
command,
arguments: params
};
this.server.stdin.write(JSON.stringify(request) + '\r\n');
return new Promise((resolve, reject) => {
this.responseEmitter.once('response', resolve);
this.responseEmitter.once('error', reject);
});
}
async sendRequest(command: string, params: {}) {
return this.send('request', command, params);
}
}

View File

@ -1,13 +1,60 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
}
/* Basic Options */
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"include": ["*.ts"]
}

View File

@ -1,15 +0,0 @@
{
"name": "2.3",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"typescript": "2.3.0"
}
}

View File

@ -1,7 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
typescript@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.0.tgz#2e63e09284392bc8158a2444c33e2093795c0418"

File diff suppressed because it is too large Load Diff

View File

@ -39,6 +39,12 @@ ivy-ngcc
grep "static ngInjectorDef: ɵngcc0.InjectorDef<ApplicationModule>;" node_modules/@angular/core/src/application_module.d.ts
if [[ $? != 0 ]]; then exit 1; fi
# Did it generate a base factory call for synthesized constructors correctly?
grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm2015/table.js
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
# Can it be safely run again (as a noop)?
ivy-ngcc

View File

@ -3,7 +3,7 @@
"@angular/animations@file:../../dist/packages-dist/animations":
version "7.1.0"
version "7.2.0-rc.0"
dependencies:
tslib "^1.9.0"
@ -17,12 +17,12 @@
parse5 "^5.0.0"
"@angular/common@file:../../dist/packages-dist/common":
version "7.1.0"
version "0.0.0"
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "7.1.0"
version "0.0.0"
dependencies:
canonical-path "1.0.0"
chokidar "^1.4.2"
@ -37,22 +37,22 @@
yargs "9.0.1"
"@angular/compiler@file:../../dist/packages-dist/compiler":
version "7.1.0"
version "7.2.0-rc.0"
dependencies:
tslib "^1.9.0"
"@angular/core@file:../../dist/packages-dist/core":
version "7.1.0"
version "0.0.0"
dependencies:
tslib "^1.9.0"
"@angular/forms@file:../../dist/packages-dist/forms":
version "7.1.0"
version "0.0.0"
dependencies:
tslib "^1.9.0"
"@angular/http@file:../../dist/packages-dist/http":
version "7.1.0"
version "7.2.0-rc.0"
dependencies:
tslib "^1.9.0"
@ -66,17 +66,17 @@
parse5 "^5.0.0"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "7.1.0"
version "7.2.0-rc.0"
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "7.1.0"
version "0.0.0"
dependencies:
tslib "^1.9.0"
"@angular/router@file:../../dist/packages-dist/router":
version "7.1.0"
version "0.0.0"
dependencies:
tslib "^1.9.0"
@ -3278,7 +3278,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
"typescript@file:../../node_modules/typescript":
version "3.1.1"
version "3.2.2"
ua-parser-js@0.7.17:
version "0.7.17"

View File

@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "7.2.1",
"version": "8.0.0-beta.0",
"private": true,
"branchPattern": "2.0.*",
"description": "Angular - a web framework for modern web apps",
@ -32,10 +32,11 @@
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
"@angular-devkit/architect": "^0.10.6",
"@angular-devkit/build-optimizer": "^0.12.2",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.0.4",
"@bazel/karma": "~0.22.1",
"@bazel/typescript": "~0.22.1",
"@bazel/typescript": "0.22.1-7-g68fed6a",
"@schematics/angular": "^7.0.4",
"@types/chokidar": "1.7.3",
"@types/convert-source-map": "^1.5.1",
@ -73,6 +74,9 @@
"node-uuid": "1.4.8",
"protractor": "^5.4.2",
"reflect-metadata": "^0.1.3",
"rollup": "^1.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"selenium-webdriver": "3.5.0",
"shelljs": "^0.8.1",
"source-map": "^0.6.1",
@ -129,10 +133,7 @@
"madge": "0.5.0",
"mutation-observer": "^1.0.3",
"rewire": "2.5.2",
"rollup": "0.47.4",
"rollup-plugin-commonjs": "8.1.0",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-sourcemaps": "0.4.2",
"rxjs": "^6.3.0",
"sauce-connect": "https://saucelabs.com/downloads/sc-4.5.2-linux.tar.gz",
"semver": "5.4.1",

View File

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

View File

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

View File

@ -66,8 +66,8 @@ export class AnimationEngine {
this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);
}
onRemove(namespaceId: string, element: any, context: any): void {
this._transitionEngine.removeNode(namespaceId, element, context);
onRemove(namespaceId: string, element: any, context: any, isHostElement?: boolean): void {
this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);
}
disableAnimations(element: any, disable: boolean) {

View File

@ -708,17 +708,23 @@ export class TransitionAnimationEngine {
}
}
removeNode(namespaceId: string, element: any, context: any): void {
if (!isElementNode(element)) {
this._onRemovalComplete(element, context);
return;
}
removeNode(namespaceId: string, element: any, isHostElement: boolean, context: any): void {
if (isElementNode(element)) {
const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;
if (ns) {
ns.removeNode(element, context);
} else {
this.markElementAsRemoved(namespaceId, element, false, context);
}
const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;
if (ns) {
ns.removeNode(element, context);
if (isHostElement) {
const hostNS = this.namespacesByHostElement.get(element);
if (hostNS && hostNS.id !== namespaceId) {
hostNS.removeNode(element, context);
}
}
} else {
this.markElementAsRemoved(namespaceId, element, false, context);
this._onRemovalComplete(element, context);
}
}

View File

@ -111,7 +111,7 @@ const DEFAULT_NAMESPACE_ID = 'id';
expect(engine.elementContainsData(DEFAULT_NAMESPACE_ID, element)).toBeTruthy();
engine.removeNode(DEFAULT_NAMESPACE_ID, element, true);
engine.removeNode(DEFAULT_NAMESPACE_ID, element, true, true);
engine.flush();
expect(engine.elementContainsData(DEFAULT_NAMESPACE_ID, element)).toBeTruthy();

View File

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

View File

@ -53,19 +53,6 @@ def rules_angular_dev_dependencies():
shorter.
"""
# We have a source dependency on the Devkit repository, because it's built with
# Bazel.
# This allows us to edit sources and have the effect appear immediately without
# re-packaging or "npm link"ing.
# Even better, things like aspects will visit the entire graph including
# ts_library rules in the devkit repository.
http_archive(
name = "angular_cli",
sha256 = "8cf320ea58c321e103f39087376feea502f20eaf79c61a4fdb05c7286c8684fd",
strip_prefix = "angular-cli-6.1.0-rc.0",
url = "https://github.com/angular/angular-cli/archive/v6.1.0-rc.0.zip",
)
http_archive(
name = "org_brotli",
sha256 = "774b893a0700b0692a76e2e5b7e7610dbbe330ffbe3fe864b4b52ca718061d5a",

View File

@ -13,13 +13,15 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
nodejs_binary(
name = "rollup_with_build_optimizer",
data = ["@angular_cli//packages/angular_devkit/build_optimizer:lib"],
# Since our rule extends the one in rules_nodejs, we use the same runtime
# dependency @build_bazel_rules_nodejs_rollup_deps. We don't need any
# additional npm dependencies when we run rollup or uglify.
entry_point = "build_bazel_rules_nodejs_rollup_deps/node_modules/rollup/bin/rollup",
data = [
"@ngdeps//@angular-devkit/build-optimizer",
"@ngdeps//is-builtin-module",
"@ngdeps//rollup",
"@ngdeps//rollup-plugin-node-resolve",
"@ngdeps//rollup-plugin-sourcemaps",
],
entry_point = "ngdeps/node_modules/rollup/bin/rollup",
install_source_map_support = False,
node_modules = "@build_bazel_rules_nodejs_rollup_deps//:node_modules",
)
nodejs_binary(

View File

@ -285,6 +285,8 @@ _EXTRA_NODE_OPTIONS_FLAGS = [
"--node_options=--expose-gc",
# Show ~full stack traces, instead of cutting off after 10 items.
"--node_options=--stack-trace-limit=100",
# Give 2 GB RAM to node to make bigger google3 modules to compile, we should be able to drop this after Ivy/ngtsc is the default in g3
"--node_options=--max-old-space-size=2048",
]
def ngc_compile_action(

View File

@ -27,11 +27,23 @@ load(
load("@build_bazel_rules_nodejs//internal:collect_es6_sources.bzl", collect_es2015_sources = "collect_es6_sources")
load(":esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5")
PACKAGES = ["packages/core/src", "packages/common/src", "packages/compiler/src", "external/rxjs"]
PACKAGES = [
# Generated paths when using ng_rollup_bundle outside this monorepo.
"external/angular/packages/core/src",
"external/angular/packages/common/src",
"external/angular/packages/compiler/src",
"external/angular/packages/platform-browser/src",
"external/rxjs",
# Generated paths when using ng_rollup_bundle inside this monorepo.
"packages/core/src",
"packages/common/src",
"packages/compiler/src",
"packages/platform-browser/src",
]
PLUGIN_CONFIG = "{sideEffectFreeModules: [\n%s]}" % ",\n".join(
[" '.esm5/{0}'".format(p) for p in PACKAGES],
)
BO_ROLLUP = "angular_cli/packages/angular_devkit/build_optimizer/src/build-optimizer/rollup-plugin.js"
BO_ROLLUP = "ngdeps/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/rollup-plugin.js"
BO_PLUGIN = "require('%s').default(%s)" % (BO_ROLLUP, PLUGIN_CONFIG)
def _use_plain_rollup(ctx):

View File

@ -1,5 +1,82 @@
# Schematics for Bazel
## WARNING
Schematics in `@angular/bazel` is still highly experimental as of January 2019,
please use with caution. For feedbacks and comments, please open an issue on
GitHub and ping [@mgechev](https://github.com/mgechev) or
[@kyliau](https://github.com/kyliau).
## Create a Bazel-managed Angular project
To create a new Angular project that builds with Bazel, all you need to do is install the `@angular/bazel` package.
The example below assumes that you have a global installation of Angular CLI.
If not, please run `yarn global add @angular/cli`.
Install the latest `@angular/bazel` for generating Bazel schematics.
```
$ yarn global add @angular/bazel
```
Create a new project using `@angular/bazel` schematics for `ng new`.
```
$ ng new demo --collection=@angular/bazel --defaults
```
In addition to the regular files generated by CLI, the following files that are
specific to a Bazel workspace are also created.
```
...
CREATE demo/BUILD.bazel (190 bytes)
CREATE demo/WORKSPACE (2951 bytes)
CREATE demo/.bazelignore (18 bytes)
CREATE demo/.bazelrc (828 bytes)
CREATE demo/e2e/BUILD.bazel (1230 bytes)
CREATE demo/e2e/protractor.on-prepare.js (1101 bytes)
CREATE demo/src/BUILD.bazel (2626 bytes)
CREATE demo/src/initialize_testbed.ts (432 bytes)
CREATE demo/src/main.dev.ts (185 bytes)
CREATE demo/src/main.prod.ts (249 bytes)
```
Note that in a Bazel-managed project, there is a Bazel WORKSPACE file and a few BUILD.bazel files.
There are also some files specific to a Bazel-managed project, namely `main.dev.ts` and `main.prod.ts`.
This is because all Angular projects built with Bazel must be AOT only.
In a Bazel project, `main.ts` generated by CLI is not used.
By default, `ng new` for Bazel does not perform `yarn install`.
This is because the `node_modules` are managed by Bazel and it is Bazel's
responsibility to perform the install.
Next, let's try to build the project using Bazel.
All existing `ng` commands would work as before.
```
cd demo
# The following yarn step is needed so that `ng build` works correctly.
# Alternatively, you can skip this step if you choose to not use `ng` commands.
# In which case, you'd execute `yarn bazel build //src:bundle`. This is
# equivalent to running `ng build`.
yarn
ng build
ng serve
```
If you encounter a warning about version mismatch, update `ANGULAR_VERSION` in
the WORKSPACE file to match the version of `@angular/bazel` installed from NPM.
Bring up the dev server using `ibazel run` command.
```
yarn ibazel run //src:devserver
```
Make some changes to the code, and verify that the dev server automatically refreshes.
## Development notes
To test any local changes, run

View File

@ -41,7 +41,7 @@ http_archive(
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-%s.tgz" % RXJS_VERSION,
strip_prefix = "package/src",
)
<% if (sass) { %>
# Rules for compiling sass
RULES_SASS_VERSION = "<%= RULES_SASS_VERSION %>"
http_archive(
@ -49,7 +49,7 @@ http_archive(
url = "https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION,
)
<% } %>
####################################
# Load and install our dependencies downloaded above.
@ -85,9 +85,9 @@ browser_repositories(
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
<% if (sass) { %>
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
sass_repositories()
<% } %>
load("@angular//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()

View File

@ -5,7 +5,17 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test_suit
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle", "history_server")
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
<% if (sass) { %>load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
[
sass_binary(
name = "style_" + x,
src = x,
deps = [],
)
for x in glob(["**/*.scss"])
]
<% } %>
ng_module(
name = "src",
srcs = glob(
@ -20,7 +30,7 @@ ng_module(
assets = glob([
"**/*.css",
"**/*.html",
]),
])<% if (sass) { %> + [":style_" + x for x in glob(["**/*.scss"])]<% } %>,
deps = [
"@angular//packages/core",
"@angular//packages/platform-browser",<% if (routing) { %>

View File

@ -60,6 +60,16 @@ function hasRoutingModule(host: Tree) {
return hasRouting;
}
/**
* Returns true if project uses SASS stylesheets, false otherwise.
*/
function hasSassStylesheet(host: Tree) {
let hasSass = false;
// The proper extension for SASS is .scss
host.visit((file: string) => { hasSass = hasSass || file.endsWith('.scss'); });
return hasSass;
}
export default function(options: BazelWorkspaceOptions): Rule {
return (host: Tree, context: SchematicContext) => {
if (!options.name) {
@ -103,6 +113,7 @@ export default function(options: BazelWorkspaceOptions): Rule {
...options,
'dot': '.', ...workspaceVersions,
routing: hasRoutingModule(host),
sass: hasSassStylesheet(host),
}),
move(appDir),
]));

View File

@ -12,7 +12,7 @@ import {clean} from './index';
describe('Bazel-workspace Schematic', () => {
const schematicRunner =
new SchematicTestRunner('@angular/bazel', require.resolve('../collection.json'), );
new SchematicTestRunner('@angular/bazel', require.resolve('../collection.json'));
const defaultOptions = {
name: 'demo',
};
@ -79,6 +79,46 @@ describe('Bazel-workspace Schematic', () => {
expect(content).toContain('workspace(name = "demo_project"');
});
});
describe('SASS', () => {
let host = new UnitTestTree(new HostTree);
beforeAll(() => {
host.create('/demo/src/app/app.component.scss', '');
expect(host.files).toContain('/demo/src/app/app.component.scss');
const options = {...defaultOptions};
host = schematicRunner.runSchematic('bazel-workspace', options, host);
expect(host.files).toContain('/demo/WORKSPACE');
expect(host.files).toContain('/demo/src/BUILD.bazel');
});
it('should download rules_sass in WORKSPACE', () => {
const content = host.readContent('/demo/WORKSPACE');
expect(content).toContain('RULES_SASS_VERSION');
expect(content).toContain('io_bazel_rules_sass');
});
it('should load sass_repositories in WORKSPACE', () => {
const content = host.readContent('/demo/WORKSPACE');
expect(content).toContain(
'load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")');
expect(content).toContain('sass_repositories()');
});
it('should add sass_binary rules in src/BUILD', () => {
const content = host.readContent('/demo/src/BUILD.bazel');
expect(content).toContain('load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")');
expect(content).toMatch(/sass_binary\((.*\n)+\)/);
});
it('should add SASS targets to assets of ng_module in src/BUILD', () => {
const content = host.readContent('/demo/src/BUILD.bazel');
expect(content).toContain(`
assets = glob([
"**/*.css",
"**/*.html",
]) + [":style_" + x for x in glob(["**/*.scss"])],`);
});
});
});
describe('clean', () => {

View File

@ -91,7 +91,7 @@ Hello
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -165,7 +165,7 @@ Hello
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("example/secondary",["exports","@angular/core"],t):t(((e=e||self).example=e.example||{},e.example.secondary={}),e.ng.core)}(this,function(e,t){"use strict";
@ -190,7 +190,7 @@ e.SecondaryModule=o,e.a=1,Object.defineProperty(e,"__esModule",{value:!0})});
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -262,7 +262,7 @@ e.SecondaryModule=o,e.a=1,Object.defineProperty(e,"__esModule",{value:!0})});
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("example",["exports","@angular/core"],t):t((e=e||self).example={},e.ng.core)}(this,function(e,t){"use strict";
@ -502,7 +502,7 @@ export * from './index';
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -537,7 +537,7 @@ export { SecondaryModule, a };
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -570,7 +570,7 @@ export { MyModule };
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -614,7 +614,7 @@ export { SecondaryModule, a };
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@ -749,7 +749,7 @@ export declare const a = 1;
/**
* @license Angular v0.0.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

View File

@ -10,7 +10,6 @@ ts_library(
"src/**/*.ts",
],
),
module_name = "@angular/benchpress",
deps = [
"//packages:types",
"//packages/core",

View File

@ -10,7 +10,6 @@ ng_module(
"src/**/*.ts",
],
),
module_name = "@angular/common",
deps = [
"//packages/core",
"@rxjs",

View File

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

View File

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

View File

@ -8,7 +8,6 @@ ts_library(
["**/*.ts"],
exclude = ["closure-locale.ts"],
),
module_name = "@angular/common/locales",
)
npm_package(

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
import {Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
/**
* @publicApi
@ -151,7 +151,7 @@ export class NgForOf<T> implements DoCheck {
this._differ = this._differs.find(value).create(this.ngForTrackBy);
} catch {
throw new Error(
`Cannot find a differ supporting object '${value}' of type '${getTypeNameForDebugging(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
}
}
}
@ -218,6 +218,6 @@ class RecordViewTuple<T> {
constructor(public record: any, public view: EmbeddedViewRef<NgForOfContext<T>>) {}
}
export function getTypeNameForDebugging(type: any): string {
function getTypeName(type: any): string {
return type['name'] || typeof type;
}

View File

@ -34,14 +34,20 @@ import {Directive, EmbeddedViewRef, Input, OnChanges, SimpleChange, SimpleChange
*/
@Directive({selector: '[ngTemplateOutlet]'})
export class NgTemplateOutlet implements OnChanges {
// TODO(issue/24571): remove '!'.
private _viewRef !: EmbeddedViewRef<any>;
private _viewRef: EmbeddedViewRef<any>|null = null;
// TODO(issue/24571): remove '!'.
@Input() public ngTemplateOutletContext !: Object;
/**
* A context object to attach to the {@link EmbeddedViewRef}. This should be an
* object, the object's keys will be available for binding by the local template `let`
* declarations.
* Using the key `$implicit` in the context object will set its value as default.
*/
@Input() public ngTemplateOutletContext: Object|null = null;
// TODO(issue/24571): remove '!'.
@Input() public ngTemplateOutlet !: TemplateRef<any>;
/**
* A string defining the template reference and optionally the context object for the template.
*/
@Input() public ngTemplateOutlet: TemplateRef<any>|null = null;
constructor(private _viewContainerRef: ViewContainerRef) {}
@ -97,7 +103,7 @@ export class NgTemplateOutlet implements OnChanges {
private _updateExistingContext(ctx: Object): void {
for (let propName of Object.keys(ctx)) {
(<any>this._viewRef.context)[propName] = (<any>this.ngTemplateOutletContext)[propName];
(<any>this._viewRef !.context)[propName] = (<any>this.ngTemplateOutletContext)[propName];
}
}
}

View File

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

View File

@ -20,17 +20,20 @@ ts_library(
"src/integrationtest/**/*.ts",
],
),
module_name = "@angular/compiler-cli",
tsconfig = ":tsconfig",
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations",
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/entry_point",
"//packages/compiler-cli/src/ngtsc/imports",
"//packages/compiler-cli/src/ngtsc/partial_evaluator",
"//packages/compiler-cli/src/ngtsc/reflection",
"//packages/compiler-cli/src/ngtsc/shims",
"//packages/compiler-cli/src/ngtsc/switch",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/typecheck",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types",
"@ngdeps//tsickle",

View File

@ -24,3 +24,4 @@ export {CompilerOptions as AngularCompilerOptions} from './src/transformers/api'
export {NgTools_InternalApi_NG_2 as __NGTOOLS_PRIVATE_API_2} from './src/ngtools_api';
export {ngToTsDiagnostic} from './src/transformers/util';
export {NgTscPlugin} from './src/ngtsc/tsc_plugin';

View File

@ -9,7 +9,6 @@
import {Component, INJECTOR, Injectable, NgModule} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {renderModuleFactory} from '@angular/platform-server';
import {fixmeIvy} from '@angular/private/testing';
import {BasicAppModuleNgFactory} from 'app_built/src/basic.ngfactory';
import {DepAppModuleNgFactory} from 'app_built/src/dep.ngfactory';
import {HierarchyAppModuleNgFactory} from 'app_built/src/hierarchy.ngfactory';
@ -168,21 +167,20 @@ describe('ngInjectableDef Bazel Integration', () => {
expect(TestBed.get(INJECTOR).get('foo')).toEqual('bar');
});
fixmeIvy('FW-854: NodeInjector does not know how to get itself (INJECTOR)')
.it('Component injector understands requests for INJECTABLE', () => {
@Component({
selector: 'test-cmp',
template: 'test',
providers: [{provide: 'foo', useValue: 'bar'}],
})
class TestCmp {
}
it('Component injector understands requests for INJECTABLE', () => {
@Component({
selector: 'test-cmp',
template: 'test',
providers: [{provide: 'foo', useValue: 'bar'}],
})
class TestCmp {
}
TestBed.configureTestingModule({
declarations: [TestCmp],
});
TestBed.configureTestingModule({
declarations: [TestCmp],
});
const fixture = TestBed.createComponent(TestCmp);
expect(fixture.componentRef.injector.get(INJECTOR).get('foo')).toEqual('bar');
});
const fixture = TestBed.createComponent(TestCmp);
expect(fixture.componentRef.injector.get(INJECTOR).get('foo')).toEqual('bar');
});
});

View File

@ -8,13 +8,13 @@ ts_library(
"*.ts",
"**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngcc",
deps = [
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations",
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/imports",
"//packages/compiler-cli/src/ngtsc/partial_evaluator",
"//packages/compiler-cli/src/ngtsc/reflection",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/translator",
"@ngdeps//@types/convert-source-map",

View File

@ -11,6 +11,8 @@ import * as fs from 'fs';
import * as ts from 'typescript';
import {BaseDefDecoratorHandler, ComponentDecoratorHandler, DirectiveDecoratorHandler, InjectableDecoratorHandler, NgModuleDecoratorHandler, PipeDecoratorHandler, ReferencesRegistry, ResourceLoader, SelectorScopeRegistry} from '../../../ngtsc/annotations';
import {TsReferenceResolver} from '../../../ngtsc/imports';
import {PartialEvaluator} from '../../../ngtsc/partial_evaluator';
import {CompileResult, DecoratorHandler} from '../../../ngtsc/transform';
import {DecoratedClass} from '../host/decorated_class';
import {NgccReflectionHost} from '../host/ngcc_host';
@ -44,12 +46,14 @@ export interface MatchingHandler<A, M> {
}
/**
* `ResourceLoader` which directly uses the filesystem to resolve resources synchronously.
* Simple class that resolves and loads files directly from the filesystem.
*/
export class FileResourceLoader implements ResourceLoader {
load(url: string, containingFile: string): string {
url = path.resolve(path.dirname(containingFile), url);
return fs.readFileSync(url, 'utf8');
class NgccResourceLoader implements ResourceLoader {
canPreload = false;
preload(): undefined|Promise<void> { throw new Error('Not implemented.'); }
load(url: string): string { return fs.readFileSync(url, 'utf8'); }
resolve(url: string, containingFile: string): string {
return path.resolve(path.dirname(containingFile), url);
}
}
@ -57,34 +61,41 @@ export class FileResourceLoader implements ResourceLoader {
* This Analyzer will analyze the files that have decorated classes that need to be transformed.
*/
export class DecorationAnalyzer {
resourceLoader = new FileResourceLoader();
scopeRegistry = new SelectorScopeRegistry(this.typeChecker, this.host);
resourceManager = new NgccResourceLoader();
resolver = new TsReferenceResolver(this.program, this.typeChecker, this.options, this.host);
scopeRegistry = new SelectorScopeRegistry(this.typeChecker, this.reflectionHost, this.resolver);
evaluator = new PartialEvaluator(this.reflectionHost, this.typeChecker, this.resolver);
handlers: DecoratorHandler<any, any>[] = [
new BaseDefDecoratorHandler(this.typeChecker, this.host),
new BaseDefDecoratorHandler(this.reflectionHost, this.evaluator),
new ComponentDecoratorHandler(
this.typeChecker, this.host, this.scopeRegistry, this.isCore, this.resourceLoader,
this.rootDirs, /* defaultPreserveWhitespaces */ false, /* i18nUseExternalIds */ true),
new DirectiveDecoratorHandler(this.typeChecker, this.host, this.scopeRegistry, this.isCore),
new InjectableDecoratorHandler(this.host, this.isCore),
this.reflectionHost, this.evaluator, this.scopeRegistry, this.isCore, this.resourceManager,
this.rootDirs, /* defaultPreserveWhitespaces */ false,
/* i18nUseExternalIds */ true),
new DirectiveDecoratorHandler(
this.reflectionHost, this.evaluator, this.scopeRegistry, this.isCore),
new InjectableDecoratorHandler(this.reflectionHost, this.isCore),
new NgModuleDecoratorHandler(
this.typeChecker, this.host, this.scopeRegistry, this.referencesRegistry, this.isCore),
new PipeDecoratorHandler(this.typeChecker, this.host, this.scopeRegistry, this.isCore),
this.reflectionHost, this.evaluator, this.scopeRegistry, this.referencesRegistry,
this.isCore),
new PipeDecoratorHandler(this.reflectionHost, this.evaluator, this.scopeRegistry, this.isCore),
];
constructor(
private typeChecker: ts.TypeChecker, private host: NgccReflectionHost,
private referencesRegistry: ReferencesRegistry, private rootDirs: string[],
private isCore: boolean) {}
private program: ts.Program, private options: ts.CompilerOptions,
private host: ts.CompilerHost, private typeChecker: ts.TypeChecker,
private reflectionHost: NgccReflectionHost, private referencesRegistry: ReferencesRegistry,
private rootDirs: string[], private isCore: boolean) {}
/**
* Analyze a program to find all the decorated files should be transformed.
* @param program The program whose files should be analysed.
*
* @returns a map of the source files to the analysis for those files.
*/
analyzeProgram(program: ts.Program): DecorationAnalyses {
analyzeProgram(): DecorationAnalyses {
const decorationAnalyses = new DecorationAnalyses();
const analysedFiles =
program.getSourceFiles().map(sourceFile => this.analyzeFile(sourceFile)).filter(isDefined);
const analysedFiles = this.program.getSourceFiles()
.map(sourceFile => this.analyzeFile(sourceFile))
.filter(isDefined);
const compiledFiles = analysedFiles.map(analysedFile => this.compileFile(analysedFile));
compiledFiles.forEach(
compiledFile => decorationAnalyses.set(compiledFile.sourceFile, compiledFile));
@ -92,7 +103,7 @@ export class DecorationAnalyzer {
}
protected analyzeFile(sourceFile: ts.SourceFile): AnalyzedFile|undefined {
const decoratedClasses = this.host.findDecoratedClasses(sourceFile);
const decoratedClasses = this.reflectionHost.findDecoratedClasses(sourceFile);
return decoratedClasses.length ? {
sourceFile,
analyzedClasses: decoratedClasses.map(clazz => this.analyzeClass(clazz)).filter(isDefined)

View File

@ -8,8 +8,8 @@
import * as ts from 'typescript';
import {ReferencesRegistry} from '../../../ngtsc/annotations';
import {Declaration} from '../../../ngtsc/host';
import {ResolvedReference} from '../../../ngtsc/metadata';
import {ResolvedReference} from '../../../ngtsc/imports';
import {Declaration} from '../../../ngtsc/reflection';
import {NgccReflectionHost} from '../host/ngcc_host';
import {isDefined} from '../utils';
@ -62,7 +62,8 @@ export class ModuleWithProvidersAnalyzer {
`The referenced NgModule in ${fn.declaration.getText()} is not a class declaration in the typings program; instead we get ${dtsNgModule.getText()}`);
}
// Record the usage of the internal module as it needs to become an exported symbol
this.referencesRegistry.add(new ResolvedReference(ngModule.node, fn.ngModule));
this.referencesRegistry.add(
ngModule.node, new ResolvedReference(ngModule.node, fn.ngModule));
ngModule = {node: dtsNgModule, viaModule: null};
}

View File

@ -8,8 +8,8 @@
import * as ts from 'typescript';
import {ReferencesRegistry} from '../../../ngtsc/annotations';
import {Declaration, ReflectionHost} from '../../../ngtsc/host';
import {Reference, ResolvedReference} from '../../../ngtsc/metadata';
import {Reference, ResolvedReference} from '../../../ngtsc/imports';
import {Declaration, ReflectionHost} from '../../../ngtsc/reflection';
import {hasNameIdentifier} from '../utils';
/**
@ -29,7 +29,7 @@ export class NgccReferencesRegistry implements ReferencesRegistry {
* Only `ResolveReference` references are stored. Other types are ignored.
* @param references A collection of references to register.
*/
add(...references: Reference<ts.Declaration>[]): void {
add(source: ts.Declaration, ...references: Reference<ts.Declaration>[]): void {
references.forEach(ref => {
// Only store resolved references. We are not interested in literals.
if (ref instanceof ResolvedReference && hasNameIdentifier(ref.node)) {

View File

@ -7,10 +7,10 @@
*/
import * as ts from 'typescript';
import {ReferencesRegistry} from '../../../ngtsc/annotations';
import {Declaration} from '../../../ngtsc/host';
import {Declaration} from '../../../ngtsc/reflection';
import {NgccReflectionHost} from '../host/ngcc_host';
import {hasNameIdentifier, isDefined} from '../utils';
import {NgccReferencesRegistry} from './ngcc_references_registry';
export interface ExportInfo {
identifier: string;
@ -24,7 +24,8 @@ export type PrivateDeclarationsAnalyses = ExportInfo[];
* (i.e. on an NgModule) that are not publicly exported via an entry-point.
*/
export class PrivateDeclarationsAnalyzer {
constructor(private host: NgccReflectionHost, private referencesRegistry: ReferencesRegistry) {}
constructor(
private host: NgccReflectionHost, private referencesRegistry: NgccReferencesRegistry) {}
analyzeProgram(program: ts.Program): PrivateDeclarationsAnalyses {
const rootFiles = this.getRootFiles(program);

View File

@ -7,7 +7,7 @@
*/
import * as ts from 'typescript';
import {Decorator} from '../../../ngtsc/host';
import {Decorator} from '../../../ngtsc/reflection';
/**
* A simple container that holds the details of a decorated class that has been

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