Commit Graph

1756 Commits

Author SHA1 Message Date
Pete Bacon Darwin e3518967ad style(animations): fix short param names (#23668)
PR Close #23668
2018-05-05 08:17:02 -07:00
Pete Bacon Darwin 005dc8f68b docs(animations): fix content errors (#23668)
PR Close #23668
2018-05-05 08:17:02 -07:00
Igor Minar 6601d0f7ba build: update to rxjs@6.0.0 (#23679)
PR Close #23679
2018-05-03 10:53:39 -07:00
Matias Niemelä 65211f46cf fix(animations): retain state styling for nodes that are moved around (#23534)
PR Close #23534
2018-05-02 16:58:46 -07:00
Matias Niemelä da9ff255dd fix(animations): properly clean up queried element styles in safari/edge (#23633)
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 #23633
2018-05-02 16:58:24 -07:00
Kara Erickson c5cfc3a1b6 fix(ivy): only generate TViews once per embedded template (#23385)
PR Close #23385
2018-05-01 10:27:40 -07:00
Misko Hevery b76f5a6a7d perf(ivy): add performance counters in ngDevMode (#23385)
PR Close #23385
2018-05-01 10:27:40 -07:00
Victor Berchet 7ef9d4a582 docs(ivy): upddate the status (#23562)
PR Close #23562
2018-04-27 07:21:16 -07:00
Vikram Subramanian 0c6dc45c85 fix(core): avoid eager providers re-initialization (#23559)
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 #23559
2018-04-27 07:16:12 -07:00
Igor Minar 5b96078624 Revert "refactor(core): tree-shake application_module providers (#23477)"
This reverts commit eb031c6ff1.

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 (#23396)
PR Close #23396
2018-04-25 19:02:00 -07:00
Alex Rickabaugh b1f040f5a2 fix(compiler-cli): don't rely on incompatible TS method (#23550)
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 #23550
2018-04-25 19:00:55 -07:00
Matias Niemelä eb031c6ff1 refactor(core): tree-shake application_module providers (#23477)
PR Close #23477
2018-04-25 15:51:51 -07:00
Alex Eagle b4c252bcc5 build: serve ivy todo app with real http-server (#23446)
PR Close #23446
2018-04-25 15:51:18 -07:00
Kara Erickson db77d8dc92 feat(ivy): support injection flags at runtime (#23518)
PR Close #23518
2018-04-25 13:26:58 -07:00
Alex Rickabaugh ab5bc42da0 feat(ivy): first steps towards ngtsc mode (#23455)
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 #23455
2018-04-25 13:25:33 -07:00
Paul Freedman 811a7f2863 docs(benchpress): fix typo in README (#23471) (#23488)
PR Close #23488
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. (#23468)
`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 #23468
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 (#23482)
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 #23482
2018-04-24 11:15:16 -07:00
Olivier Combe 06c0d9666f build(common): mark locales files as side-effect-full (#23509)
Fixes https://github.com/angular/angular-cli/issues/10322
PR Close #23509
2018-04-24 11:14:52 -07:00
Steven Liekens 4cfa571258 fix(router): cache route handle if found (#22475)
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 #22474

PR Close #22475
2018-04-23 13:35:59 -07:00
Victor Berchet ba47997715 style(compiler): fix lint issues (#23480)
PR Close #23480
2018-04-22 11:49:49 -07:00
Victor Berchet 6761a64522 refactor(compiler): remove a dependency from the IVY AST to the template AST (#23476)
PR Close #23476
2018-04-20 17:23:02 -07:00
Victor Berchet 0b47902ad7 refactor(ivy): move core code to core.ts (#23476)
PR Close #23476
2018-04-20 17:23:02 -07:00
Victor Berchet 4662878a1f refactor(compiler): refactor template binding parsing (#23460)
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 #23460
2018-04-20 16:07:55 -07:00
Alex Rickabaugh ca776c59dd fix(compiler): handle undefined annotation metadata (#23349)
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 #23349
2018-04-19 18:57:22 -07:00
Victor Berchet 9757347e71 feat(ivy): add an IVY local the compiler which avoids analyzeModule (#23441)
closes #23289

Based on a spike by @chukjaz

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

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

PR Close #23442
2018-04-19 14:51:58 -07:00
Matias Niemelä acf6781ccc test(core): add a symbols test for renderer2 code (#23436)
PR Close #23436
2018-04-18 14:49:29 -07:00
Matias Niemelä 7be7abdebd refactor(animations): use a const enum to avoid compilation side effects (#23402)
This patch is in response to #23401 where a non-const enum was being
compiled as an empty object when used in an animation player when
`ng build --prod` was being processed. This patch is a immediate fix
for the issue and #23400 tracks it.

Closes #23401

PR Close #23402
2018-04-17 14:03:01 -07:00
Kara Erickson 5a1ddee88c refactor(ivy): speed up bound text nodes (#23386)
PR Close #23386
2018-04-17 13:49:19 -07:00
Kara Erickson 7f612fc828 fix(ivy): generate bind calls for property bindings (#23403)
PR Close #23403
2018-04-17 13:44:48 -07:00
HiveSolution fb59b2dd97 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:37 -07:00
Misko Hevery b64a276d4b refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) (#23383)
Ivy definition looks something like this:

```
class MyService {
  static ngInjectableDef = defineInjectable({
    …
  });
}
```

Here the argument to `defineInjectable` is well known public contract which needs
to be honored in backward compatible way between versions. The type of the
return value of `defineInjectable` on the other hand is private and can change
shape drastically between versions without effecting backwards compatibility of
libraries publish to NPM. To our users it is effectively an opaque token.
For this reson why declare the return value of `defineInjectable` as `never`.

PR Close #23383
2018-04-14 20:40:14 -07:00
Igor Minar 674c3def31 revert: refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371)
This reverts commit 2c09b707ce.
2018-04-13 23:02:29 -07:00
Victor Berchet 80e483ceac fix(ivy): add unparsed selectors to the `projectionDef` instruction (#23375)
PR Close #23375
2018-04-13 21:46:19 -07:00
Victor Berchet ac683d7abb refactor(ivy): cleanup of the view compiler (#23375)
PR Close #23375
2018-04-13 21:46:19 -07:00
Misko Hevery 33630dd3ed fix(ivy): workaround for tsickle bug (#23379)
The issue is with tsickle type inference and the bug should be assigned to them.

The offending code is:
```
function cacheMatchingDirectivesForNode(
    tNode: TNode, tView: TView, localRefs: string[] | null): void {
  const exportsMap = localRefs ? {'': -1} : null;     // <<<<< ===== OFFENDING LINE
  const matches = tView.currentMatches = findDirectiveMatches(tNode);
  if (matches) {
    for (let i = 0; i < matches.length; i += 2) {
      const def = matches[i] as DirectiveDef<any>;
      const valueIndex = i + 1;
      resolveDirective(def, valueIndex, matches, tView);
      saveNameToExportMap(matches[valueIndex] as number, def, exportsMap);
    }
  }
  if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);
}

```

because it generates invalid js closure code:
```
function cacheMatchingDirectivesForNode(tNode, tView, localRefs) {
    const /** @type {(null|{: number})} */ exportsMap = localRefs ? { '': -1 } : null;      // <<<<< ===== OFFENDING LINE
    const /** @type {(null|!Array<?>)} */ matches = tView.currentMatches = findDirectiveMatches(tNode);
    if (matches) {
        for (let /** @type {number} */ i = 0; i < matches.length; i += 2) {
            const /** @type {!tsickle_forward_declare_11.DirectiveDef<?>} */ def = /** @type {!tsickle_forward_declare_11.DirectiveDef<?>} */ (matches[i]);
            const /** @type {number} */ valueIndex = i + 1;
            resolveDirective(def, valueIndex, matches, tView);
            saveNameToExportMap(/** @type {number} */ (matches[valueIndex]), def, exportsMap);
        }
    }
    if (exportsMap)
        cacheMatchingLocalNames(tNode, localRefs, exportsMap);
}
```

The workaround is to declare the type explicitly such as:

```
const exportsMap: ({[key:string]:number}|null) = localRefs ? {'': -1} : null;
```

which than generates valid closure code:

```
const /** @type {(null|!Object<string,number>)} */ exportsMap = localRefs ? { '': -1 } : null;
```

PR Close #23379
2018-04-13 21:29:39 -07:00
Alex Eagle 102ed3b03c test: move platform-server integration test (#22810)
Now it lives in our standard location for tests against npm packages

PR Close #22810
2018-04-13 16:30:50 -07:00
Alex Eagle 328b48b697 test: integration tests now against bazel built packages (#22810)
PR Close #22810
2018-04-13 16:30:50 -07:00
Olivier Combe d1177c75f8 refactor: update CLDR data for closure locale & use a const for undefined (#23372)
PR Close #23372
2018-04-13 16:30:23 -07:00
Miško Hevery 2c09b707ce refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371)
Ivy definition looks something like this:

```
class MyService {
  static ngInjectableDef = defineInjectable({
    …
  });
}
```

Here the argument to `defineInjectable` is well known public contract which needs
to be honored in backward compatible way between versions. The type of the
return value of `defineInjectable` on the other hand is private and can change
shape drastically between versions without effecting backwards compatibility of
libraries publish to NPM. To our users it is effectively an `OpaqueToken`.

By prefixing the type with `ɵ` we are communicating the the outside world that
the value is not public API and is subject to change without backward compatibility.

PR Close #23371
2018-04-13 16:20:25 -07:00
Misko Hevery f4017ce5e3 fix(ivy): Update Todo app to take advantage of optional injector (#23345)
PR Close #23345
2018-04-13 14:29:52 -07:00
Misko Hevery 4384a92271 docs(ivy): Clean up incorrect comments (#23345)
PR Close #23345
2018-04-13 14:29:52 -07:00
Misko Hevery da31db757b feat(ivy): support injection even if no injector present (#23345)
- Remove default injection value from `inject` / `directiveInject` since
  it is not possible to set using annotations.
- Module `Injector` is stored on `LView` instead of `LInjector` data
  structure because it can change only at `LView` level. (More efficient)
- Add `ngInjectableDef` to `IterableDiffers` so that existing tests can
  pass as well as enable `IterableDiffers` to be injectable without
  `Injector`

PR Close #23345
2018-04-13 14:29:52 -07:00
Misko Hevery 6f213a74f2 feat(ivy): support generation of flags for directive injection (#23345)
This change changes:
- compiler uses `directiveInject` instead of `inject` for `Directive`s
- unifies the flags in `di` as well as `render3`
- changes the signature of `directiveInject` to match `inject` In prep for #23330
- compiler now generates flags for injection.

Compiler portion of #23342
Prep for #23330

PR Close #23345
2018-04-13 14:29:52 -07:00
Marc Laval e7ef02722d fix(ivy): local directives and pipes should be applied to TemplateRef (#23312)
PR Close #23312
2018-04-13 13:31:19 -07:00
Victor Berchet d5e7f60f04 refactor(ivy): misc (#23351)
PR Close #23351
2018-04-13 13:19:17 -07:00
Victor Berchet 6e73300ff1 refactor(ivy): cleanup directives & pipes import (#23369)
PR Close #23369
2018-04-13 13:15:26 -07:00
George Kalpakas 6c2c95851a fix(service-worker): let `*` match 0 characters in globs (#23339)
In [glob patterns][1], the `*` wildcard is supposed to match 0 or more
characters.

For reference:
- This is also how `*` works in other implementations, such as
  `.gitignore` files or Firebase hosting config.
- Some popular JS implementations (e.g. [minimatch][2], [micromatch][3])
  work differently, matching 1 or more character (but not 0).

This commit "fixes" the minimal glob support in
`@angular/service-worker` to allow `*` to also match 0 characters.

[1]: https://en.wikipedia.org/wiki/Glob_%28programming%29
[2]: https://www.npmjs.com/package/minimatch
[3]: https://www.npmjs.com/package/micromatch

PR Close #23339
2018-04-13 13:13:36 -07:00
George Kalpakas 08325aaffc feat(service-worker): add support for configuring navigations URLs (#23339)
The ServiceWorker will redirect navigation requests that don't match any
`asset` or `data` group to the specified index file. The rules for a
request to be classified as a navigation request are as follows:
1. Its `mode` must be `navigation`.
2. It must accept a `text/html` response.
3. Its URL must match certain criteria (see below).

By default, a navigation request can have any URL except for:
1. URLs containing `__`.
2. URLs to files (i.e. containing a file extension in the last path
   segment).

While these rules are fine in many cases, sometimes it is desirable to
configure different rules for the URLs of navigation requests (e.g.
ignore specific URLs and pass them through to the server).

This commit adds support for specifying an optional `navigationUrls`
list in `ngsw-config.json`, which contains URLs or simple globs
(currently only recognizing `!`, `*` and `**`).
Only requests whose URLs match any of the positive URLs/patterns and
none of the negative ones (i.e. URLs/patterns starting with `!`) will be
considered navigation requests (and handled accordingly by the SW).

(This is an alternative implementation to #23025.)

Fixes #20404

PR Close #23339
2018-04-13 13:13:36 -07:00
George Kalpakas 1e1c7fd408 refactor(service-worker): move common code into method (#23339)
PR Close #23339
2018-04-13 13:13:36 -07:00
Rafael 639d52fe71 refactor: ensure all 'TODO's are consistent (#23252)
PR Close #23252
2018-04-13 13:11:01 -07:00
Igor Minar aa27155618 build(common): mark locales files as side-effect-full (#23366)
These files are in the UMD format for greater portablity, and as such
can't be marked as side-effect-free by webpack/build-optimizer/uglify.

PR Close #23366
2018-04-13 13:09:13 -07:00
Rob Wormald 9fabe2f5fa fix(elements): include schematics in npm distro (#23350)
PR Close #23350
2018-04-13 00:50:04 -07:00
Marc Laval 2bb783824e fix(ivy): support ViewContainerRef on nodes projected into an embedded view (#23333)
PR Close #23333
2018-04-13 00:20:32 -07:00
Greg Magolan 6199ea5d4a fix(compiler-cli): shorten resolved module name in fileNameToModuleName to npm package name for typings (#23231)
PR Close #23231
2018-04-13 00:19:19 -07:00
Alex Eagle 2e270bb96a build: include tslib in umd bundles (#23354)
Fixes #22971

PR Close #23354
2018-04-13 00:13:54 -07:00
Alex Eagle b76dd3b979 fix(compiler): use correct global name in compiler.umd.js (#23354)
Fixes #23343

PR Close #23354
2018-04-13 00:13:54 -07:00
Camilo Giraldo a025f7e2a6 refactor(language-service): fix typo on type.ts language-service 2018-04-13 00:06:26 -07:00
Joey Perrott b551f844e4 feat(platform-browser): add token marking which the type of animation module nearest in the injector tree (#23075)
PR Close #23075
2018-04-12 23:17:38 -07:00
Nathan Friend 75febe7511 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
Igor Minar 1fc72e53f5 build(core): update zone.js peer dep to ~0.8.26 2018-04-12 00:19:08 -07:00
Igor Minar bbfa1d31a4 fix(platform-server): require node v8+ (#23331)
PR Close #23331
2018-04-12 00:08:50 -07:00
Vikram Subramanian af46d097ff fix(elements): avoid exception when window is undefined (#23324)
Detect server environment by checking `typeof window` and schedule render immediately instead of waiting for RAF.

This does not make Angular Elements work on platform-server. This is just the first step.

PR Close #23324
2018-04-11 23:17:04 -07:00
Andrew Seguin 37d2cb4553 feat(elements): add schematics (#23298)
PR Close #23298
2018-04-11 18:13:30 -07:00
Olivier Combe ce40e85cbb refactor(common): update CLDR data to v33.0.0 (#23265)
PR Close #23265
2018-04-11 15:34:46 -07:00
Olivier Combe 5706810af2 fix(common): replace i18n locale undefined values by a const (#23265)
Fixes #22988
PR Close #23265
2018-04-11 15:34:46 -07:00
Alex Eagle d1e33d2df7 build: disambiguate rollup progress message (#23318)
All our package labels are `npm_package` so the bazel build reports a bunch of identical actions running, like

```
    Angular Packaging: rolling up npm_package; 31s darwin-sandbox
    Angular Packaging: rolling up npm_package; 30s darwin-sandbox
    Angular Packaging: rolling up npm_package; 29s darwin-sandbox
    Angular Packaging: rolling up npm_package; 27s darwin-sandbox
    Angular Packaging: rolling up npm_package; 26s darwin-sandbox
    Angular Packaging: rolling up npm_package; 23s darwin-sandbox
    Angular Packaging: rolling up npm_package; 19s darwin-sandbox
    Angular Packaging: rolling up npm_package; 11s darwin-sandbox
```
PR Close #23318
2018-04-11 15:31:02 -07:00
Kara Erickson 0d516f1658 fix(ivy): update compiler to generate separate creation mode and update mode blocks (#23292)
PR Close #23292
2018-04-11 15:30:39 -07:00
Kara Erickson de3ca56769 fix(ivy): support separate creation mode and update mode execution in runtime (#23292)
PR Close #23292
2018-04-11 15:30:39 -07:00
Alex Eagle b3a10e0a42 build: update Bazel dependency to 0.11.1 (#23297)
PR Close #23297
2018-04-10 23:01:30 -07:00
Pete Bacon Darwin 0cb4f12a7a docs(animations): migrate deprecated `@whatItDoes` tag (#23210)
This was not being picked up by the doc-gen as it does not appear to be
part of the public API.

PR Close #23210
2018-04-10 21:49:32 -07:00
Pete Bacon Darwin 4b96a58c5a docs: remove all deprecated `@stable` jsdoc tags (#23210)
These are no longer needed as stable docs are computed as those that
do not have `@experimental` or `@deprecated` tags.

PR Close #23210
2018-04-10 21:49:32 -07:00
Marc Laval c973830d9a refactor(ivy): clean projection support (#23287)
PR Close #23287
2018-04-10 13:16:01 -07:00
Keen Yee Liau 8555a3a3cd fix(compiler): Pretty print object instead of [Object object] (#22689)
The 'stringify' function prints an object as [Object object] which
is not very helpful in many cases, especially in a diagnostics
message. This commit changes the behavior to pretty print an object.

PR Close #22689
2018-04-10 13:15:18 -07:00
Miško Hevery f1db789450 test(ivy): update todo app to http://todomvc.com (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 50030f650b docs(ivy): update STATUS.md with outstanding work (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 3fb4e190a8 fix(ivy): correctly bind to component context (#23168)
When compiling templates the compiler would often bind to
closest context rather than the component context.

The only time one should be binding to the cont component is
in explicit cases where the inner template declares local variable.

PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 4f7fac0e03 test(ivy): cleanup todo test app (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 50ab8d8ad4 build: create a more focused build file for packages/compiler/render3 (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery f544635014 feat(ivy): Bind to right context in nested template statmentes (#23168)
Given
```
<div *ngFor=”…” (click)=“doSomething()”>
```

Before `doSomething` would execute on the inner template context, which
is incorrect. The correct behavior is to execute on the top level context
of the component.

PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery c059670792 feat(ivy): Add `outputs` support for `defineDirective` / `defineComponent` (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 9a2479d423 fix(ivy): named listener method for easier debugging. (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Miško Hevery 720031b5f6 docs(ivy): update outstanding work for todo (#23168)
PR Close #23168
2018-04-10 13:14:20 -07:00
Marc Laval bb3f0e5ed2 feat(ivy): support projection of ViewContainerRef (#23272)
PR Close #23272
2018-04-09 16:07:42 -07:00
Alex Eagle 37c1634276 build: Add sourcemap output from ng_rollup_bundle (#23276)
PR Close #23276
2018-04-09 16:07:13 -07:00
Alex Rickabaugh 58143555bc fix(compiler-cli): strictMetadataEmit should not break on non-compliant libraries (#23275)
rxjs 6.0.0 breaks strictMetadataEmit as they now publish a .d.ts file with a
structure like:

declare export class Subscription {
  static EMPTY: Subscription;
}

This generates metadata which contains an error, and fails the strictMetadataEmit
validation. There is nothing a library author can do in this situation except to
set strictMetadataEmit to false.

The spirit of strictMetadataEmit is to validate that the author's library doesn't
do anything that will break downstream users. This failure is a corner case which
causes more harm than good, so this commit disables validation for metadata
collected from .d.ts files.

Fixes #22210

PR Close #23275
2018-04-09 15:35:23 -07:00
paulmojicatech 60e8392722 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:10 -07:00
Marc Laval f4c56f4931 feat(ivy): implement some of the ViewContainerRef API (#23189)
PR Close #23189
2018-04-09 15:17:19 -07:00
Alex Eagle 5a298b1c5e fix(common): workaround UMD/webpack limitation (#23271)
Fixes #23217

PR Close #23271
2018-04-09 15:16:12 -07:00
Alex Eagle 3e8eef6015 fix(bazel): set rollup output.name and amd.id (#23274)
These are based on the name of the package as declared in the module_name attribute on ng_module

Fixes #23238

PR Close #23274
2018-04-09 15:15:44 -07:00
Igor Minar da58a55ece fix(bazel): don't produce ngfactory files for ng_packages (#23237)
PR Close #23237
2018-04-06 16:26:31 -07:00
Alex Rickabaugh 11ea3a3f33 fix(compiler-cli): don't lower expressions in flat module metadata (#23226)
Lowering expressions in flat module metadata is desirable, but it won't
work without some rearchitecting. Currently the flat module index source
is added to the Program and therefore must be determined before the rest
of the transforms run. Since the lowering transform changes the set of
exports needed in the index, this creates a catch-22 in the index
generation.

This commit causes the flat module index metadata to be generated using
only those transforms which are "safe" (don't modify the index).

PR Close #23226
2018-04-06 14:36:44 -07:00
Alex Rickabaugh 195193b9be docs(compiler): update ngtsc/ngcc design doc with more details (#23174)
PR Close #23174
2018-04-06 14:35:15 -07:00
Jeremy Elbourn ae8a0092bd build(bazel): use ng_package entry_point_name for umd bundles (#23132)
This change also requires updating the package gold test to work with
multiple test packages.

PR Close #23132
2018-04-05 14:51:31 -07:00
Kara Erickson 628303d2cb fix(ivy): instantiate dirs in correct order (#23178)
PR Close #23178
2018-04-05 14:50:00 -07:00
Pawel Kozlowski d80e9304c6 fix(ivy): properly find RNode (#23193)
As we no longer create native (RNode) comment nodes for containers,
we need to execute logic for finding a next sibiling node with RNode
when inserting a view.

The mentioned logic need to be updated for the case of dynamically
created containers (LContainerNode). Indeed, we need to be able to
descend into dynamically inserted views while looking for a RNode.
To achieve this we need to have a pointer from a host LNode to a
dynamically created LContainerNode).

PR Close #23193
2018-04-05 14:47:50 -07:00
Pawel Kozlowski fc813f67f4 fix(ivy): fix issue with refreshing embedded views (#23164)
PR Close #23164
2018-04-05 10:14:02 -07:00
Victor Berchet 524e5d8ae7 refactor(ivy): adjust types (#23167)
PR Close #23167
2018-04-05 10:09:54 -07:00
Pete Bacon Darwin b8053f1d4f docs(upgrade): remove unnecessary `{@link... }` tags (#23197)
Backtick enclosed inline code blocks will be automatically linked
if appropriate.

PR Close #23197
2018-04-05 09:30:27 -07:00
Pete Bacon Darwin 9d9fb607cd docs(upgrade): migrate deprecatd `@whatItDoes` tags (#23197)
These tags' contents  are now included in the `@description` tag.

PR Close #23197
2018-04-05 09:30:27 -07:00
Pete Bacon Darwin 5dc50e4688 docs(upgrade): migrate deprecated `@howToUse` tags (#23197)
These have become examples in the `@description` tag.

PR Close #23197
2018-04-05 09:30:27 -07:00
Pete Bacon Darwin 9141424ac6 docs(router): remove unnecessary `{@link Injector}` jsdoc tags (#23187)
Inline code blocks are automatically linked, if possible, to their API
page.

PR Close #23187
2018-04-05 09:29:08 -07:00
Pete Bacon Darwin 31b90436b4 docs(router): migrate deprecated `@whatItDoes` tags (#23187)
The first line of the description is now used as an overview.

PR Close #23187
2018-04-05 09:29:08 -07:00
Pete Bacon Darwin f66f408b04 docs(router): migrate deprecated `@howToUse` tags (#23187)
These have been converted to `@usageNotes` or included in the
`@description` tag.

PR Close #23187
2018-04-05 09:29:08 -07:00
Pete Bacon Darwin 92821e338b docs(forms): remove unnecessary `{@link Injector}` jsdoc tags (#23186)
Inline code blocks are automatically linked, if possible, to their API
page.

PR Close #23186
2018-04-05 09:27:29 -07:00
Pete Bacon Darwin 1aef4df127 docs(forms): migrate `@whatItDoes` tags to the description (#23186)
We get the overview for the doc by splitting off the first
paragraph.

PR Close #23186
2018-04-05 09:27:29 -07:00
Pete Bacon Darwin 0a065bbdcf docs(forms): migrate deprecated `@howToUse` tags (#23186)
In this case they have been converted to `@description` tags.

PR Close #23186
2018-04-05 09:27:29 -07:00
Pete Bacon Darwin 8ea15b4f12 docs(core): remove unnecessary `{@link Injector}` jsdoc tag (#23185)
Inline code blocks are automatically linked, if possible, to their API
page.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pete Bacon Darwin 7dc150c1e8 docs(core): migrate `@whatItDoes` tags to the description (#23185)
We get the overview for the doc by splitting off the first
paragraph.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pete Bacon Darwin 5bb14a68d2 docs(core): migrate deprecated `@howToUse` tags (#23185)
These have now become `@usageNotes` but later they might be
moved into a section of the description.

PR Close #23185
2018-04-05 09:26:24 -07:00
Pete Bacon Darwin 381da1af45 build(aio): move "optional" and "default" to end of param description (#23062)
PR Close #23062
2018-04-05 09:25:15 -07:00
Pete Bacon Darwin cdd05bd2ca docs(common): move Pipe param docs to `transform` function (#23062)
PR Close #23062
2018-04-05 09:25:15 -07:00
Pete Bacon Darwin 079d8e57d5 docs(common): migrate `@whatItDoes` tags to the description (#23062)
We get the overview for the doc by splitting off the first
paragraph.

PR Close #23062
2018-04-05 09:25:15 -07:00
Pete Bacon Darwin 46ba7f69dd docs(common): migrate `@howToUse` tags (#23062)
In pipes the content of these tags is now generated automatically.
In directives these tags have been converted to `@usageNotes` tags,
but in the future me might find a way to generate that usage too.

PR Close #23062
2018-04-05 09:25:15 -07:00
Alex Eagle 6699fb5d77 build: language-service package built by bazel (#23155)
PR Close #23155
2018-04-04 16:48:39 -07:00
Alex Rickabaugh f48e215305 build(service-worker): properly build npm_package with Bazel (#23090)
PR Close #23090
2018-04-04 10:26:38 -07:00
Pawel Kozlowski 32a41bc738 test(ivy): fixes in the TodoMVC example (#23161)
- properly display initial checked state
- properly remove a todo

Please note that the 'archive' option still doesn't
work correctly as listening to component outputs doesn't
seem to work (onArchive() is never called).

PR Close #23161
2018-04-04 10:26:18 -07:00
Alex Rickabaugh f99cb5c995 fix(compiler-cli): flat module index metadata should be transformed (#23129)
Currently, the flat module index metadata is produced directly from
the source metadata. The compiler, however, applies transformations
on the Typescript sources during transpilation, and also equivalent
transformations on the metadata itself. This transformed metadata
doesn't end up in the flat module index.

This changes the compiler to generate the flat module index metadata
from its transformed version instead of directly from source.

PR Close #23129
2018-04-04 09:44:14 -07:00
Pawel Kozlowski aaefd51a88 refactor(common): simplify NgClass code, add comments (#21937)
PR Close #21937
2018-04-04 09:41:17 -07:00
Pawel Kozlowski 4a426696c9 fix(common): properly take className changes into account (#21937)
Fixes #21932

PR Close #21937
2018-04-04 09:41:16 -07:00
Victor Berchet 5c8340aae0 refactor(ivy): misc refactoring (#23154)
PR Close #23154
2018-04-04 09:04:41 -07:00
JiaLi.Passion c560423b52 build: upgrade zone.js (#23108)
PR Close #23108
2018-04-04 08:24:02 -07:00
Alex Eagle 46eadb5cfb build: fix common locales in npm package (#23153)
PR Close #23153
2018-04-04 08:23:07 -07:00
Alan Agius 1678423619 test(bazel): fix test for `@angular/common ng_package` (#23153)
PR Close #23153
2018-04-04 08:23:07 -07:00
Victor Berchet 412b85ba89 docs: add a link to "Impact of polymorphism [...]" to the perf notes (#23151)
PR Close #23151
2018-04-04 08:22:28 -07:00
Steven Liekens d37064ce28 test(router): fix typo in expectation (#23137)
PR Close #23137
2018-04-04 08:22:03 -07:00
Aslan Vatsaev cae48df25b docs: Update PERF_NOTES.md (#23050)
PR Close #23050
2018-04-04 08:21:16 -07:00
Dirk Luijk 23cc3ef2eb 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:55 -07:00
Alex Rickabaugh 550433a128 feat(compiler-cli): lower loadChildren fields to allow dynamic module paths (#23088)
Computing the value of loadChildren does not work externally, as the CLI
needs to be able to detect the paths referenced to properly set up
codesplitting. However, internally, different approaches to codesplitting
require hashed module IDs, and the computation of those hashes involves
something like:

{path: '...', loadChildren: hashFn('module')}

ngc should lower loadChildren into an exported constant in that case.

This will never break externally, because loadChildren is always a
string externally, and a string won't get lowered.

PR Close #23088
2018-04-04 08:20:21 -07:00
Alex Rickabaugh fab6b39c3d fix(core): inject() should always work in an NgModule injection scope (#23148)
Currently the context for inject() is only set when the token is seen
for the first time. This has two issues:

* It should always be set when injecting from that injector, because
  a constructor may wish to call inject() directly.
* If an NgModuleFactory is .create()'d twice, and an ngInjectableDef
  token is requested from each of them, the second time will fail.
  This is because the first injection adds the provider definition
  and calls the factory, and the provider definitions are shared.
  The second injector will see the provider definition and call the
  factory to create an instance, but without setting the correct
  context for inject().

Fixes angular/material2#10586.

PR Close #23148
2018-04-03 10:59:36 -07:00
Alan Agius 7ca772060b fix(common): `locales` are not being shipped (#23136)
Closes: #23140, #23103

PR Close #23136
2018-04-03 10:47:51 -07:00
Alex Eagle 580f05bd9c build: flatten esm5 sources before rollup (#23131)
this is needed to update to latest rules_nodejs due to breaking change in
https://github.com/bazelbuild/rules_nodejs/pull/172
It has the side-effect of correctly marking rxjs packages as side-effect-free

PR Close #23131
2018-04-03 10:47:29 -07:00
Igor Minar 92724b396b build: update to rxjs@6.0.0-rc.0 (#23106)
PR Close #23106
2018-04-03 10:00:24 -07:00
Pawel Kozlowski fa2c9a81dd feat(ivy): ViewContainerRef basic scenarios support (#23021)
PR Close #23021
2018-04-03 09:35:14 -07:00
Miško Hevery 55c9fb298f test(ivy): create todo app in ivy (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery 60065935be refactor(ivy): align compiler with runtime (#22921)
Remove `containerRefreshStart` and `containerRefreshEnd` instruction
from the output.

Generate directives as a list in `componentDef` rather than inline into
instructions. This is consistent in making selector resolution runtime
so that translation of templates can follow locality.

PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery 5266ffe04a feat(ivy): add `(event)="handle"` syntax support to compiler (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery 4290ea4bb9 ci: update to latest rulse_nodejs (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Miško Hevery e7f1af3c54 refactor(ivy): cleanup necessary domino files (#22921)
PR Close #22921
2018-04-02 15:49:48 -07:00
Jason Bedard a2330ff2db fix(upgrade): propagate return value of resumeBootstrap (#22754)
Fixes #22723

PR Close #22754
2018-04-02 14:20:58 -07:00
Judy Bogart ff34d5ea7a docs: add custom elements documentation (#22966)
PR Close #22966
2018-04-02 14:13:46 -07:00
Shannon Dunn ad9ce5cb41 fix(upgrade): correctly handle downgraded `OnPush` components (#22209)
Fixes #14286

PR Close #22209
2018-04-02 14:12:45 -07:00
Kara Erickson 85d3b591b6 refactor(ivy): generate pipe names instead of defs (#23104)
PR Close #23104
2018-04-02 09:42:44 -07:00
Alex Rickabaugh d6bf71ae95
docs(compiler): initial outline of Ivy Compiler Architecture design doc (#22916) 2018-03-30 15:43:34 -07:00
Kara Erickson 9cd446565c refactor(compiler): generate flat css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
Kara Erickson 6e5fb99304 refactor(ivy): flatten css selectors (#23074)
PR Close #23074
2018-03-30 15:27:50 -07:00
Keen Yee Liau 0c4e3718f5 build(bazel): Emit metadata.json under Blaze (#23049)
This commit modifies the compilation to emit metadata.json files when
compiled under Blaze. The default behavior of ngc is to emit metadata
only when the --flatModuleOutFile flag is specified, but this mode
is not used in Blaze.
Emitting metadata for individual Angular components is needed for
Angular Language Service to work with projects compiled with Blaze.

PR Close #23049
2018-03-30 15:23:30 -07:00
Alex Eagle 15278784fc release(bazel): change publish-next script to publish bazel artifacts (#23097)
PR Close #23097
2018-03-30 14:03:05 -07:00
Igor Minar 22cb2c9441 build: add missing dependencies on @rxjs//operators needed for rxjs@6.0.0-beta.4 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar 3603a10ea2 build: update to zone.js@0.8.20 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar 6f7d14064c build: update to rxjs@6.0.0-beta.4 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Oussama Ben Brahim a5f0939eae build(compiler-cli): include new test files in bazel config (#22705)
Fixes #22593

PR Close #22705
2018-03-30 07:58:36 -07:00
Oussama Ben Brahim 193737a1ea fix(compiler-cli): use numeric comparison for TypeScript version (#22705)
Fixes #22593

PR Close #22705
2018-03-30 07:58:36 -07:00
Alex Eagle be10bf538b fix(bazel): don't try to do flatmoduleindex under Blaze (#23083)
PR Close #23083
2018-03-29 22:23:49 -07:00
Igor Minar 439030fb57 fix(bazel): complete the rollup globals list for all angular entrypoints (#23080)
PR Close #23080
2018-03-29 20:34:58 -07:00
Alex Eagle 481b22ecb0 fix(bazel): downlevel decorators in fesm5 files (#23078)
Needed so that our bundles appear side-effect-free to tools like webpack

PR Close #23078
2018-03-29 18:53:49 -07:00
Alex Eagle 45e090b614 fix(bazel): pass --global option to rollup (#23073)
This fixes the UMD bundles which otherwise don't contain the right global symbols

PR Close #23073
2018-03-29 17:44:43 -07:00
Alex Eagle 0d9140cdce fix(bazel): ng_package should include private exports in fesms (#23054)
PR Close #23054
2018-03-29 14:11:12 -07:00
Chuck Jazdzewski 9fb08e2377 ci(language-service): enable language service tests in bazel (#23001)
PR Close #23001
2018-03-29 13:11:27 -07:00
Victor Berchet 28058b784b fix(compiler): fix support for html-like text in translatable attributes (#23053)
PR Close #23053
2018-03-29 08:58:27 -07:00
Alex Eagle 00497437a6 fix(bazel): don't inline tslib into fesms (#23044)
PR Close #23044
2018-03-28 10:19:14 -07:00
Chuck Jazdzewski 4e004f3783 ci(compiler-cli): run compiler-cli tests in bazel (#22997)
PR Close #22997
2018-03-28 10:02:53 -07:00
George Kalpakas d9dc46e651 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:16 -07:00
George Kalpakas 9e9b8dd494 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:16 -07:00
George Kalpakas 12665a749c test(service-worker): minor test fixes and refactorings (#22883)
PR Close #22883
2018-03-28 10:02:16 -07:00
Kara Erickson e2e80ec61c refactor(ivy): remove pipe references from the template (#23032)
PR Close #23032
2018-03-28 09:17:27 -07:00
Kara Erickson 5a86f7144f fix(ivy): store local variables in data instead of calling loadDirective (#23029)
PR Close #23029
2018-03-28 09:17:05 -07:00
Alex Rickabaugh bd024c02e2 feat(compiler): lower @NgModule ids if needed (#23031)
This change allows the id of an NgModule to be dynamically computed if
needed.

PR Close #23031
2018-03-28 09:15:16 -07:00
Alex Rickabaugh 884bf0ef09 fix: consistently rewrite Injector to INJECTOR (#23008)
In Ivy mode we rewrite references to Injector to INJECTOR in ngInjectableDef, to fix tree-shaking.

This changes the rewrite to happen always, even in non-Ivy mode, and makes Angular understand
INJECTOR across the board at runtime.

PR Close #23008
2018-03-28 09:14:32 -07:00
Alex Eagle 0b348c8ffe build: fix bazel stamping (#22965)
As pointed out in https://github.com/bazelbuild/rules_nodejs/issues/156
our mechanism would never pick up changes to the version info.

PR Close #22965
2018-03-28 09:00:02 -07:00
Keen Yee Liau ed53c5ccdd refactor(language-service): Remove angularOnlyResults (#22636)
This commit is a duplicate of https://github.com/angular/angular/pull/18637
to remove Angular-specific results from the language service.

PR Close #22636
2018-03-27 17:22:44 -04:00
Olivier Combe d28ce50067 test(ivy): make sure `goog.getMsg()` is defined before being used (#22998)
PR Close #22998
2018-03-27 17:07:50 -04:00
Veres Lajos 0ebdb3d12f style: typo fix amendments (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Veres Lajos de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Kara Erickson f739f756ce test(ivy): fix flaky tests (#23010)
PR Close #23010
2018-03-27 14:48:50 -04:00
Kara Erickson 910a16a1ff refactor(ivy): remove directive references from template (#22986)
PR Close #22986
2018-03-26 22:33:23 -04:00
Jeremy Elbourn 2aabbc51fa fix(bazel): ng_package packages attr not forwarded to npm_package (#22967)
PR Close #22967
2018-03-26 22:32:09 -04:00
Jeremy Elbourn 2388f24256 build(bazel): add entry_point_name attr to ng_package (#22963)
PR Close #22963
2018-03-26 22:30:16 -04:00
Alex Eagle 27e14b2fb3 feat(bazel): prefix private-export (barred-latin-o) symbols (#23007)
This allows a bundle index to be re-exported by a higher-level module without fear of collisions.
Under bazel, we always set the prefix to be underscore-joined workspace, package, label

PR Close #23007
2018-03-26 22:28:55 -04:00
Matias Niemelä bf6a416bce revert: docs(common): add `HttpParamsOptions` to the public API (#20332)
This reverts commit 7b7757dd3d.
2018-03-26 16:29:46 -04:00
George Kalpakas 7b7757dd3d docs(common): add `HttpParamsOptions` to the public API (#20332)
Fixes #20276

PR Close #20332
2018-03-23 16:31:10 -04:00
Alex Rickabaugh 6f0191744c fix(core): don't override ngInjectableDef in the decorator if present on the type (#22943)
Previously, @Injectable() would generate an ngInjectableDef on the type it was
decorating, even if that type already had a compiled ngInjectableDef, overwriting
the compiled version.

PR Close #22943
2018-03-23 16:13:06 -04:00
Victor Berchet 65f296a676 test(compiler): assert translation names pattern (#22960)
PR Close #22960
2018-03-23 15:06:06 -04:00
Misko Hevery b9cbe83104 docs(ivy): update STATUS.md with compiler work breakdown (#22874)
PR Close #22874
2018-03-23 15:04:55 -04:00
sergeome 7966744a44 fix(common): titlecase pipe (#22600)
PR Close #22600
2018-03-23 13:42:51 -04:00
Jeremy Elbourn d9a0a8ff3e build(bazel): add `data` attr to ng_package (#22919)
PR Close #22919
2018-03-23 13:16:07 -04:00
Victor Berchet bcaa07b0ac refactor(compiler): move handling of translations to the ConstantPool (#22942)
PR Close #22942
2018-03-23 13:12:58 -04:00
Victor Berchet d98e9e7c7f fix(compiler): take quoting into account when determining if object literals can be shared (#22942)
PR Close #22942
2018-03-23 13:12:58 -04:00
Victor Berchet 5ab9d4d437 test(compiler): allow asserting matching identifier names (#22835)
PR Close #22835
2018-03-22 21:24:19 -04:00
Victor Berchet 129bb1800b refactor(compiler): refactor code matching helpers for compliance spec (#22835)
PR Close #22835
2018-03-22 21:24:19 -04:00
Kara Erickson 49396ca2ae refactor(ivy): move directives into separate array (#22918)
PR Close #22918
2018-03-22 21:23:02 -04:00
Chuck Jazdzewski 8ca26a9ebb ci(compiler): run compiler tests in bazel (#22900)
PR Close #22900
2018-03-22 19:22:14 -04:00
Kara Erickson e44f69c387 refactor(ivy): move dir flags to tnode (#22901)
PR Close #22901
2018-03-22 19:19:40 -04:00
Olivier Combe 99711b12f9 test(core): hello world i18n demo (#22654)
PR Close #22654
2018-03-22 19:01:51 -04:00
Olivier Combe 204ba9d413 feat(compiler): add basic support for in ivy/i18n code generation (#22654)
PR Close #22654
2018-03-22 19:01:51 -04:00
Matias Niemelä e5e1b0da33 fix(animations): treat numeric state name values as strings (#22923)
This patch ensures that if a numeric state name value in an animation
is detected then it will not throw an error. Normally this wouldn't
occur, but some JS optimizers may convert a quoted numeric value
(like "1" to 1) in some cases to save space. This patch makes sure
that Angular doesn't throw an error when this occurs.

PR Close #22923
2018-03-22 19:00:58 -04:00
Matias Niemelä d77bb460b0 revert: docs(ivy): update STATUS.md with compiler work breakdown (#22874)
This reverts commit b524e4b142.
2018-03-22 18:09:45 -04:00
Miško Hevery c84817970e fix(ivy): remove custom tsconfig from render3 (#22913)
PR Close #22913
2018-03-22 18:02:48 -04:00
Misko Hevery b524e4b142 docs(ivy): update STATUS.md with compiler work breakdown (#22874)
PR Close #22874
2018-03-22 18:01:38 -04:00
Matias Niemelä f88fba020b fix(animations): avoid animation insertions during router back/refresh (#21977)
Closes #19712

PR Close #21977
2018-03-22 17:59:41 -04:00
Victor Berchet 32105c8012 test: temporarily disable ng_package test (#22933)
PR Close #22933
2018-03-22 15:27:28 -04:00
Victor Berchet 4a075e885f test: display a diff when example_apckage.spec.ts fails to ease debugging (#22933)
PR Close #22933
2018-03-22 15:27:28 -04:00
Rado Kirov 838a610197 fix(compiler): don't typecheck all inputs (#22899)
ngc knows to filter out d.ts inputs, but the logic accidentally
depended on whether it had a previous Program lying around.

Fixing that logic puts ngc on the fast code path, but in that code
path it must be able to merge tsickle EmitResults, so we need to
plumb the tsickle.mergeEmitResults function through all the intervening
APIs.  The bulk of this change is that plumbing.

PR Close #22899
2018-03-21 18:29:18 -04:00
Alex Eagle 64efcf103c build: add the FESM files back to ng_package (#22889)
PR Close #22889
2018-03-21 13:19:19 -07:00
adasilva 8c2a57878b 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:26 -07:00
Igor Minar 8768665587 fix: correct peerDependencies declaration on rxjs 2018-03-20 22:48:41 -07:00
Jason Aden 623d769858 fix(router): make locationSyncBootstrapListener public due to change in output after TS 2.7 update in #22669 (#22896)
PR Close #22896
2018-03-20 17:40:25 -07:00
Miško Hevery 17fb9832f4 fix(ivy): fix type error in newer version of TS (#22897)
Newer version of TS is stricter about types and flags counter-variant
types in some  situations. This change inlines the DirectiveDefArgs
into the arguments which:
1) removes the inheritance which caused the issue and
2) Makes it more friendly to IDEs since they will not report comments.

Closes #22877
Closes #22843

PR Close #22897
2018-03-20 15:49:45 -07:00
Igor Minar 3cc5c2e4d0 build: update to rxjs@6.0.0-beta.0 (#22887)
PR Close #22887
2018-03-20 15:26:49 -07:00
Vikram Subramanian e6c731f791 fix(router): don't use spread operator to workaround an issue in closure compiler (#22884)
Closure compiler could not handle the spread operator in this one place. Working around it by removing the use of spread operator.

PR Close #22884
2018-03-20 13:30:37 -07:00
Igor Minar 7d095b96cd fix: correct several esm2015 entry-points in package.jsons (#22892)
PR Close #22892
2018-03-20 13:30:08 -07:00
Alex Eagle 689f351092 build: expose flatModuleOutFile option on ng_module (#22814)
This lets projects like Material change ng_package "bundle index" files to non-conflicting paths

Currently packages like @angular/core ship with the generated metadata
in a path like 'core.js' which overwrites one of the inputs.

Angular material puts the generated file in a path like 'index.js'

Either way these files generated by ng_module rules have the potential
to collide with inputs given by the user, which results in an error.

Instead, give users the freedom to choose a different non-conflicting name.

Also this refactors the ng_package rule, removing the redundant
secondary_entry_points attribute.

Instead, we assume that any ng_module in the deps with a module_name
attribute is a secondary entry point.

PR Close #22814
2018-03-20 13:28:57 -07:00
Igor Minar b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573)
PR Close #22573
2018-03-19 21:51:51 -07:00
Domas Trijonis 2b3de6390f 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
Rado Kirov 5c387a7f3c fix(compiler): do not emit line/char in ngsummary files. (#22840)
Having ngsummaries emit line/char numbers causes white space change to
retrigger upstream recompilations.

PR Close #22840
2018-03-19 16:01:41 -07:00
Misko Hevery fc50c77bd3 test(ivy): switch HelloWorld to ivy compiler (#22788)
PR Close #22788
2018-03-19 16:00:38 -07:00
Greg Magolan bfe077ad64 fix(bazel): correct expected outs for external sources in ng_module (#22755)
PR Close #22755
2018-03-19 16:30:01 -05:00
Kara Erickson 1a0cb21538 refactor(ivy): remove unnecessary binding from hello world (#22848)
PR Close #22848
2018-03-19 16:29:45 -05:00
Igor Minar 0bede54b2d style: fix formatting issues on the master branch (#22854)
PR Close #22854
2018-03-18 14:03:26 -07:00
Kara Erickson e27cfd6236 refactor(ivy): split up directiveCreate for tree shaking (#22838)
PR Close #22838
2018-03-18 11:56:35 -07:00
Kara Erickson 1612985e48 refactor(ivy): allow tick and deps to be tree-shaken (#22838)
PR Close #22838
2018-03-18 11:47:44 -07:00
Kara Erickson 4f21d373b7 refactor(ivy): move hostBindings calls out of template (#22833)
PR Close #22833
2018-03-18 11:41:39 -07:00
Igor Minar ce63dc6f95 feat: update the package output of build.sh to APF v6 (#22808)
PR Close #22808
2018-03-18 09:33:51 -07:00
Igor Minar d54615d555 build: don't mark language-service package as sideEffect free (#22808)
we are not sure if this is the case and we don't need this package to
be optimized at the moment.

PR Close #22808
2018-03-18 09:33:51 -07:00
Miško Hevery f258ec67bf docs(ivy): update status of ivy (#22834)
PR Close #22834
2018-03-16 22:20:21 -07:00
Rob Wormald 5d82d8da6d fix(elements): fix elements test bootstrap (#22839)
PR Close #22839
2018-03-16 22:19:50 -07:00
Alex Rickabaugh 6ef9f2278f feat(ivy): @NgModule -> ngInjectorDef compilation (#22458)
This adds compilation of @NgModule providers and imports into
ngInjectorDef statements in generated code. All @NgModule annotations
will be compiled and the @NgModule decorators removed from the
resultant js output.

All @Injectables will also be compiled in Ivy mode, and the decorator
removed.

PR Close #22458
2018-03-16 12:57:11 -07:00
Andrew Seguin 688096b7a3 feat(elements): remove attribute/input from config (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 2e450f6fda feat(elements): update package.json with latest (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 0b45dfac29 feat(elements): fix lint (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 167fdf745c feat(elements): rename API to createCustomElement (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 39a12d2c3d feat(elements): make bazel happy (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 87f60bccfd feat(elements): injector create (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 46efd4b938 feat(elements): George's comments (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 19368085aa feat(elements): provide type, not factory; remove config need (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin d2be675acc feat(elements): add tests for component factory strategy (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Andrew Seguin 22b96b9690 feat(elements): add support for creating custom elements (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Chuck Jazdzewski cedc04c320 docs(ivy): document project status (#22751)
Moves the status reporting from the issue #21706 to a file that
can be updated as changes are being made. This addresses one of the
comments on the issue and allows better tracking of updates to this
status and changes made.

PR Close #22751
2018-03-16 11:27:15 -07:00
Kara Erickson bafdad9083 fix(ivy): cache local names and support multiple locals with same value (#22807)
PR Close #22807
2018-03-16 11:26:38 -07:00
Kara Erickson 9220521149 test(ivy): correct export tests and add query test (#22807)
PR Close #22807
2018-03-16 11:26:38 -07:00
Jeremy Elbourn b149424b11 build(bazel): make ng_package auto generate package.json for secondary entry-points (#22806)
PR Close #22806
2018-03-15 21:18:27 -07:00
Oussama Ben Brahim 269c3a1908 build(compiler-cli): fix tsconfig.json circularity issue (#22722)
Fixes #22721

PR Close #22722
2018-03-15 21:18:07 -07:00
Alex Eagle f9247e4b2e build: enable importHelpers in tsconfig (#22812)
This is the primary tsconfig file used for Bazel builds.
Previously, we enabled this option only for releases.

PR Close #22812
2018-03-15 21:16:03 -07:00