perf(ngcc): reduce the size of the entry-point manifest file (#36486)

The base path for package and entry-points is known so there is
no need to store these in the file. Also this commit avoids storing
empty arrays unnecessarily.

PR Close #36486
This commit is contained in:
Pete Bacon Darwin
2020-04-09 14:56:28 +01:00
committed by atscott
parent a185efbd60
commit ec0ce6005a
3 changed files with 47 additions and 29 deletions

View File

@ -284,18 +284,16 @@ runInEachFileSystem(() => {
JSON.parse(fs.readFile(_Abs('/project/node_modules/__ngcc_entry_points__.json')));
expect(file.entryPointPaths).toEqual([
[
_Abs('/project/node_modules/package-1/'),
_Abs('/project/node_modules/package-1/'),
'package-1',
'package-1',
[
_Abs('/project/node_modules/other_package_1'),
_Abs('/project/node_modules/other_package_2'),
],
[],
[],
],
[
_Abs('/project/node_modules/package-2/'),
_Abs('/project/node_modules/package-2/entry-point'),
'package-2',
'package-2/entry-point',
[],
[
_Abs('/project/node_modules/missing_1'),