angular/packages/compiler-cli/ngcc/src
George Kalpakas 2bc3522e16 refactor(ngcc): make it easy to support more UMD wrapper function formats
Previously, ngcc could only handle UMD modules whose wrapper function
was implemented as a `ts.ConditionalExpression` (i.e. using a ternary
operator). This is the format emitted by popular bundlers, such as
Rollup. However, this failed to account for a different format, using
`if/else` statements, such as the one [emitted by Webpack][1].

This commit prepares ngcc for supporting different UMD wrapper function
formats by decoupling the operation of parsing the wrapper function body
to capture the various factory function calls and that of operating on
the factory function calls (for example, to read or update their
arguments). In a subsequent commit, this will be used to add support for
the Webpack format.

[1]: https://webpack.js.org/configuration/output/#type-umd
2021-11-26 19:54:13 +02:00
..
analysis refactor(ngcc): remove Ivy switch marker transform (#43891) 2021-11-24 19:26:25 +00:00
dependencies refactor: remove remaining dynamic require usages in package output (#43431) 2021-10-01 18:28:45 +00:00
entry_point_finder refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
execution refactor: delete the View Engine runtime (#43884) 2021-11-23 21:10:06 +00:00
host refactor(ngcc): make it easy to support more UMD wrapper function formats 2021-11-26 19:54:13 +02:00
locking fix(ngcc): ensure that ngcc does not write a lock-file into node_modules package directories (#44228) 2021-11-22 17:55:13 +00:00
migrations refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
packages refactor(ngcc): remove Ivy switch marker transform (#43891) 2021-11-24 19:26:25 +00:00
rendering refactor(ngcc): make it easy to support more UMD wrapper function formats 2021-11-26 19:54:13 +02:00
writing refactor(compiler-cli): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07:00
command_line_options.ts refactor: update yargs to new API for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
constants.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
main.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
ngcc_options.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
path_mappings.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
utils.ts refactor(ngcc): remove Ivy switch marker transform (#43891) 2021-11-24 19:26:25 +00:00