angular-cn/packages/compiler-cli/ngcc
JoostK 6fbfb5a159 feat(ivy): ngcc - recognize static properties on the outer symbol in ES5 (#30795)
Packages that have been compiled using an older version of TypeScript
can have their decorators at the top-level of the ES5 bundles, instead
of inside the IIFE that is emitted for the class. Before this change,
ngcc only took static property assignments inside the IIFE into account,
therefore missing the decorators that were assigned at the top-level.

This commit extends the ES5 host to look for static properties in two
places. Testcases for all bundle formats that contain ES5 have been added
to ensure that this works in the various flavours.

A patch is included to support UMD bundles. The UMD factory affects how
TypeScripts binds the static properties to symbols, see the docblock of
the patch function for more details.

PR Close #30795
2019-06-14 13:09:56 -07:00
..
src feat(ivy): ngcc - recognize static properties on the outer symbol in ES5 (#30795) 2019-06-14 13:09:56 -07:00
test feat(ivy): ngcc - recognize static properties on the outer symbol in ES5 (#30795) 2019-06-14 13:09:56 -07:00
BUILD.bazel refactor(ivy): move metadata registration to its own package (#29698) 2019-04-19 11:15:25 -07:00
README.md refactor(ivy): move ngcc into a higher level folder (#29092) 2019-03-20 14:45:54 -04:00
index.ts feat(ivy): ngcc - support additional paths to process (#29643) 2019-04-29 12:37:21 -07:00
main-ngcc.ts refactor(ivy): ngcc - remove the last remnants of `path` and `canonical-path` (#29643) 2019-04-29 12:37:21 -07:00

README.md

Angular Compatibility Compiler (ngcc)

This compiler will convert node_modules compiled with ngc, into node_modules which appear to have been compiled with ngtsc.

This conversion will allow such "legacy" packages to be used by the Ivy rendering engine.

Building

The project is built using Bazel:

yarn bazel build //packages/compiler-cli/ngcc

Unit Testing

The unit tests are built and run using Bazel:

yarn bazel test //packages/compiler-cli/ngcc/test

Integration Testing

There are tests that check the behavior of the overall executable:

yarn bazel test //packages/compiler-cli/ngcc/test:integration