angular-cn/tools/public_api_guard
Alex Rickabaugh 23b06af940 fix(core): export a value for InjectFlags (#27279)
A recent commit (probably 2c7386c) has changed the import graph of the
DI types in core, and somehow results in the ngc compiler deciding to
re-export core DI types from application factories which tangentially
use inject(). This is not really surprising; ngc's import graph can be
very unstable.

However, this results in a re-export of InjectFlags surviving JS
compilation. InjectFlags was a const enum, akin to an interface in TS,
with no runtime repesentation. This causes a warning to be emitted by
Webpack when it sees the re-export of InjectFlags.

This commit avoids the issue by removing 'const' from the declaration
of InjectFlags, causing it to have a runtime value. This is a temporary
fix. The real fix will be for ngc to no longer write exports of const
enums.

Testing strategy: manually verified. Due to the problem only manifesting
when recompiling after a change and then running Webpack, there is no
existing framework via which this could be easily tested with an
integration test. Additionally, the potential for this issue is gone in
Ivy, so this solution is only temporarily needed.

Fixes #27251.

PR Close #27279
2018-11-27 13:40:39 -08:00
..
animations docs: update animations to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
common docs: common with `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
core fix(core): export a value for InjectFlags (#27279) 2018-11-27 13:40:39 -08:00
elements docs: update elements to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
forms feat(forms): add updateOn option to FormBuilder (#24599) 2018-11-01 15:31:11 -07:00
http docs(http): move examples to `@usageNotes` (#26039) 2018-09-24 09:11:02 -07:00
platform-browser docs: update platform-browser with `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
platform-browser-dynamic docs: update platform-browser-dynamic to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform-server docs: update platform-server to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform-webworker docs: update platform-webworker to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform-webworker-dynamic docs: update platform-webworker to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
router feat(router): add pathParamsChange mode for runGuardsAndResolvers (#26861) 2018-11-14 12:24:43 -08:00
service-worker fix(service-worker): Fix public api guard typing (#25860) 2018-11-01 15:13:33 -07:00
upgrade feat(upgrade): support downgrading multiple modules (#26217) 2018-11-05 16:33:55 -08:00
BUILD.bazel test(ivy): add global utils to the public_api_guard test (#27008) 2018-11-08 15:37:11 -08:00
global_utils.d.ts fix(ivy): align discovery methods for consistency (#27117) 2018-11-20 11:44:14 -08:00
public_api_guard.bzl build(ivy): remove the remains of ivy-jit mode (#27278) 2018-11-27 10:30:58 -08:00