89 Commits

Author SHA1 Message Date
Chuck Jazdzewski
cb16e9c747 fix(tsc-wrapped): emit exports metadata in flat modules (#17893)
Fixes: #17888
2017-07-07 08:46:42 -07:00
Chuck Jazdzewski
3097083277 feat(compiler-cli): new compiler api and command-line using TypeScript transformers 2017-06-23 16:18:44 -07:00
Chuck Jazdzewski
46ddf501a9 fix(tsc-wrapped): skip collecting metadata for default functions
Fixes: #17518
2017-06-20 14:22:49 -07:00
Tobias Bosch
ed73d4f3ac refactor(compiler): don’t always compile .ngfactory.ts files by default
This puts the behavior introduced in 573b8611bc behind the new flag
`alwaysCompileGeneratedCode` to not break users that might have relied
on this behavior.
2017-06-12 15:27:02 -07:00
Tobias Bosch
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
Paul Gschwendtner
ea8a43def0 feat(tsc-wrapped): always convert shorthand imports (#16898)
Now converts shorthand imports for every TypeScript target. Tsickle is able to expand index shorthand imports for every TypeScript target and module possibility.

Expanding shorthand imports for CommonJS modules is also helpful when testing in the browser. Module loaders like SystemJS are not able to understand directory imports (or index shorthand imports)
2017-05-30 10:46:54 -07:00
Tobias Bosch
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
Chuck Jazdzewski
1651a8f189 fix(tsc-wrapped): ignore |null and |undefined when collecting types (#16222) 2017-05-23 11:53:38 -06:00
Chuck Jazdzewski
6e41add867 feat(tsc-wrapped): support template literals in metadata collection (#16880)
Fixes: #16876
2017-05-22 12:19:09 -06:00
Chuck Jazdzewski
11c10b2ab8 fix(tsc-wrapped): resolve short-hand literal values to locals (#16873)
Fixes: #16872
2017-05-22 11:18:44 -06:00
Olivier Combe
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
Victor Berchet
cd29d68f3c refactor(tsc-wrapped): cleanup (#16178)
PR Close #16178
2017-04-19 22:46:23 -05:00
Victor Berchet
014594fe8f feat: add support for TS 2.3 2017-04-18 08:28:55 -07:00
Chuck Jazdzewski
70b1d6dd9d fix(tsc-wrapped): collect new expressions with no arguments (#15908)
Fixes #15906
2017-04-13 11:53:26 -07:00
Paul Gschwendtner
96aa2365ae fix(tsc-wrapped): ensure valid path separators in metadata
* Fixes that `tsc-wrapped` stores invalid path separators in the bundled metadata files. Previous errors could have been: `Cannot find module '.corecoordinationnique-selection-dispatcher'.` (See https://github.com/angular/material2/issues/3834)
* Fixes failing tests on Windows. Now all tooling tests are green on Windows.

Related to #15403
2017-04-10 16:01:38 -06:00
Chuck Jazdzewski
c58499786c fix(tsc-wrapped): use windows friendly path normalization in bundler (#15374)
Fixes #15289

PR Close #15374
2017-03-21 22:30:57 -05:00
Chuck Jazdzewski
7354949763 feat(tsc-wrapped): record original location of flattened symbols (#15367)
Added an "origins" section to the flat module `.metadata.json` files
that records where the original symbols was declared. This allows
correctly calculating relative path references recorded in metadata.
2017-03-21 19:05:00 -05:00
Chuck Jazdzewski
6e9264a79c fix(tsc-wrapped): emit flat module format correctly on Windows (#15215)
File name needed to be normalized before comparison when using
synthetic file names.

Fixes #15192

PR Close #15215
2017-03-17 15:35:28 -05:00
Tobias Bosch
c0e05e6f03 fix(tsc-wrapped): emit js files in all cases 2017-03-16 12:56:56 -07:00
Chuck Jazdzewski
b00fe20afd fix(compiler): support interface types in injectable constuctors (#14894)
Fixes #12631
2017-03-15 09:24:56 -07:00
Lucas Sloan
5c0ea20bd0 build(tsc-wrapped): use tsickleCompilerHost for initial file load
In order for tsickle's new support for input source maps to work, the tsickleCompilerHost must be used for the initial load of source files, since that's when the inline source maps are read and stripped.
2017-03-15 09:23:36 -07:00
Tobias Bosch
1cff1250ba refactor: remove old compiler options (#14891)
DEPRECATION:
- `CompilerOptions.debug` has no effect any more, as the compiler
  always produces the same code independent of debug mode.
2017-03-07 11:16:27 -08:00
Miško Hevery
f2adb2900d refactor: remove the symlink hack from tsc-wrapped (#14837) 2017-03-06 15:22:33 -08:00
Miško Hevery
8343fb7740 refactor: remove lang.ts (#14837) 2017-03-06 15:22:29 -08:00
Chuck Jazdzewski
a6996a9cdd fix(tsc-wrapped): validate metadata in static members of a class (#14772)
Fixes #13481
2017-03-01 14:45:00 -08:00
Chuck Jazdzewski
6bae7378b1 fix(language-service): tolerate errors in decorators (#14634)
Fixes #14631
2017-03-01 13:23:34 -08:00
Marc Laval
39f56fafdd feat(compiler-cli): add an outFile option to ng-xi18n
Fixes #11416
Closes #14508
Closes #14657
2017-02-23 20:39:46 -08:00
Marc Laval
234f05996c feat(compiler-cli): add a locale option to ng-xi18n
Fixes #12303
Closes #14537
2017-02-23 20:39:46 -08:00
Victor Berchet
e99d721612 feat(compiler): Add a enableLegacyTemplate option to support <template>
When the `enableLegacyTemplate` is set to `false`, `<template>` tags and the
`template` attribute are no more used to define angular templates but are
treated as regular tag and attribute.

The default value is `true`.

In order to define a template, you have to use the `<ng-template>` tag.

This option applies to your application and all the libraries it uses. That is
you should make sure none of them rely on the legacy way to defined templates
when this option is turned off (`false`).
2017-02-23 20:03:16 -08:00
Jason Aden
c53621be8e build: resolve review comments on flat modules PR and fix more bugs (#14660) 2017-02-23 16:39:44 -08:00
Chuck Jazdzewski
c9bfc59a21 fix(tsc-wrapped): use agreed on options names (#14630) 2017-02-22 10:57:01 -08:00
Chuck Jazdzewski
fcc1d17ccb fix(compiler-cli): avoid generating unnecessary factories 2017-02-21 20:48:55 -08:00
Jason Aden
de795ea233 perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015
code, providing an initial optimization that we couldn't previously get just from Uglify. Uses
Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
2017-02-21 20:48:55 -08:00
Chuck Jazdzewski
3b896709a9 feat(tsc-wrapped): add an option to ngc to bundle metadata (#14509)
Closes #14509
2017-02-16 08:15:30 -08:00
Alex Eagle
ef32e6b0d0 fix: build and test fixes for TS 2.1 (#13294) 2017-02-08 11:32:40 -06:00
Lucas Sloan
5bccff0d7a fix(tsc-wrapped): use tsickle's new source map composition feature (#14150)
Tsickle transforms typescript code, which can change the location of code.
This can cause issues such as runtime stack traces reporting that errors
were raised on the incorrect line in the orginal source.  This change replaces
the DecoratorDownlevelCompilerHost and the TsickleCompilerHost with tsickle's
TsickleCompilerHost, which automatically composes tsickle's source maps with
typescript's source maps, so that line numbers are correctly reported at
runtime.

PR Close #14150
2017-02-07 16:16:29 -06:00
Chuck Jazdzewski
1079b9381c feat(tsc-wrapped): record arity of generic classes (#14104) 2017-02-01 09:29:51 -06:00
jolly-roger
0c7726dd74 feat(tsc-wrapped): Support of vinyl like config file was added (#13987)
This feature was implemented in order to provide easier way of use in gulp
2017-01-24 12:51:14 -08:00
Alex Eagle
f816319e41 feature(tsc-wrapped): accept any tsc command line option (#13471) 2017-01-17 18:26:29 -06:00
Alex Eagle
5047d9780d feature(tsc-wrapped): re-write /index imports for closure compiler (#13471) 2017-01-17 18:26:19 -06:00
Chuck Jazdzewski
8063b0d9a2 fix(language-service): support TypeScript 2.1 (#13655)
@angular/language-service now supports using TypeScript 2.1 as the
the TypeScript host. TypeScript 2.1 is now also partially supported
in `ngc` but is not recommended as Tsickle does not yet support 2.1.
2017-01-05 11:34:42 -08:00
Victor Berchet
eed83443b8 chore(tslint): update tslint to 4.x (#13603) 2016-12-27 14:55:58 -08:00
Chuck Jazdzewski
0e3981afc1 fix(compiler-cli): produce metadata for .d.ts files without metadata (#13526)
Fixes #13307
Fixes #13473
Fixes #13521
2016-12-16 15:33:47 -08:00
Chuck Jazdzewski
b6078f5887 fix(compiler): update to metadata version 3 (#13464)
This change retracts support for metadata version 2.

The collector used to produce version 2 metadata was incomplete
and can cause the AOT compiler to fail to resolve symbols or
produce other spurious errors.

All libraries compiled and published with 2.3.0 ngc will need
to be recompiled and updated with this change.
2016-12-14 15:28:51 -08:00
Victor Berchet
40d8d9c3e3 fix(tsc-wrapped): generate metadata for exports without module specifier
fixes #13327
2016-12-14 14:33:04 -08:00
Chuck Jazdzewski
dd0519abad fix(compiler): emit quoted object literal keys if the source is quoted
feat(tsc-wrapped): recored when to quote a object literal key

Collecting quoted literals is off by default as it introduces
a breaking change in the .metadata.json file. A follow-up commit
will address this.

Fixes #13249
Closes #13356
2016-12-14 12:58:41 -08:00
Hans
d62d89319e fix(compiler): generated CSS files suffixed with ngstyle. (#13353)
Mirrors factories which ends in `ngfactory`.

Closes #13141.
2016-12-13 17:34:46 -08:00
Victor Berchet
393c1007a8 fix(tsc-wrapped): have UserError display the actual error 2016-12-06 10:40:38 -08:00
Bowen Ni
9761db5ac2 refactor(compiler): change ngc error handling
Do not print stack trace for user errors
Print stack trace for compiler internal errors
2016-12-02 14:31:55 -08:00
Tobias Bosch
bc69c74be0 fix(tsc-wrapped): still emit version 1 metadata to allow to use new components in old setups 2016-11-28 15:18:57 -08:00