angular-cn/packages/core
Paul Gschwendtner 59607dc495 fix(core): undecorated-classes-with-di migration should handle libraries generated with CLI versions past v6.2.0 (#35824)
The options for `flatModuleId` and `flatModuleOutFile` had been removed in the CLI
from generated libraries with 718ee15b9a.

This has been done because `ng-packagr` (which is used to build the
libraries) automatically set these options in-memory when it compiles the library.
No migration has been created for this because there was no actual need to get rid of
this. Keeping the options in the library `tsconfig` does not cause any problems unless
the `tsconfig` is used outside of `ng-packagr`. This was not anticipated, but is now
commonly done in `ng update` migrations.

The `ng update` migrations try to create an instance of the `AngularCompilerProgram` by
simply parsing the `tsconfig`. The migrations make the valid assumption that `tsconfig` files
are not incomplete/invalid. They _definitely_ are in the file system though. It just works for
libraries because `ng-packagr` in-memory completes the invalid `tsconfig` files, so that they
can be passed to the `@angular/compiler-cli`.

We can't have this logic in the `ng update` migrations because it's
out-of-scope for individual migrations to distinguish between libraries
and applications. Also it would be out-of-scope to parse the
`ng-packagr` configuration and handle the tsconfig in-memory completion.

As a workaround though, we can remove the flat-module bundle options
in-memory when creating the compiler program. This is acceptable since
we don't emit the program and the flat module bundles are not needed.

Fixes #34985.

PR Close #35824
2020-03-06 12:40:18 -05:00
..
global docs(ivy): document global debugging utilities and clean up API (#34453) 2020-01-30 11:30:32 -08:00
schematics fix(core): undecorated-classes-with-di migration should handle libraries generated with CLI versions past v6.2.0 (#35824) 2020-03-06 12:40:18 -05:00
src Revert "fix(core): log error instead of warning for unknown properties and elements (#35798)" (#35845) 2020-03-03 16:02:58 -08:00
test Revert "fix(core): log error instead of warning for unknown properties and elements (#35798)" (#35845) 2020-03-03 16:02:58 -08:00
testing perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
BUILD.bazel build: add npm_integration_test && angular_integration_test (#33927) 2020-02-24 08:59:18 -08:00
PACKAGE.md
index.ts
package.json build(packaging): add repository.directory field to package.jsons (#27544) 2020-02-25 13:12:45 -08:00
public_api.ts