1121 Commits

Author SHA1 Message Date
George Kalpakas
d8b63d0b83 build(compiler-cli): upgrade chokidar to latest version
This is a backport of 745c9c5 to 5.2.x.
Related to #28771.
2019-02-28 18:29:19 +02:00
Pete Bacon Darwin
a065dc24cd fix(compiler): remove bogus lines
These seem to have been added by mistake in
408d8cb735085bec4dcfab17bcf17b66368b98f2
2018-08-31 09:52:13 -07:00
Alex Rickabaugh
408d8cb735 build: release script should release v5-lts 2018-05-16 15:00:55 -07:00
George Kalpakas
bc27d4aae4 fix(service-worker): correctly handle requests with empty clientId (#23625)
Requests from clients that are not assigned a client ID by the browser
will produce `fetch` events with `null` or empty (`''`) `clientId`s.

Previously, the ServiceWorker only handled `null` values correctly. Yet
empty strings are also valid (see for example [here][1] and [there][2]).
With this commit, the SW will interpret _all_ falsy `clientId` values
the same (i.e. "no client ID assigned") and handle them appropriately.

Related Chromium issue/discussion: [#832105][3]

[1]: 4cc72bd0f1/docs/index.bs (L1392)
[2]: https://w3c.github.io/ServiceWorker/#fetchevent-interface
[3]: https://bugs.chromium.org/p/chromium/issues/detail?id=832105

Fixes #23526

PR Close #23625
2018-05-15 12:11:51 -07:00
George Kalpakas
3df879fe17 test(service-worker): support mock requests with null/empty client ID (#23625)
PR Close #23625
2018-05-15 12:11:51 -07:00
George Kalpakas
b004be5169 test(service-worker): improve adding clients in SwTestHarness (#23625)
This commits changes how clients are added in `SwTestHarness`, so that
the behavior in tests closer mimics what would happen in an actual
ServiceWorker.
It also removes auto-adding clients when calling `clients.get()`, which
could hide bugs related to non-existing clients.

PR Close #23625
2018-05-15 12:11:51 -07:00
HiveSolution
7b23983859 fix(service-worker): add badge to NOTIFICATION_OPTION_NAMES (#23241)
Add badge to NOTIFICATION_OPTION_NAMES to support custom notification badge/icon.
Fixes #23196
PR Close #23241
2018-04-15 23:23:38 -07:00
Rafael
21f3301746 refactor: ensure all 'TODO's are consistent (#23252)
PR Close #23252
2018-04-13 13:12:00 -07:00
Camilo Giraldo
a1133303d3 refactor(language-service): fix typo on type.ts language-service 2018-04-13 00:08:54 -07:00
Nathan Friend
af3b308e63 docs(upgrade): fix detail regarding bootstrapping order (#23225) (#23270)
Clarify that Angular should be bootstrapped before AngularJS.

Closes angular/angular#23225

PR Close #23270
2018-04-12 23:16:18 -07:00
paulmojicatech
bda6908484 docs(core): update directives documentation (#23255)
fix(release): wrong input names in bank-account component

Directive example has errors #22382

PR Close #23255
2018-04-09 15:19:11 -07:00
Pawel Kozlowski
3900c36b1c refactor(common): simplify NgClass code, add comments (#21937)
PR Close #21937
2018-04-04 09:41:18 -07:00
Pawel Kozlowski
54e910841e fix(common): properly take className changes into account (#21937)
Fixes #21932

PR Close #21937
2018-04-04 09:41:18 -07:00
Steven Liekens
9703079e0b test(router): fix typo in expectation (#23137)
PR Close #23137
2018-04-04 08:22:05 -07:00
Dirk Luijk
dd615950d5 fix(forms): improve error message for invalid value accessors (#22731)
Signed-off-by: Dirk Luijk <mail@dirkluijk.nl>

PR Close #22731
2018-04-04 08:20:56 -07:00
Jason Bedard
ae76eeca6a fix(upgrade): propagate return value of resumeBootstrap (#22754)
Fixes #22723

PR Close #22754
2018-04-02 14:20:59 -07:00
Shannon Dunn
f43fba64cc fix(upgrade): correctly handle downgraded OnPush components (#22209)
Fixes #14286

PR Close #22209
2018-04-02 14:12:46 -07:00
Victor Berchet
4f7c369847 fix(compiler): fix support for html-like text in translatable attributes (#23053)
PR Close #23053
2018-03-29 08:58:29 -07:00
George Kalpakas
0d4fe38a09 fix(service-worker): ignore invalid only-if-cached requests (#22883)
Under some circumstances (possibly related to opening Chrome DevTools),
requests are made with `cache: 'only-if-cached'` and `mode: 'no-cors'`.
These request will eventually fail, because `only-if-cached` is only
allowed to be used with `mode: 'same-origin'`.
This is likely a bug in Chrome DevTools.

This commit avoids errors related to such requests by not handling them.

Fixes #22362

PR Close #22883
2018-03-28 10:02:18 -07:00
George Kalpakas
ae9c25ff3d fix(service-worker): do not enter degraded mode when offline (#22883)
Previously, when trying to fetch `ngsw.json` (e.g. during
`checkForUpdate()`) while either the client or the server were offline,
the ServiceWorker would enter a degrade mode, where only existing
clients would be served. This essentially meant that the ServiceWorker
didn't work offline.
This commit fixes it by differentiating offline errors and not entering
degraded mode. The ServiceWorker will remain in the current mode until
connectivity to the server is restored.

Fixes #21636

PR Close #22883
2018-03-28 10:02:18 -07:00
George Kalpakas
d0f575bc54 test(service-worker): minor test fixes and refactorings (#22883)
PR Close #22883
2018-03-28 10:02:18 -07:00
George Kalpakas
d7f4aa6936 docs(common): add HttpParamsOptions to the public API (#20332)
Fixes #20276

PR Close #20332
2018-03-23 16:31:11 -04:00
Matias Niemelä
641cc493ff fix(animations): avoid animation insertions during router back/refresh (#21977)
Closes #19712

PR Close #21977
2018-03-22 17:59:41 -04:00
adasilva
65f8943aab fix(service-worker): fix LruList bugs (#22769)
'remove' method not removing url from state.map
'accessed' method not removing 'previous' reference from existing  node when it becomes the head

Fixes #22218
Fixes #22768

PR Close #22769
2018-03-21 13:11:27 -07:00
Domas Trijonis
5391f96406 fix(upgrade): two-way binding and listening for event (#22772)
Changes would not propagate to a value in downgraded component in case you had two-way binding and listening to a value-change, e.g. [(value)]="value" (value-change)="fetch()"

Closes #22734

PR Close #22772
2018-03-19 22:44:36 -05:00
Chuck Jazdzewski
db0afa9394 fix(compiler-cli): emit correct css string escape sequences (#22776)
Works around an issue with TypeScript 2.6 and 2.7 that causes
the tranformer emit to emit incorrect escapes for css string
literals.

Fixes: #22774

PR Close #22776
2018-03-15 11:37:51 -07:00
Adam Plumer
fc6dfc2e08 fix(platform-server): add styles to elements correctly (#22527)
* Partially reverts #22263 due to lack of total spec compliance
  on the server
* Maintains the camel-case styles fix

PR Close #22527
2018-03-14 14:12:32 -07:00
Jason Aden
86517f2ad5 fix(router): correct over-encoding of URL fragment (#22687)
Relates to: #10280 #22337

PR Close #22687
2018-03-11 22:15:02 -07:00
Jason Aden
789a47ec44 fix(router): fix URL serialization so special characters are only encoded where needed (#22337)
This change brings Angular largely in line with how AngularJS previously serialized URLs. This is based on RFC 3986 and resolves issues such as the above #10280 where URLs could be parsed, re-serialized, then parsed again producing a different result on the second parsing.

Adjustments to be aware of in this commit:

* URI fragments will now serialize the same as query strings
* In the URI path or segments (portion prior to query string and/or fragment), the plus sign (`+`) and ampersand (`&`) will appear decoded
* In the URL path or segments, parentheses values (`(` and `)`) will now appear percent encoded as `%28` and `%29` respectively
* In the URL path or segments, semicolons will be encoded in their percent encoding `%3B`

NOTE: Parentheses and semicolons denoting auxillary routes or matrix params will still appear in their decoded form -- only parentheses and semicolons used as values in a segment or key/value pair for matrix params will be encoded.

While these changes are not considered breaking because applications should be decoding URLs and key/value pairs, it is possible that some unit tests will break if comparing hard-coded URLs in tests since that hard coded string will represent the old encoding. Therefore we are releasing this fix in the upcoming Angular v6 rather than adding it to a patch for v5.

Fixes: #10280

PR Close #22337
2018-03-06 06:58:08 -08:00
Alex Eagle
a3f7e30153 build: update to latest bazel rules (#22558)
PR Close #22558
2018-03-02 13:28:01 -08:00
Rado Kirov
fe0d53f3a9 build: Add support for bazelOptions.maxCacheSizeMb in ngc-wrapped. (#22511)
PR Close #22511
2018-03-01 08:41:11 -08:00
George Kalpakas
4aef9de37e fix(upgrade): correctly destroy nested downgraded component (#22400)
Previously, when a downgraded component was destroyed in a way that did
not trigger the `$destroy` event on the element (e.g. when a parent
element was removed from the DOM by Angular, not AngularJS), the
`ComponentRef` was not destroyed and unregistered.
This commit fixes it by listening for the `$destroy` event on both the
element and the scope.

Fixes #22392

PR Close #22400
2018-02-27 18:41:03 -08:00
Adam Plumer
de02a7a5de fix(platform-server): generate correct stylings for camel case names (#22263)
* Add correct mapping from camel case to kebab case for CSS style
names
* Remove internal CSS methods in favor of native Domino APIs

Fixes #19235

PR Close #22263
2018-02-26 17:46:21 -08:00
George Kalpakas
a9a0e27e94 fix(upgrade): fix empty transclusion content with AngularJS@>=1.5.8 (#22167)
The function provided by `ngUpgrade` as `parentBoundTranscludeFn` when
upgrading a component with transclusion, will break in AngularJS v1.5.8+
if no transclusion content is provided. The reason is that AngularJS
will try to destroy the transclusion scope (which would not be needed
any more). But since the transcluded content comes from Angular, not
AngularJS, there is no transclusion scope to destroy.
This commit fixes it by providing a dummy scope object with a no-op
`$destroy()` method.

Fixes #22175

PR Close #22167
2018-02-25 10:06:14 -08:00
George Kalpakas
66383901a6 fix(upgrade): correctly handle = bindings in @angular/upgrade (#22167)
Previously, having a `=` binding on an upgraded components would result
in setting the corresponding property to an EventEmitter function. This
should only happen for `&` bindings.
This commit rstrores the correct behavior.

Note:
The issue was only present in the dynamic version of `ngUpgrade`. The
static version worked as expected.
The error did not show up in tests, because in AngularJS v1.5.x a
function would be serialized to an empty string in interpolations, thus
making them indistinguishable from uninitialized properties (in the
view). The serialization behavior changed in AngularJS v1.6.x, making
the errors visible.

PR Close #22167
2018-02-25 10:06:14 -08:00
George Kalpakas
1eb54132e4 test(upgrade): run tests against multiple AngularJS versions (#22167)
Fixes #19332

PR Close #22167
2018-02-25 10:06:14 -08:00
George Kalpakas
6c9c173e1e refactor(upgrade): use correct paths for imports (#22167)
`packages/upgrade/static/src` is anymlink to `packages/upgrade/src`.
Still, using the correct paths (e.g. using
`@angular/upgrade/static/src/...` for `@angula/upgrade/static` specs
ensures that the module loader (e.g. SystemJS) can map the imports to
the same instances.

PR Close #22167
2018-02-25 10:06:14 -08:00
George Kalpakas
1e08a945e1 test(platform-browser): remove stray debugger statement (#22167)
PR Close #22167
2018-02-25 10:06:14 -08:00
Jason Aden
8f0a0641e2 fix(router): don't mutate route configs (#22358)
Fixes #22203

PR Close #22358
2018-02-22 13:35:38 -08:00
Martin Probst
9cca5a8c9c build: allow passing node options to ngc. (#22245)
PR Close #22245
2018-02-22 10:23:54 -08:00
Victor Berchet
6460ac0add
Revert "feat(platform-browser): fix #19604, can config hammerOptions (#21979)"
This reverts commit fdbfd21bcdae775bb6fbaa6e407998f796fd2613.
2018-02-21 16:45:09 -08:00
Trotyl
ee91de9d5a feat(core): support metadata reflection for native class types (#22356)
closes #21731

PR Close #22356
2018-02-21 16:09:27 -08:00
Trotyl
5ec38f2f47 fix(core): properly handle function without prototype in reflector (#22284)
closes #19978

PR Close #22284
2018-02-21 14:52:05 -08:00
Ricardo M
c2f78e1ca3 docs(http): fix a typo in code comment (#22327)
PR Close #22327
2018-02-21 11:06:06 -08:00
Alex Eagle
5bdb3acace build: update tsickle dep from compiler-cli (#22295)
PR Close #22295
2018-02-20 15:40:45 -08:00
Alex Eagle
c5418c7abe fix(compiler-cli): add missing entry point to package, update tsickle (#22295)
PR Close #22295
2018-02-20 15:40:45 -08:00
Frederik Prijck
a346d28df6 test(language-service): fix minor typos (#21372)
PR Close #21372
2018-02-20 10:08:55 -08:00
Victor Berchet
bf07837d5d test(common): fix ngIf tests
The failing test was ported for the master branch which ignores whitespaces
2018-02-18 20:12:47 -08:00
Victor Berchet
cdfedc1e49 fix(common): fix merge error in ng_if.ts 2018-02-18 19:51:15 -08:00
Victor Berchet
af6a0563de fix(common): then and else template might be set to null (#22298)
PR Close #22298
2018-02-18 19:28:36 -08:00