Commit Graph

898 Commits

Author SHA1 Message Date
b6c4af6495 feat(compiler-cli): automatically lower lambda expressions in metadata 2017-07-31 11:30:44 -07:00
d20ac14fe2 refactor(compiler-cli): allow custom error checking function in ngc (#18355)
PR Close #18355
2017-07-26 17:55:31 -05:00
ce47546188 refactor(compiler-cli): add support for browser compiler bundle (#17979)
PR Close #17979
2017-07-25 15:51:46 -05:00
6fc5940959 build: Bazel builds ngfactories for packages/core (#18289)
PR Close #18289
2017-07-21 18:09:47 -05:00
b7a6f52d59 perf: latest tsickle to tree shake: abstract class methods & interfaces (#18236)
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 #18236
2017-07-21 16:35:37 -05:00
abee785821 refactor(tsc-wrapped): update tsc-wrapped to pass strictNullCheck (#18160)
PR Close #18160
2017-07-21 12:26:20 -05:00
671a175dfb fix(compiler-cli): fix relative source paths on windows for extracted msg (#17915)
Fixes #16639
2017-07-07 16:33:40 -07:00
c1474f33be feat(compiler-cli): add parameters to ngc main needed by bazel rules (#17885) 2017-07-07 16:29:39 -07:00
9c3386b1b7 fix(compiler): remove i18n markup even if no translations (#17999)
Fixes #11042
2017-07-07 16:16:49 -07:00
2ba3ada27f revert: "refactor(compiler-cli): remove the dependency on fs in codegen.ts (#17738)"
This reverts commit b116901400.
2017-07-07 16:16:25 -07:00
227dbbcfba fix(language-service): ignore hover of symbols not in the TypeScript program (#17969)
Fixes: #17965
2017-07-07 08:47:28 -07:00
b116901400 refactor(compiler-cli): remove the dependency on fs in codegen.ts (#17738) 2017-07-06 12:11:21 -07:00
3097083277 feat(compiler-cli): new compiler api and command-line using TypeScript transformers 2017-06-23 16:18:44 -07:00
4352dd27c4 fix(compiler): avoid emitting self importing factories
Fixes: #17389
2017-06-21 16:19:43 -07:00
8c89cc4fc5 fix(compiler-cli): find lazy routes in nested module import arrays
Fixes: #17531
2017-06-20 14:21:14 -07:00
f194f18dbd fix(language-service): infer any ngForOf of type any
Fixes: #17611
2017-06-20 12:04:51 -07:00
90b0713e32 refactor(compiler): don’t write summaries for jit by default
The default is false externally but true internally at Google.
2017-06-09 15:58:53 -07:00
b00b80a45b feat(compiler-cli): introduce synchronous codegen API 2017-06-06 14:12:02 -07:00
230255f887 feat(compiler-cli): produce template diagnostics error messages (#17125)
Refactoring the compiler to use transformers moves the code generation
after type-checking which suppresses the errors TypeScript would
generate in the user code.

`TypeChecker` currently produces the same factory code that was
generated prior the switch to transfomers, getting back the same
diagnostics as before. The refactoring will allow the code to
diverge from the factory code and allow better diagnostic error
messages than was previously possible by type-checking the factories.
2017-06-01 10:13:50 -07:00
18bf77204e feat(compiler): emit typescript nodes from an output ast (#16823) 2017-05-30 10:43:13 -07:00
7ffb75f476 refactor(compiler): change bundle to flatModuleIndex in the code (#17028) 2017-05-26 09:13:28 -07:00
80e506563c Revert "refactor(compiler): change bundle to flatModuleIndex in the code (#17028)"
This reverts commit 5aa53d70aa.
2017-05-26 08:54:50 -07:00
5aa53d70aa refactor(compiler): change bundle to flatModuleIndex in the code (#17028) 2017-05-25 19:02:35 -06:00
573b8611bc fix(compiler): compile .ngfactory.ts files even if nobody references them. (#16899)
This is especially important for library authors, as they will
not reference the .ngfactory.ts files.

Fixes #16741
2017-05-25 11:00:26 -06:00
eba59aaf87 refactor(compiler): add ability to produce stub .ngfactory / .ngsummary files (#16963)
These files are needed so that:
- user code can compile even without real codegen
- as tsc transformers cannot create but only change existing files
  in the transformation pipeline.
2017-05-23 14:40:50 -06:00
5af143e8e4 refactor(compiler): allow sync AOT compilation (#16832).
AOT compilation can be executed synchronously now,
if the `ReosurceLoader` returns a string directly
(and no `Promise`).
2017-05-23 10:41:23 -06:00
50abca4583 refactor(compiler): don’t rely on global reflector (#16832)
Using the global reflector made it impossible
to compile multiple programs at the same time.
2017-05-23 10:41:23 -06:00
de8d7c65f2 refactor(compiler): emit OutputAst and not sources (#16832)
This is in preparation for creating typescript nodes
directly from `OutputAst` nodes.
2017-05-23 10:41:23 -06:00
d761059e4d fix(compiler-cli): allow '==' to compare nullable types (#16731)
Fixes: #16729

* fix(compiler-cli): diagnose issues in conditional of ternary

Fixes: #16730
2017-05-16 16:36:51 -07:00
1eba623d12 fix(compiler-cli): import routing module with forRoot (#16438) 2017-05-15 13:11:39 -07:00
b9521b568f feat(compiler): support a non-null postfix assert (#16672)
Template expressions can now use a post-fix `!` operator
that asserts the target of the operator is not null. This is
similar to the TypeScript non-null assert operator. Expressions
generated in factories will be generated with the non-null assert
operator.

Closes: #10855
2017-05-11 10:15:54 -07:00
bb0902c592 refactor(compiler-cli): move the expression expression type checker (#16562)
The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
2017-05-09 16:16:50 -07:00
547c363473 feat: add .ngsummary.ts files to support AOT unit tests
Design doc: https://docs.google.com/document/d/1VmTkz0EbEVSWfEEWEvQ5sXyQXSCvtMOw4t7pKU-jOwc/edit?usp=sharing
2017-05-05 13:23:53 -04:00
6e2abcd5fc feat(compiler-cli): add param to set MissingTranslationStrategy on ngc (#15987)
This commit adds a new parameter to ngc named `missingTranslation`  to set the MissingTranslationStrategy for AoT, it takes the value `error`, `warning` or `ignore`.

Fixes #15808

PR Close #15987
2017-04-27 17:38:59 -05:00
11b0213d20 fix(compiler): suppress another closure warning (#16137)
closure compiler warns in generated .ngfactory.ts files:
```
WARNING - property createInternal already defined on superclass module$contents$..$core$src$linker$ng_module_factory_NgModuleInjector; use @override to override it
```

PR Close #16137
2017-04-19 22:46:32 -05:00
4054055d0d feat(compiler): add source files to xmb/xliff translations (#14705)
Fixes #14190
2017-04-14 09:06:25 -07:00
09c4cb2540 feat(compiler): Implement i18n XLIFF 2.0 serializer (#14185)
- Ensure that the result passes OASIS XLIFF 2.0 schema validation
- Use <ph/> for self-closing placeholder tags
- Use <pc></pc> for other placeholder tags
- Check for the correct XLIFF file version
- Add ICU support

fixes #11735
2017-04-14 09:05:00 -07:00
09d9f5fe54 fix(compiler): Update types for TypeScript nullability support 2017-04-10 15:26:33 -06:00
8ef621ad2a fix(compiler): fix inheritance for AOT with summaries (#15583)
Allows to inherit ctor args, lifecycle hooks and statics from a class
in another compilation unit. 
Will error if trying to inherit from a class in another compilation unit 
that has an `@Component` / `@Directive` / `@Pipe` / `@NgModule`.
2017-03-30 14:51:29 -07:00
910c0d9ee7 fix(core): Update types for TypeScript nullability support (#15472) 2017-03-29 09:34:45 -07:00
6269d28bb0 fix(language-service): improve performance of updateModuleAnalysis() (#15543) 2017-03-28 13:32:46 -07:00
816b389759 docs: in doc comments, replace [aA]ngular2 with Angular (#15463) 2017-03-27 09:44:35 -07:00
a50d79df47 fix(compiler-cli): adding missing format xliff for the extractor (#15386)
To generate XLF files with ng-xi18n we could use the format parameter "xlf" or "xlif". The real name is "xliff" not "xlif", so this probably was a typo. This PR adds "xliff" as can be expected
2017-03-22 15:12:02 -07:00
16e0423085 revert: feat(compiler-cli): support metadata file aliases (#15331)
This reverts commit 0ab49d4cec.

PR Close #15331
2017-03-21 12:20:14 -05:00
410aa33005 build: fix paths to typings files so tsickle resolves imports correctly
Fixes #15080
2017-03-16 17:34:29 -07:00
0ab49d4cec feat(compiler-cli): support metadata file aliases 2017-03-16 17:34:29 -07:00
492153a986 fix(compiler): make sourcemaps work in AOT mode
Inlcuded fixes:
- include preamble in generated source map
- always add a mapping for line/col 0 so that the
  generated sourcemap is not sparse
- use a uniue sourceUrl for inline templates even
  in the AOT case
2017-03-16 12:56:56 -07:00
3e51a19983 refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00