angular-cn/integration/ngcc
George Kalpakas 033aba9351 fix(ngcc): do not emit ES2015 code in ES5 files (#33514)
Previously, ngcc's `Renderer` would add some constants in the processed
files which were emitted as ES2015 code (e.g. `const` declarations).
This would result in invalid ES5 generated code that would break when
run on browsers that do not support the emitted format.

This commit fixes it by adding a `printStatement()` method to
`RenderingFormatter`, which can convert statements to JavaScript code in
a suitable format for the corresponding `RenderingFormatter`.
Additionally, the `translateExpression()` and `translateStatement()`
ngtsc helper methods are augmented to accept an extra hint to know
whether the code needs to be translated to ES5 format or not.

Fixes #32665

PR Close #33514
2019-11-13 13:49:31 -08:00
..
src test(ivy): ngcc - test compiling the Angular Material library (#26403) 2018-11-01 14:13:26 -07:00
debug-test.sh test(ivy): ngcc - test compiling the Angular Material library (#26403) 2018-11-01 14:13:26 -07:00
package.json test(ngcc): build `zone.js` from source in `scripts/build-packages-dist.sh` (#33733) 2019-11-12 09:55:16 -08:00
test.sh fix(ngcc): do not emit ES2015 code in ES5 files (#33514) 2019-11-13 13:49:31 -08:00
tsconfig-app.json test(ivy): add an integration test for ngcc (#25406) 2018-08-22 19:28:56 -04:00
yarn.lock test(ngcc): build `zone.js` from source in `scripts/build-packages-dist.sh` (#33733) 2019-11-12 09:55:16 -08:00