21 Commits

Author SHA1 Message Date
Olivier Combe
b6b18c1d7f fix(tsc-wrapped): deduplicate metadata only when the module is the same ()
Fixes 
PR Close 
2017-09-18 21:15:49 -07:00
Tobias Bosch
ca5aebaa6b refactor: update angular to support TypeScript 2.4
Detailed updates:
- rxjs@5.0.x
- tsickle@0.24.x
- typescript@2.4.x
- @bazel/typescript@0.10.0
- protractor@5.1.x
- selenium-webdriver@3.0.x

BREAKING CHANGE:
- the Angular compiler now requires TypeScript 2.4.x.
2017-09-12 10:31:30 -07:00
Olivier Combe
626555c013 fix(tsc-wrapped): fix metadata symbol reference 2017-09-08 16:20:12 -04:00
Olivier Combe
c056b8c7f1 fix(tsc-wrapped): deduplicate metadata for re-exported modules 2017-09-07 14:21:25 -04:00
Olivier Combe
3c4eef8a86 refactor(core): remove deprecated OpaqueToken ()
BREAKING CHANGE: `OpaqueToken` has been removed as it was deprecated since v4. Use `InjectionToken` instead.
PR Close 
2017-09-01 16:29:47 -05:00
Alex Eagle
d1afadbd22 fix(tsc-wrapped): decouple bundle index host from tsickle dependency ()
PR Close 
2017-09-01 13:40:08 -05:00
Olivier Combe
56238fe94e feat(compiler): set enableLegacyTemplate to false by default ()
BREAKING CHANGE: the compiler option `enableLegacyTemplate` is now disabled by default as the `<template>` element has been deprecated since v4. Use `<ng-template>` instead. The option `enableLegacyTemplate` and the `<template>` element will both be removed in Angular v6.
PR Close 
2017-08-31 18:38:34 -07:00
Jason Aden
fd701b07f0 build: publish tree of files rather than FESMs ()
* Remove now unnecessary portions of build.
* Add a compilePackageES5 method to build ES5 from sources
* Rework all package.json and rollup config files to new format
* Remove "extends" from tsconfig-build.json files and fixup compilation roots

PR Close 
2017-08-31 15:34:50 -07:00
Chuck Jazdzewski
0e64261f26 feat(compiler-cli): lower metadata useValue and data literal fields ()
With this commit the compiler will "lower" expressions into exported
variables for values the compiler does not need to know statically
in order to be able to generate a factory. For example:

```
  providers: [{provider: 'token', useValue: calculated()}]
```

produced an error as the expression `calculated()` is not supported
by the compiler because `calculated` is not a
[known function](https://angular.io/guide/metadata#annotationsdecorators)

With this commit this is rewritten, during emit of the .js file, into
something like:

```
export var ɵ0 = calculated();

  ...

  provdiers: [{provider: 'token', useValue: ɵ0}]
```

The compiler then will now generate a reference to the exported `ɵ0`
instead of failing to evaluate `calculated()`.

PR Close 
2017-08-31 09:46:16 -07:00
Jason Aden
c7e1bda32f Revert "feat(compiler-cli): lower metadata useValue and data literal fields ()"
This reverts commit c685cc2f0a1e9a382051eceb4632504972dc95ab.
2017-08-30 19:02:17 -07:00
Chuck Jazdzewski
c685cc2f0a feat(compiler-cli): lower metadata useValue and data literal fields ()
With this commit the compiler will "lower" expressions into exported
variables for values the compiler does not need to know statically
in order to be able to generate a factory. For example:

```
  providers: [{provider: 'token', useValue: calculated()}]
```

produced an error as the expression `calculated()` is not supported
by the compiler because `calculated` is not a
[known function](https://angular.io/guide/metadata#annotationsdecorators)

With this commit this is rewritten, during emit of the .js file, into
something like:

```
export var ɵ0 = calculated();

  ...

  provdiers: [{provider: 'token', useValue: ɵ0}]
```

The compiler then will now generate a reference to the exported `ɵ0`
instead of failing to evaluate `calculated()`.

PR Close 
2017-08-30 18:00:38 -07:00
Pawel Kozlowski
8ea6c56fe1 fix(compiler-cli): propagate preserveWhitespaces option to codegen ()
PR Close 
2017-08-21 17:32:10 -05:00
Olivier Combe
499d05ddee refactor(compiler): remove option useDebug ()
BREAKING CHANGE: the option `useDebug` for the compiler has been removed as it had no effect and was deprecated since v4.

PR Close 
2017-08-18 17:13:16 -05:00
Alan Agius
6e3498ca8e fix(tsc-wrapped): add metadata for type declarations ()
Closes 

test(tsc-wrapped): fix collector tests

refactor(tsc-wrapped): change `__symbolic` to `interface` for `TypeAliasDeclaration`

tsc-wrapped: reword test

PR Close 
2017-08-17 18:01:10 -05:00
Tobias Bosch
27d901a51d refactor(compiler-cli): cleanup API for transformer based ngc
This is in preparation for watch mode.
2017-08-11 13:20:45 -07:00
Victor Berchet
9479a106bb build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
Chuck Jazdzewski
67dff7bd5d feat(tsc-wrapped): allow values to be substituted by collector clients
Also reenabled tests that were unintentionally disabled when they were
moved from tools/@angular.
2017-07-31 11:30:44 -07:00
Alex Eagle
6fc5940959 build: Bazel builds ngfactories for packages/core ()
PR Close 
2017-07-21 18:09:47 -05:00
Miško Hevery
b7a6f52d59 perf: latest tsickle to tree shake: abstract class methods & interfaces ()
In previous version of tsickle abstract class methods were materialized.
The change resulted in 6Kb savings in angular.io bundle.

This change also required the removal of `@private` and `@return` type
annotation as it is explicitly dissalowed by tsickle.

NOTE: removed casts in front of `makeDecorator` due to:
https://github.com/angular/devkit/issues/45

```
 14938 Jul 19 13:16 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 19 13:16 inline.d8e019ea3cfdd86c2bd0.bundle.js
589178 Jul 19 13:16 main.54c97bcb6f254776b678.bundle.js
 34333 Jul 19 13:16 polyfills.4a3c9ca9481d53803157.bundle.js

 14938 Jul 18 16:55 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 18 16:55 inline.0c83abb44fad9a2768a7.bundle.js
582786 Jul 18 16:55 main.ea290db71b051813e156.bundle.js
 34333 Jul 18 16:55 polyfills.4a3c9ca9481d53803157.bundle.js

main savings: 589178 - 582786 = 6,392
```

PR Close 
2017-07-21 16:35:37 -05:00
Chuck Jazdzewski
abee785821 refactor(tsc-wrapped): update tsc-wrapped to pass strictNullCheck ()
PR Close 
2017-07-21 12:26:20 -05:00
Chuck Jazdzewski
619e625ee2 refactor(tsc-wrapped): move tsc-wrapped to the packages directory () 2017-07-21 12:26:16 -05:00