Please sign in to comment.
fix(ivy): ngcc should only index .d.ts exports within the package (#3…
…2129) ngcc needs to solve a unique problem when compiling typings for an entrypoint: it must resolve a declaration within a .js file to its representation in a .d.ts file. Since such .d.ts files can be used in deep imports without ever being referenced from the "root" .d.ts, it's not enough to simply match exported types to the root .d.ts. ngcc must build an index of all .d.ts files. Previously, this operation had a bug: it scanned all .d.ts files in the .d.ts program, not only those within the package. Thus, if a class in the program happened to share a name with a class exported from a dependency's .d.ts, ngcc might accidentally modify the wrong .d.ts file, causing a variety of issues downstream. To fix this issue, ngcc's .d.ts scanner now limits the .d.ts files it indexes to only those declared in the current package. PR Close #32129
- Loading branch information...
Showing with 98 additions and 57 deletions.
- +12 −5 packages/compiler-cli/ngcc/src/host/esm2015_host.ts
- +3 −2 packages/compiler-cli/ngcc/src/packages/bundle_program.ts
- +6 −5 packages/compiler-cli/ngcc/src/packages/entry_point_bundle.ts
- +8 −5 packages/compiler-cli/ngcc/test/helpers/utils.ts
- +8 −8 packages/compiler-cli/ngcc/test/host/commonjs_host_spec.ts
- +61 −32 packages/compiler-cli/ngcc/test/host/esm2015_host_spec.ts
Oops, something went wrong.