angular/packages/compiler/src
JoostK 1f73af77a7 refactor(compiler-cli): use ngDevMode guard for setClassMetadata call (#39987)
Prior to this change, the `setClassMetadata` call would be invoked
inside of an IIFE that was marked as pure. This allows the call to be
tree-shaken away in production builds, as the `setClassMetadata` call
is only present to make the original class metadata available to the
testing infrastructure. The pure marker is problematic, though, as the
`setClassMetadata` call does in fact have the side-effect of assigning
the metadata into class properties. This has worked under the assumption
that only build optimization tools perform tree-shaking, however modern
bundlers are also able to elide calls that have been marked pure so this
assumption does no longer hold. Instead, an `ngDevMode` guard is used
which still allows the call to be elided but only by tooling that is
configured to consider `ngDevMode` as constant `false` value.

PR Close #39987
2020-12-10 13:23:13 -08:00
..
aot fix(compiler): Metadata should not include methods on Object.prototype (#38292) 2020-07-30 15:18:28 -07:00
compiler_util refactor(compiler): store the fullStart location on ParseSourceSpans (#39486) 2020-11-06 09:01:37 -08:00
css_parser build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
expression_parser fix(compiler): handle strings inside bindings that contain binding characters (#39826) 2020-12-10 11:11:21 -08:00
i18n docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
jit docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
ml_parser docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
output feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
render3 refactor(compiler-cli): use ngDevMode guard for setClassMetadata call (#39987) 2020-12-10 13:23:13 -08:00
schema feat(compiler): add schema for Trusted Types sinks (#39554) 2020-11-23 08:29:04 -08:00
template_parser refactor(compiler-cli): add keySpan to parsed events (#39609) 2020-11-12 15:09:17 -08:00
view_compiler build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
assertions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ast_path.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
chars.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_metadata.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler.ts refactor(compiler-cli): use ngDevMode guard for setClassMetadata call (#39987) 2020-12-10 13:23:13 -08:00
compiler_facade_interface.ts feat(compiler-cli): support for partial compilation of components (#39707) 2020-11-24 13:05:49 -08:00
config.ts refactor(compiler): remove extra imports (#37246) 2020-06-11 19:00:33 -07:00
constant_pool.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
core.ts feat(core): remove ViewEncapsulation.Native (#38882) 2020-10-08 11:56:03 -07:00
directive_normalizer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
identifiers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler_2.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
jit_compiler_facade.ts feat(compiler-cli): support for partial compilation of components (#39707) 2020-11-24 13:05:49 -08:00
lifecycle_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parse_util.ts refactor(compiler): store the fullStart location on ParseSourceSpans (#39486) 2020-11-06 09:01:37 -08:00
pipe_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
provider_analyzer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
resource_loader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
selector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadow_css.ts fix(compiler): incorrectly encapsulating @import containing colons and semicolons (#38716) 2020-10-09 08:33:04 -07:00
style_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_url_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
summary_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_resolver.ts docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
util.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00