angular-cn/packages/compiler-cli/test
Paul Gschwendtner 105cfaf5e4 fix(compiler-cli): incorrect metadata bundle for multiple unnamed re-exports (#29360)
Currently if an Angular library has multiple unnamed module re-exports, NGC will
generate incorrect metdata if the project is using the flat-module bundle option.

e.g.

_public-api.ts_
```ts
export * from '@mypkg/secondary1';
export * from '@mypkg/secondary2';
```

There are clearly two unnamed re-exports in the `public-api.ts` file. NGC right now
accidentally overwrites all previous re-exports with the last one. Resulting in the
generated metadata only containing a reference to `@mypkg/secondary2`.

This is problematic as it is common for primary library entry-points to have
multiple re-exports (e.g. Material re-exporting all public symbols; or flex-layout
exporting all public symbols from their secondary entry-points).

Currently Angular Material works around this issue by manually creating
a metadata file that declares the re-exports from all unnamed re-exports.

(see: https://github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85)

This workaround works fine currently, but is no longer easily integrated when
building the package output with Bazel. In order to be able to build such
libraries with Bazel (Material/flex-layout), we need to make sure that NGC
generates the proper flat-module metadata bundle.

PR Close #29360
2019-03-18 15:08:40 -04:00
..
compliance Revert "build: enable shard_count for some jasmine tests that have many specs (#29196)" (#29347) 2019-03-15 19:47:00 -04:00
diagnostics build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
metadata fix(compiler-cli): incorrect metadata bundle for multiple unnamed re-exports (#29360) 2019-03-18 15:08:40 -04:00
ngcc build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
ngtsc Revert "build: enable shard_count for some jasmine tests that have many specs (#29196)" (#29347) 2019-03-15 19:47:00 -04:00
transformers build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
extract_i18n_spec.ts build: remove unused "test.sh" leftover code in compiler-cli (#28352) 2019-02-05 14:31:10 -05:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts feat(compiler-cli): make enableIvy ngtsc/true equivalent (#28616) 2019-02-19 12:28:44 -08:00
ngtools_api_spec.ts feat(compiler-cli): make enableIvy ngtsc/true equivalent (#28616) 2019-02-19 12:28:44 -08:00
perform_compile_spec.ts feat(compiler-cli): add support to extend `angularCompilerOptions` (#22717) 2018-09-19 16:17:28 -07:00
perform_watch_spec.ts build: fix failing compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
runfile_helpers.ts build: support running compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
test_support.ts test: add interm fix for test that rely on an index.d.ts file (#28884) 2019-03-08 12:36:55 -08:00