1772 Commits

Author SHA1 Message Date
Matias Niemelä
816bc8af17 feat(ivy): support injectable sanitization service ()
PR Close 
2018-05-11 16:43:43 -04:00
Matias Niemelä
d2a86872a9 fix(animations): do not throw errors when a destroyed component is animated ()
PR Close 
2018-05-11 16:08:14 -04:00
Andrew Seguin
b1cda3639f fix(elements): always check to create strategy ()
PR Close 
2018-05-10 16:07:11 -07:00
swseverance
fe3679a356 style: remove empty comments ()
PR Close 
2018-05-10 15:48:13 -07:00
Zaven Muradyan
89f64e58c3 fix(router): avoid freezing queryParams in-place ()
The recognizer code used to call Object.freeze() on queryParams before
using them to construct ActivatedRoutes, with the intent being to help
avoid common invalid usage. Unfortunately, Object.freeze() works
in-place, so this was also freezing the queryParams on the actual
UrlTree object, making it more difficult to manipulate UrlTrees in
things like UrlHandlingStrategy.

This change simply shallow-copies the queryParams before freezing them.

Fixes 

PR Close 
2018-05-10 07:54:11 -07:00
Jason Aden
553a680817 fix(router): correct the segment parsing so it won't break on ampersand ()
PR Close 
2018-05-10 07:53:53 -07:00
George Kalpakas
f1e4a153f0 refactor(service-worker): sort manifest url/hashTable entries ()
This makes it easier to quickly check whether a specific file ended up
in the manifest, for example when debugging.

PR Close 
2018-05-09 11:51:22 -07:00
George Kalpakas
e0ed59e55f fix(service-worker): correctly handle requests with empty clientId ()
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: [][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 

PR Close 
2018-05-09 11:50:02 -07:00
George Kalpakas
d6b1466c81 test(service-worker): support mock requests with null/empty client ID ()
PR Close 
2018-05-09 11:50:02 -07:00
George Kalpakas
d1abf4e897 test(service-worker): improve adding clients in SwTestHarness ()
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 
2018-05-09 11:50:02 -07:00
Victor Berchet
08e7efc69e feat(ivy): add error reporting to the html to ivy transformer ()
PR Close 
2018-05-09 11:49:18 -07:00
Victor Berchet
46674d5fac test(ivy): add html to ivy ast transformer tests ()
PR Close 
2018-05-09 11:49:18 -07:00
Alex Rickabaugh
b0eca85e51 refactor(compiler): compile{Component,Directive} take only local information ()
Previously, the compileComponent() and compileDirective() APIs still required
the output of global analysis, even though they only read local information
from that output.

With this refactor, compileComponent() and compileDirective() now define
their inputs explicitly, with the new interfaces R3ComponentMetadata and
R3DirectiveMetadata. compileComponentGlobal() and compileDirectiveGlobal()
are introduced and convert from global analysis output into the new metadata
format.

This refactor also splits out the view compiler into separate files as
r3_view_compiler_local.ts was getting unwieldy.

Finally, this refactor also splits out generation of DI factory functions
into a separate r3_factory utility as the logic is utilized between different
compilers.

PR Close 
2018-05-08 13:57:20 -07:00
Alex Rickabaugh
fc034270ce fix(core): call ngOnDestroy on all services that have it ()
Previously, ngOnDestroy was only called on services which were statically
determined to have ngOnDestroy methods. In some cases, such as with services
instantiated via factory functions, it's not statically known that the service
has an ngOnDestroy method.

This commit changes the runtime to look for ngOnDestroy when instantiating
all DI tokens, and to call the method if it's present.

Fixes 
Fixes 
Fixes 

PR Close 
2018-05-08 13:55:29 -07:00
Igor Minar
77ff72f93b Revert "style(animations): fix short param names ()"
This reverts commit e3518967ad705b133ee21eedcf9546b5cb2e817e.

This PR accidentaly introduces a breaking change:
https://github.com/angular/angular/pull/23668#discussion_r186265055
2018-05-05 08:36:49 -07:00
Igor Minar
44095d95c9 Revert "docs(animations): fix content errors ()"
This reverts commit 005dc8f68b9d09f2a4db46bdbfae3e05d3604818.

The PR accidently introduced a breaking change
https://github.com/angular/angular/pull/23668#discussion_r186265055
2018-05-05 08:34:25 -07:00
Pete Bacon Darwin
e3518967ad style(animations): fix short param names ()
PR Close 
2018-05-05 08:17:02 -07:00
Pete Bacon Darwin
005dc8f68b docs(animations): fix content errors ()
PR Close 
2018-05-05 08:17:02 -07:00
Igor Minar
6601d0f7ba build: update to rxjs@6.0.0 ()
PR Close 
2018-05-03 10:53:39 -07:00
Matias Niemelä
65211f46cf fix(animations): retain state styling for nodes that are moved around ()
PR Close 
2018-05-02 16:58:46 -07:00
Matias Niemelä
da9ff255dd fix(animations): properly clean up queried element styles in safari/edge ()
Prior to this patch, if an element is queried and animated for 0 seconds
(just a style() call and nothing else) then the styles applied would not
be properly cleaned up due to their camelCased nature.

PR Close 
2018-05-02 16:58:24 -07:00
Kara Erickson
c5cfc3a1b6 fix(ivy): only generate TViews once per embedded template ()
PR Close 
2018-05-01 10:27:40 -07:00
Misko Hevery
b76f5a6a7d perf(ivy): add performance counters in ngDevMode ()
PR Close 
2018-05-01 10:27:40 -07:00
Victor Berchet
7ef9d4a582 docs(ivy): upddate the status ()
PR Close 
2018-04-27 07:21:16 -07:00
Vikram Subramanian
0c6dc45c85 fix(core): avoid eager providers re-initialization ()
Fix a corner case where eager providers were getting constructed twice if the provider was requested before the initialization of the NgModule is complete.

PR Close 
2018-04-27 07:16:12 -07:00
Igor Minar
5b96078624 Revert "refactor(core): tree-shake application_module providers ()"
This reverts commit eb031c6ff1d416d90d7c89dbeb367f9dc1927564.

The change is breaking targets in g3 see cl/194336387.
2018-04-26 14:08:13 -07:00
Marc Laval
1a44a0b4a8 feat(ivy): support lifecycle hooks of ViewContainerRef ()
PR Close 
2018-04-25 19:02:00 -07:00
Alex Rickabaugh
b1f040f5a2 fix(compiler-cli): don't rely on incompatible TS method ()
g3 and the Angular repo have different versions of TypeScript, and
ts.updateIdentifier() has a different signature in the different versions.
There is no way to write a call to the function that will compile in both
versions simultaneously.

Instead, use ts.getMutableClone() as that has the same effect of cloning
the identifier.

PR Close 
2018-04-25 19:00:55 -07:00
Matias Niemelä
eb031c6ff1 refactor(core): tree-shake application_module providers ()
PR Close 
2018-04-25 15:51:51 -07:00
Alex Eagle
b4c252bcc5 build: serve ivy todo app with real http-server ()
PR Close 
2018-04-25 15:51:18 -07:00
Kara Erickson
db77d8dc92 feat(ivy): support injection flags at runtime ()
PR Close 
2018-04-25 13:26:58 -07:00
Alex Rickabaugh
ab5bc42da0 feat(ivy): first steps towards ngtsc mode ()
This commit adds a new compiler pipeline that isn't dependent on global
analysis, referred to as 'ngtsc'. This new compiler is accessed by
running ngc with "enableIvy" set to "ngtsc". It reuses the same initialization
logic but creates a new implementation of Program which does not perform the
global-level analysis that AngularCompilerProgram does. It will be the
foundation for the production Ivy compiler.

PR Close 
2018-04-25 13:25:33 -07:00
Paul Freedman
811a7f2863 docs(benchpress): fix typo in README () ()
PR Close 
2018-04-24 14:37:03 -07:00
Victor Berchet
9ed5fb6d2c
style: format code 2018-04-24 14:32:57 -07:00
Martin Probst
e1c4930a1a fix(compiler): avoid a crash in ngc-wrapped. ()
`ng.performCompilation` can return an `undefined` program, which is not handled by ngc-wrapped.

Avoid crashing by checking for the error return and returning the diagnostics.
PR Close 
2018-04-24 13:57:03 -07:00
Pawel Kozlowski
b1d03fe70b fix(ivy): properly destroy view trees where root is an embedded view without children ()
The bug fixed here steams from the fact that we are traversing too far up
in the views tree hierarchy in the destroyViewTree function.

The logic in destroyViewTree is off if we start removal at an embedded view
without any child views. For such a case we should just clean up (cleanUpView)
this one view without paying attention to next / parent views.

PR Close 
2018-04-24 11:15:16 -07:00
Olivier Combe
06c0d9666f build(common): mark locales files as side-effect-full ()
Fixes https://github.com/angular/angular-cli/issues/10322
PR Close 
2018-04-24 11:14:52 -07:00
Steven Liekens
4cfa571258 fix(router): cache route handle if found ()
When asking the route reuse strategy to retrieve a detached route handle, store the
return value in a local variable for further processing instead of asking again later.

resolves 

PR Close 
2018-04-23 13:35:59 -07:00
Victor Berchet
ba47997715 style(compiler): fix lint issues ()
PR Close 
2018-04-22 11:49:49 -07:00
Victor Berchet
6761a64522 refactor(compiler): remove a dependency from the IVY AST to the template AST ()
PR Close 
2018-04-20 17:23:02 -07:00
Victor Berchet
0b47902ad7 refactor(ivy): move core code to core.ts ()
PR Close 
2018-04-20 17:23:02 -07:00
Victor Berchet
4662878a1f refactor(compiler): refactor template binding parsing ()
A long time ago Angular used to support both those attribute notations:
- `*attr='binding'`
- `template=`attr: binding`

Because the last notation has been dropped we can refactor the binding parsing.
Source maps will benefit from that as no `attr:` prefix is added artificialy any
more.

PR Close 
2018-04-20 16:07:55 -07:00
Alex Rickabaugh
ca776c59dd fix(compiler): handle undefined annotation metadata ()
In certain cases seen in production, simplify() can returned
undefined when simplifying decorator metadata. This has proven tricky
to reproduce in an isolated test, but the fix is simple and low-risk:
don't attempt to spread an undefined set of annotations in the first
place.

PR Close 
2018-04-19 18:57:22 -07:00
Victor Berchet
9757347e71 feat(ivy): add an IVY local the compiler which avoids analyzeModule ()
closes 

Based on a spike by @chukjaz

PR Close 
2018-04-19 16:32:09 -07:00
Victor Berchet
a19e018439 refactor(ivy): remove the backpatch compiler ()
PR Close 
2018-04-19 16:32:09 -07:00
Victor Berchet
6ff164be0e refactor(compiler): misc minor ()
PR Close 
2018-04-19 16:32:09 -07:00
Victor Berchet
84f024309a refactor(ivy): misc cleanup ()
PR Close 
2018-04-19 16:32:09 -07:00
Victor Berchet
c6b206ee4b feat(compiler): support // ... and // TODO in mock compiler expectations ()
PR Close 
2018-04-19 16:32:09 -07:00
Victor Berchet
1d1e75ee2b Revert "fix(compiler): Pretty print object instead of [Object object] ()" ()
This reverts commit 8555a3a3cd95831f81b0e04b74942d451afd163d.

Reverted because of https://github.com/angular/angular/issues/23440

PR Close 
2018-04-19 14:51:58 -07:00
Matias Niemelä
acf6781ccc test(core): add a symbols test for renderer2 code ()
PR Close 
2018-04-18 14:49:29 -07:00