140 Commits

Author SHA1 Message Date
Tobias Bosch
ccc25ee901 fix: reformat files from previous cherry-picks 2017-10-05 13:54:46 -07:00
Tobias Bosch
3052063c05 refactor(compiler): remove stale metadata classes for animations
These are no longer needed as animations are a purely
runtime concept.
2017-10-05 13:54:46 -07:00
Victor Berchet
e107322f5c refactor(core): add a checkIndex to the compiler view nodes
Each node now has two index: nodeIndex and checkIndex.

nodeIndex is the index in both the view definition and the view data.
checkIndex is the index in in the update function (update directives and update
renderer).

While nodeIndex and checkIndex have the same value for now, having both of them
will allow changing the structure of view definition after compilation (ie for
runtime translations).
2017-10-05 13:54:46 -07:00
Victor Berchet
f0774254de refactor(compiler): misc minor refactor / cleanup (#19189)
PR Close #19189
2017-10-05 13:54:46 -07:00
Chuck Jazdzewski
95f3b1dbe6 fix(compiler): disallow references for select and index evaluation
Also fixes an issue where enum values of 0 or '``' where not treated
correctly.

Fixes: #18170
2017-10-04 14:54:53 -07:00
Olivier Combe
df91fd032d build: update npm dependencies 2017-10-04 10:22:48 -07:00
Chuck Jazdzewski
7fc2dceaf5 fix(compiler): do not consider a reference with members as a reference (#19466)
fixes: #18170
ref: #19454
2017-09-28 12:04:20 -07:00
Chuck Jazdzewski
c3b39bac52 fix(compiler): correctly map error message locations (#19424) 2017-09-28 10:55:17 -07:00
Pawel Kozlowski
c7aa8a132d fix(compiler): skip   when trimming / removing whitespaces (#19310)
Fixes #19304
2017-09-25 13:35:32 -07:00
Matias Niemelä
0bafd03e85 revert: test(packaging): added test for source map correctness
This reverts commit 86f7b4170cfe6b66e799ba0eebbf9b39e7fe6a25.
2017-09-15 11:55:29 -07:00
Kara Erickson
86f7b4170c test(packaging): added test for source map correctness 2017-09-13 13:48:36 -04:00
Olivier Combe
48ae1a6574 fix(tsc-wrapped): deduplicate metadata for re-exported modules 2017-09-07 16:06:12 -04:00
Pawel Kozlowski
b8b551cf2b perf(core): add option to remove blank text nodes from compiled templates (#18823)
PR Close #18823
2017-09-01 13:30:04 -05:00
Jeremy Elbourn
7ec28fe9af feat(compiler): allow multiple exportAs names (#18723)
This change allows users to specify multiple exportAs names for a
directive by giving a comma-delimited list inside the string.

The primary motivation for this change is to allow these names to be
changed in a backwards compatible way.

PR Close #18723
2017-09-01 13:26:10 -05:00
Victor Berchet
497e0178cc fix(compiler): normalize the locale name (#18963)
PR Close #18963
2017-08-30 17:48:08 -07:00
Matias Niemelä
ac58914b97 feat(animations): allow @.disabled property to work without an expression (#18713)
PR Close #18713
2017-08-18 23:32:13 -05:00
Marc Laval
e7e7622971 fix(compiler): ignore @import in multi-line css (#18452)
Fixes #18038
2017-08-03 11:01:24 -07:00
Chuck Jazdzewski
5e4054b8f3 fix(compiler): cleanly compile with TypeScript 2.4 (#18456) 2017-08-02 16:27:14 -07:00
Victor Berchet
baf4ce0dd0 build: enable TSLint on the packages folder (#18459)
porting PRs #18392 and #18441 to 4.x
2017-08-02 15:23:33 -07:00
Victor Berchet
f5cbc2ee25 fix(compiler): fix for element needing implicit parent placed in top-level ng-container
fixes #18314
2017-07-31 11:40:20 -07:00
Miško Hevery
45a10419bc Revert "build: Bazel builds ngfactories for packages/core (#18289)"
This reverts commit bcea1965301cf689b18448cdd9bf78c57bab7920.
2017-07-27 10:51:41 -07:00
Victor Berchet
2245748c14 test(compiler): fix xliff2 integration test for the 4.3 branch (#18363)
Closes #18363
2017-07-27 10:20:34 -07:00
Alex Eagle
bcea196530 build: Bazel builds ngfactories for packages/core (#18289)
PR Close #18289
2017-07-26 16:31:26 -07:00
Olivier Combe
a0846194b7 fix(compiler): add equiv & disp attributes to Xliff2 ICU placeholders (#18283)
Fixes #17344

PR Close #18283
2017-07-26 12:08:29 -05:00
Victor Berchet
a1e83a8ed2 test: fix bad merge (#18267)
PR Close #18267
2017-07-26 12:04:47 -05:00
Olivier Combe
a8ac77b645 fix(compiler): allow numbers for ICU message cases in lexer (#18095)
Closes #18095
Fixes #17799
2017-07-26 12:04:47 -05:00
Olivier Combe
f0476fcff0 fix(compiler-cli): don't generate empty <target/> when extracting xliff
Fixes #15754
2017-07-19 09:50:09 -07:00
Chuck Jazdzewski
4671168635 fix(compiler): ensure jit external id arguments names are unique
Fixes: #17558, #17378, #8676
2017-07-18 10:54:21 -07:00
Chuck Jazdzewski
ddb766e456 feat(compiler): do not evaluate metadata expressions that can use references (#18001) 2017-07-13 16:16:56 -07:00
Victor Berchet
c723d42d0a refactor: fix typos (#18000) 2017-07-07 16:55:17 -07:00
Victor Berchet
9c1f6fd06f fix(compiler): emits quoted keys only iff they are quoted in the original template
fixes #14292
2017-07-07 16:17:33 -07:00
Victor Berchet
798947efa4 feat(compiler): adds support for quoted object keys in the parser 2017-07-07 16:17:33 -07:00
Victor Berchet
7ae8ad6aab fix(compiler): fix types 2017-07-07 16:17:33 -07:00
Victor Berchet
9c3386b1b7 fix(compiler): remove i18n markup even if no translations (#17999)
Fixes #11042
2017-07-07 16:16:49 -07:00
Victor Berchet
dd7c1134e3 feat(compiler): update the schema by extracting from latest chrome (#17858)
adds:
- the slot element,
- the slot attribute on [Element],
- a few other attributes.
2017-07-06 12:11:34 -07:00
Victor Berchet
448d9f9f46 test(compiler): add a test for components not part of any NgModule 2017-06-26 13:24:36 -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
Victor Berchet
b754e600e3 feat(compiler): add support ::ng-deep
- /deep/ is deprecated and being removed from Chrome
- >>> is semantically invalid in a stylesheet
- sass will no longer support either in any version of sass

-> use ::ng-deep in emulated shadow DOM mode

Because the deep combinator is deprecated in the CSS spec,
`/deep/`, `>>>` and `::ng-deep` are also deprecated in emulated shadow DOM mode
and will be removed in the future.

see https://www.chromestatus.com/features/6750456638341120
2017-06-23 14:43:42 -07:00
Chuck Jazdzewski
81734cf7b6 refactor(compiler): add tracking comment for self-import detection
The underlying cause of #17386 needs to be investigated and as a
simple string compare should have been valid.
2017-06-23 14:43:24 -07:00
Chuck Jazdzewski
4352dd27c4 fix(compiler): avoid emitting self importing factories
Fixes: #17389
2017-06-21 16:19:43 -07:00
Trotyl Yu
9315ab88d7 test(compiler): fix typo "mamespace" 2017-06-16 11:17:15 -07:00
olegdunkan
93d1b4ed9d refactor(compiler): remove duplicate code 2017-06-13 13:37:33 -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
Georgios Kalpakas
022835bab2 ci: update Chromium to 464641 (Chrome v59) 2017-06-08 09:36:35 -07:00
Alex Eagle
b00b80a45b feat(compiler-cli): introduce synchronous codegen API 2017-06-06 14:12:02 -07:00
Chuck Jazdzewski
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
Andrew Mitchell
8ffa483bb6 fix(compiler): enableLegacyTemplate should not be ignored (#17051)
Fixes #15555
2017-05-30 13:19:42 -07:00
Chuck Jazdzewski
18bf77204e feat(compiler): emit typescript nodes from an output ast (#16823) 2017-05-30 10:43:13 -07:00
Tobias Bosch
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
Jason Aden
fa809ec8cf build: import tslib rather than output TS helpers (#16901) 2017-05-23 14:01:39 -06:00