8954 Commits

Author SHA1 Message Date
Alex Rickabaugh
6fa0929f3f release: cut the 5.0.0-rc.1 release 2017-10-05 18:10:01 -07:00
Alex Rickabaugh
f10f8db5fb fix(service-worker): several misc fixes for corner cases
This commit fixes several issues discovered through use in real apps.

* The sha1() function operated on text content, causing issues for binary-format files.
  A sha1Binary() function which operates on unparsed data now avoids any encoding issues.
* The characters '?' and '+' were not escaped in Glob-to-regex conversion previously, but
  are now.
* URLs from the browser contain the full origin, but were checked against the table of
  hashes from the manifest which only has the path for URLs from the same origin. Now the
  origin is checked and URLs are relativized to the domain root before comparison if
  appropriate.
* ngsw: prefix was missing from data groups, is now added.
* Occasionally servers will return a redirected response for an asset, and caching it could
  cause errors for navigation requests. The SW now handles this by detecting such responses
  and following the redirect manually, to avoid caching a redirected response.
* The request for known assets is now created from scratch from the URL before fetching from
  the network, in order to sanitize it and avoid carrying any special modes or headers that
  might result in opaque responses.
* Debugging log for troubleshooting.
* Avoid creating errors by returning 504 responses on error.
* Fix bug where idle queue doesn't run in some circumstances.
* Add tests for the above.
2017-10-05 13:27:31 -07:00
Alex Rickabaugh
b804d4bde5 Revert "fix(platform-browser): support customEqualityTesters when overriding Jasmine toEqual"
This reverts commit f580ffab4f004b5d3297d693429e0a5d1dd4345a.

Reason: broke a few existing tests.
2017-10-05 13:20:00 -07:00
Tobias Bosch
01f711281c fix(compiler): don’t use ng:// in AOT source maps, and never point to the original source file
This is important to not confuse users nor downstream tools that
consume our source maps. For generated content for which we don’t
have an original source file, we use the generated file now.

Fixes #19538
2017-10-04 16:20:55 -07:00
Tobias Bosch
5b5108363d refactor(compiler): remove stale metadata classes for animations
These are no longer needed as animations are a purely
runtime concept.
2017-10-04 16:20:55 -07:00
Daniel Karp
c80e02b881 docs(aio): document Custom Async validators
docs(aio): Custom Async validators edits

incorporating suggestions from kapunahelewong
2017-10-04 15:07:46 -07:00
Vikram Subramanian
fbc9537952 perf(compiler): fix perf issue in loading aot summaries in jit compiler
The current `flattenSummaries` function re-process the same NgModule
summary even if it has been processed before. Certain modules like
CommonModule are repeated multiple times in the module tree and it is
expanded out every time.

This was making unit tests using AOT summaries really slow. This will
also slow down JIT bootstrap applications that load AOT summaries for
component libraries.

The fix is to remember which summaries were seen before and not to
process them again.
2017-10-04 15:04:23 -07:00
Vikram Subramanian
f580ffab4f fix(platform-browser): support customEqualityTesters when overriding Jasmine toEqual 2017-10-04 15:00:58 -07:00
Tobias Bosch
696af79dc7 fix(compiler): properly work on windows
Verified manually on a windows surface tablet.

Fixes #19492
2017-10-04 14:58:08 -07:00
Victor Berchet
0833b59aab refactor(core): add a checkIndex to the compiler view nodes
Each node now has two index: nodeIndex and checkIndex.

nodeIndex is the index in both the view definition and the view data.
checkIndex is the index in in the update function (update directives and update
renderer).

While nodeIndex and checkIndex have the same value for now, having both of them
will allow changing the structure of view definition after compilation (ie for
runtime translations).
2017-10-04 14:55:54 -07:00
Tobias Bosch
caa51950e8 fix(compiler): only don’t emit already emitted files in incremental compilation 2017-10-04 14:55:21 -07:00
Chuck Jazdzewski
f3f4c3d835 fix(compiler): disallow references for select and index evaluation
Also fixes an issue where enum values of 0 or '``' where not treated
correctly.

Fixes: #18170
2017-10-04 14:54:39 -07:00
George Kalpakas
9ae3742565 docs(aio): fix typo in preview server config file comment 2017-10-04 12:40:28 -07:00
Trotyl Yu
0f432994b8 docs(aio): document the special treatment of undefined 2017-10-04 12:40:12 -07:00
Kapunahele Wong
d4d9009696 docs(aio): fix broken link in toh-pt5 2017-10-04 12:39:41 -07:00
Tobias Bosch
7c5ecb5b5c fix(compiler): also count generated files to determine whether to use single file emit 2017-10-03 09:57:12 -07:00
Tobias Bosch
1058b2a778 fix(compiler): always emit summaries for jit with ng_module bazel rule. 2017-10-03 09:57:12 -07:00
Tobias Bosch
c4129137e7 fix(compiler): set emitSkipped to false for incremental compilation 2017-10-03 09:57:12 -07:00
Adrien Crivelli
e3a4ecef35 docs(aio): Fix incorrect wording 2017-10-03 08:15:45 -07:00
Peter Bacon Darwin
9783c92935 build(aio): fix various API rendering issues
Upgrading to dgeni-packages 0.21.4 gives us
access to more properties on the API docs, which
allows us to fix the following issues:

Closes #19450
Closes #19452
Closes #19456
2017-10-03 08:15:02 -07:00
Maxim Salnikov
7cecaf2a4f docs(aio): add ngVikings to the events page 2017-10-03 08:07:53 -07:00
George Kalpakas
eef7d8aa11 fix(upgrade): call ngOnInit() after ngOnChanges() (on components with inputs)
Fixes #18913
2017-10-02 16:01:07 -07:00
George Kalpakas
617b3d2ba5 fix(upgrade): correctly run change detection when propagateDigest is false 2017-10-02 16:01:07 -07:00
George Kalpakas
546eb7d851 test(upgrade): ensure AngularJS is bootstraped inside the Angular zone in tests 2017-10-02 16:01:07 -07:00
George Kalpakas
29dbc3b67c refactor(upgrade): remove redundant call to appRef.detach()
Once  a `ViewRef` is attached to the `ApplicationRef`, destroying the corresponding `ComponentRef` will automatically detach the `ViewRef`.
2017-10-02 16:01:07 -07:00
George Kalpakas
4e6aa9c2db fix(upgrade): ensure downgraded components are destroyed in the Angular zone 2017-10-02 16:01:07 -07:00
Tobias Bosch
745b59f49c perf(compiler): only emit changed files for incremental compilation
For now, we always create all generated files, but diff them
before we pass them to TypeScript.

For the user files, we compare the programs and only emit changed
TypeScript files.

This also adds more diagnostic messages if the `—diagnostics` flag
is passed to the command line.
2017-10-02 08:24:50 -07:00
Tobias Bosch
b0868915ae perf(compiler): don’t emit summaries for jit by default
This re-adds the flag `enableSummariesForJit` to the compiler options
that already existed in Angular 4.
2017-10-02 08:24:50 -07:00
Tobias Bosch
0038712474 fix(compiler): add typings for COMPILED.
Note: This commit has to be synced into G3 again.
2017-09-29 09:26:38 -07:00
Tobias Bosch
db74f44a97 fix: don’t rely on goog.DEBUG but on COMPILED instead
`good.DEBUG` can also be true when using advanced compilation.

Attention: This change has be applied in G3 already as a local mod!
2017-09-29 09:26:38 -07:00
Victor Berchet
30d5a2ca83 docs: add changelog for 5.0.0-rc.0 2017-09-28 16:29:39 -07:00
Victor Berchet
6d3487f1c1 release: cut the 5.0.0-rc.0 release 2017-09-28 16:26:00 -07:00
Alex Rickabaugh
d442b6855f feat(service-worker): introduce the @angular/service-worker package (#19274)
This service worker is a conceptual derivative of the existing @angular/service-worker maintained at github.com/angular/mobile-toolkit, but has been rewritten to support use across a much wider variety of applications.

Entrypoints include:

@angular/service-worker: a library for use within Angular client apps to communicate with the service worker.
@angular/service-worker/gen: a library for generating ngsw.json files from glob-based SW config files.
@angular/service-worker/ngsw-worker.js: the bundled service worker script itself.
@angular/service-worker/ngsw-cli.js: a CLI tool for generating ngsw.json files from glob-based SW config files.
2017-09-28 16:18:12 -07:00
Tobias Bosch
7c1d3e0f5a fix(compiler): make watch mode work with declaration: false
closes #19464
2017-09-28 14:21:05 -07:00
Tobias Bosch
2f6ae527d1 fix(compiler): make sure our out path calculation is correct 2017-09-28 14:20:20 -07:00
Tobias Bosch
ec2be5dccb fix(compiler): allow to use flat modules and summaries
The combination of flat modules, flat module redirects and summaries
lead to errors before.
2017-09-28 14:20:20 -07:00
Victor Berchet
14e8e88022 Revert "refactor(core): Change abstract get to readonly (#19226)"
This reverts commit 3aa3d5c5480cb8f0c1be61902aa15ce6a424c2eb.
2017-09-28 13:36:56 -07:00
Victor Berchet
6a9ce67714 Revert "refactor(core): Removed readonly getters and changed to readonly (#19225)"
This reverts commit 2b84b86fc08a4ecb3078bd8b3a1bfc7b07946b20.
2017-09-28 13:36:44 -07:00
Victor Berchet
bed8ac70f7 docs: add changelog for 4.4.4 2017-09-28 12:19:21 -07:00
Victor Savkin
a9d32a3f89 fix(router): resolve and guards should be able to reject with null and undefined (#19418)
Closes #17148
2017-09-28 11:06:08 -07:00
Chuck Jazdzewski
ff5b050a92 fix(compiler): correctly map error message locations (#19424) 2017-09-28 10:53:04 -07:00
Chuck Jazdzewski
b3db3f80ba fix(compiler): do not consider a reference with members as a reference (#19454)
Fixes: #18170
2017-09-28 10:52:52 -07:00
tinayuangao
2b84b86fc0 refactor(core): Removed readonly getters and changed to readonly (#19225)
variables
2017-09-28 09:36:29 -07:00
tinayuangao
3aa3d5c548 refactor(core): Change abstract get to readonly (#19226) 2017-09-28 09:36:13 -07:00
Matias Niemelä
2d2300e118 docs(animations): document usage of negative limit values for query (#19451) 2017-09-28 09:34:36 -07:00
Chuck Jazdzewski
f24ea59f74 fix(compiler-cli): don't rewrite imports when annotating for closure (#19444)
Closure no longer needs to have the imports rewritten avoid rewriting
as this can cause issues when the source directory structure differs
from what is deployed.

Fixes: #19026
2017-09-28 09:31:28 -07:00
Chuck Jazdzewski
c1b029a413 fix(language-service): do not report errors for OpaqueToken (#19427)
`OpaqueToken` was removed from angular but the language-service
should not report errors when it is used for older versions of
angular.
2017-09-28 09:30:34 -07:00
Alex Eagle
82e49230ff build: Give names to the AMD modules nested in Angular UMD distro (#19425) 2017-09-28 09:29:22 -07:00
George Kalpakas
f7199aa8c8 build(aio): remove -- from more yarn commands (#19421) 2017-09-28 09:29:04 -07:00
George Kalpakas
0e00265647 build(aio): disable cache when building a new docker image for the preview server (#19391) 2017-09-28 09:28:54 -07:00