851 Commits

Author SHA1 Message Date
Chuck Jazdzewski
7bfeac746e fix(compiler-cli): only use error collector when needed. (#19912)
The error collector changes behavior of the metadata resolver
in ways that haven't been fully hardened. This changes limits
its use to the lazy route detection and the language service.

Issue: #19906

PR Close #19912
2017-10-24 17:06:41 -04:00
Tobias Bosch
c92efc15fb fix(compiler): don’t type check templates with skipTemplateCodegen (#19909)
This change is needed to prevent users’ builds from breaking.

If a user sets `fullTemlateTypeCheck` to true, we will
continue to check the templates even when `skipTemplateCodegen` is true
as well.

Related to #19906

PR Close #19909
2017-10-24 17:06:34 -04:00
Chuck Jazdzewski
a0ae120093 fix(compiler-cli): report all diagnostic error messages (#19886)
This fixes a problem introduced in 8d45fefc313aebd0db7b320a1d324c2d4bebd268
which modified how diagnostic error messages are reported for structural
metadata errors causing some of the diagnostics to be lost.

PR Close #19886
2017-10-23 22:41:10 -04:00
vsavkin
d3211a2468 feat(router): add "onSameUrlNavigation" router configuration option (#19463)
PR Close #19463
2017-10-23 20:56:53 -04:00
vsavkin
adab4f3e49 fix(router): do not call location.go when skipping a navigation (#19463)
Closes #18036

PR Close #19463
2017-10-23 20:56:52 -04:00
vsavkin
82fed62af2 fix(router): navigating to the current location works (#19463)
Closes #13340

PR Close #19463
2017-10-23 20:56:52 -04:00
Alex Rickabaugh
6bed189e37 build(service-worker): set skipTemplateCodegen for build (#19875)
PR Close #19875
2017-10-23 19:31:42 -04:00
Alex Rickabaugh
4abacb58f1 fix(aio): add service worker entrypoint to aio build (#19875)
Fixes #19838

PR Close #19875
2017-10-23 19:31:42 -04:00
Tobias Bosch
fc0b1d5b61 fix(compiler): correctly calculate the outDir if it repeats a parts of the rootDir. (#19836)
Fixes #19718

PR Close #19836
2017-10-23 18:46:04 -04:00
Tobias Bosch
8d45fefc31 refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836)
Usages of `NgTools_InternalApi_NG_2` from `@angular/compiler-cli` will now
throw an error.

Adds `listLazyRoutes` to `@angular/compiler-cli/ngtools2.ts` for getting
the lazy routes of a `ng.Program`.
PR Close #19836
2017-10-23 18:46:04 -04:00
Alex Eagle
5da96c75a2 fix(bazel): don't console.error from the compile helper (#19879)
This lets other callers of compile() choose different formatting for the diagnostics

PR Close #19879
2017-10-23 16:56:57 -04:00
Alex Rickabaugh
90d1423fb4 fix(service-worker): include versionedFiles in the manifest hashTable (#19837)
There is no difference in runtime (yet) between versioned and unversioned
files. Theoretically, the SW does not have to cache-bust versioned files,
but the SW doesn't cache bust files on the first request anyway, so in the
common case it doesn't matter. If the hash doesn't match, the SW will cache
bust the file to be sure, which is technically unnecessary, but since the
file itself is versioned, the likelihood of this happening is rare.

This fixes a critical bug where versioned files were erroneously not included
in the hashTable in the generated manifest. This could lead to applications
not updating if only versioned files changed in between versions.

PR Close #19837
2017-10-23 15:11:38 -04:00
Filipe Silva
14380ff086 build: add warning about changing ngtools_api2 2017-10-20 09:39:30 -07:00
Tobias Bosch
b922743f6e build: narrow TS version to >=2.4.2 and <2.5 (#19787)
As this is the only version range that we tested against in G3.
We will support newer versions of TypeScript soon 
after the Angular 5 release.

Closes #19750

PR Close #19787
2017-10-18 11:20:23 -07:00
Alex Rickabaugh
04ab9f1917 fix(common): attempt to JSON.parse errors for JSON responses (#19773)
PR Close #19773
2017-10-18 11:18:58 -07:00
Chuck Jazdzewski
25cbc98979 fix(compiler-cli): do not add references to files outside of rootDir (#19770)
References to resources (such as .css files) that are generated into
the `outDir` directory outside of `rootDir` would cause a spurious
compiler error about not being able to find a files that ends in
'.ngstyle.ts'.

Also fixed a minor issue in compiler error reporting

Fixes: #19765, #19767

PR Close #19770
2017-10-18 11:18:50 -07:00
Alex Rickabaugh
3bcf0cf472 fix(service-worker): PushEvent.data has to be decoded (#19764)
PushEvent.data is not the data object itself, but an instance representing
the data in wire format, with methods to synchronously decode it to JSON,
ArrayBuffer, etc. NGSW assumes all push data is in JSON format.

PR Close #19764
2017-10-18 11:18:34 -07:00
Alex Rickabaugh
396c2417d9 fix(service-worker): freshness strategy should clone response for cache (#19764)
When Cache.put() is called with a Response, it consumes the response. If
the Response is used for any other purpose (such as satisfying the
original FetchEvent) it must be cloned first.

A bug exists in the mocks used for SW tests, where this condition is not
validated. The bodies of MockResponses can be utilized repeatedly without
erroring in the same way that a real browser would. This bug is fixed by
this commit, which causes tests for the freshness strategy of data caching
to start failing.

The cause of this failure is a second bug in the data caching code, where
the Response is not cloned prior to being passed to Cache.put(). This is
also fixed.

PR Close #19764
2017-10-18 11:18:34 -07:00
Alex Eagle
56774dfb79 fix(compiler-cli): diagnostics file paths relative to cwd, not tsconfig (#19748)
PR Close #19748
2017-10-18 11:18:17 -07:00
Matias Niemelä
c0cc6eeca1 test(animations): ensure :enter callbacks fire on container insertion (#19674)
PR Close #19674
2017-10-18 11:18:08 -07:00
vsavkin
6f2939da62 fix(router): RouterLinkActive should update its state right after checking the children (#19449)
Closes #18983

PR Close #19449
2017-10-18 11:17:55 -07:00
Jason Aden
7d1abd9adb build: update to rxjs@5.5.0 (#19345)
PR Close #19345
2017-10-18 11:17:43 -07:00
Tobias Bosch
b0c7ea8181 Revert "fix(router): RouterLinkActive should update its state right after checking the children (#19449)"
This reverts commit c569b7524974200040c2abae6923cd4e6f59a13b.
As it was synched together with 5a9ed2de272912ac74ed56bfec4bdf4551f7b38e
which broke an internal test.
2017-10-18 09:58:41 -07:00
Tobias Bosch
30ecb6e88a Revert "test(animations): ensure :enter callbacks fire on container insertion (#19674)"
This reverts commit 41f57affb6ae0688ed4b6e4704bc8cf2201bc01a.
As it was synched together with 5a9ed2de272912ac74ed56bfec4bdf4551f7b38e
which broke an internal test.
2017-10-18 09:57:56 -07:00
Tobias Bosch
8d735da5d8 Revert "fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)"
This reverts commit 5a9ed2de272912ac74ed56bfec4bdf4551f7b38e.
As it broke an internal test.
2017-10-18 09:56:59 -07:00
Matias Niemelä
5a9ed2de27 fix(animations): always fire inner trigger callbacks even if blocked by parent animations (#19753)
Closes #19100

PR Close #19753
2017-10-17 20:57:57 -07:00
Matias Niemelä
41f57affb6 test(animations): ensure :enter callbacks fire on container insertion (#19674)
PR Close #19674
2017-10-17 20:57:48 -07:00
vsavkin
c569b75249 fix(router): RouterLinkActive should update its state right after checking the children (#19449)
Closes #18983

PR Close #19449
2017-10-17 20:57:30 -07:00
Tobias Bosch
ad130d62d8 fix(compiler): add first bazel test for ng_module (#19703)
We were missing quite a bit of test coverage,
this is the start of recreating it.
PR Close #19703
2017-10-17 15:18:31 -07:00
Vohmyanin Sergey Vasilevich
621f87b2bd fix(service-worker): use posix path resolution for generation of ngsw.json (#19527)
PR Close #19527
2017-10-17 15:18:17 -07:00
Trotyl
15a8429b96 fix(service-worker): add missing annotation for SwPush (#19721)
PR Close #19721
2017-10-17 10:38:45 -07:00
Chuck Jazdzewski
60bdcd6f5f fix(compiler): generate correct imports for type check blocks (#19582)
Fixes: #19485

PR Close #19582
2017-10-17 10:37:55 -07:00
Matias Niemelä
d035175cdb fix(animations): ensure inner :leave animations do not remove node when skipped (#19532) (#19693)
PR Close #19693
2017-10-16 11:13:58 -07:00
Matias Niemelä
f42d317d2f fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532) (#19693)
PR Close #19693
2017-10-16 11:13:58 -07:00
Vikram Subramanian
405ccc7195 fix(bazel): fix the output directory for extractor to be genfiles/ instead of bin/ (#19716)
PR Close #19716
2017-10-13 17:31:10 -07:00
Vikram Subramanian
836c889baa fix(compiler): prepare for future Bazel semantics of += (#19717)
This is a local mod that was already applied in G3.

PR Close #19717
2017-10-13 16:29:46 -07:00
Casey Schroeder
e81d1fc361 docs(animations): add missing bracket to fadeAnimation
Closes #18899
2017-10-13 09:12:36 -07:00
Tobias Bosch
02394d2d80 fix(core): don't refer to hydration in docs anymore.
Closes #18458
2017-10-13 08:53:44 -07:00
Tobias Bosch
653a211743 Revert "Revert "Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)"""
This reverts commit 6b7cead0c526e2ca87b0e90b084da6bb8ae5ac1e.
2017-10-12 16:09:49 -07:00
Chuck Jazdzewski
6b7cead0c5 Revert "Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)""
This reverts commit 94a925a1b029a5f5e3f342583decb55c7a8fe47f.
2017-10-12 10:32:21 -07:00
Chuck Jazdzewski
94a925a1b0 Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)"
This reverts commit a22121d65dbc08ca624c94cde67413f4e1d036f1.
2017-10-12 10:26:53 -07:00
Tobias Bosch
a22121d65d perf(compiler): skip type check and emit in bazel in some cases. (#19646)
If no user files changed:
- only type check the changed generated files

Never emit non changed generated files
- we still calculate them, but don’t send them through
  TypeScript to emit them but cache the written files instead.
PR Close #19646
2017-10-11 15:54:02 -07:00
Chuck Jazdzewski
46992b4bda Revert "fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532)"
This reverts commit 9130505b57c10dc6f4cd9b12ca47e06c4f429b74.
2017-10-11 10:51:52 -07:00
Chuck Jazdzewski
d0af45c31a Revert "fix(animations): ensure inner :leave animations do not remove node when skipped (#19532)"
This reverts commit ac50bd678ee37c4b222baccc8412cc153a1d5a20.
2017-10-11 10:37:12 -07:00
Tobias Bosch
b0befd7376 fix(compiler): TestBed.overrideProvider should keep imported NgModules eager (#19624)
Before, as soon as a user called `TestBed.overrideProvider` for a provider
of a `NgModule` that was imported via `TestBed.configureTestingModule`,
that `NgModule` became lazy.

This commit changes this behavior to keep the `NgModule` eager,
with or without a call to `TestBed.overrideProvider`.

PR Close #19624
2017-10-10 13:51:25 -07:00
Matias Niemelä
ac50bd678e fix(animations): ensure inner :leave animations do not remove node when skipped (#19532)
PR Close #19532
2017-10-10 12:41:47 -07:00
Matias Niemelä
9130505b57 fix(animations): ensure animateChild() works with all inner leave animations (#19006) (#19532)
Closes #18305

PR Close #19532
2017-10-10 12:41:47 -07:00
Tobias Bosch
931cf78057 refactor(compiler): introduce TestBed.deprecatedOverrideProvider (#19558)
This allows use to fix `TestBed.overrideProvider` to keep imported `NgModule`s eager,
while allowing our users to still keep the old semantics until they have fixed their
tests.

PR Close #19558
2017-10-10 10:15:46 -07:00
Tobias Bosch
6ade68cff1 fix(compiler): correctly instantiate eager providers that are used via Injector.get (#19558)
Closes #15501

PR Close #19558
2017-10-10 10:15:46 -07:00
Tobias Bosch
d30ce19231 fix(compiler): correctly calculate the out path on windows (#19601)
Fixes #19543
PR Close #19601
2017-10-10 10:15:06 -07:00