angular/packages/compiler-cli/ngcc/test
George Kalpakas 93ffc67bfb fix(ngcc): update package.json deterministically (#34870)
Ngcc adds properties to the `package.json` files of the entry-points it
processes to mark them as processed for a format and point to the
created Ivy entry-points (in case of `--create-ivy-entry-points`). When
running ngcc in parallel mode (which is the default for the standalone
ngcc command), multiple formats can be processed simultaneously for the
same entry-point and the order of completion is not deterministic.

Previously, ngcc would append new properties at the end of the target
object in `package.json` as soon as the format processing was completed.
As a result, the order of properties in the resulting `package.json`
(when processing multiple formats for an entry-point in parallel) was
not deterministic. For tools that use file hashes for caching purposes
(such as Bazel), this lead to a high probability of cache misses.

This commit fixes the problem by ensuring that the position of
properties added to `package.json` files is deterministic and
independent of the order in which each format is processed.

Jira issue: [FW-1801](https://angular-team.atlassian.net/browse/FW-1801)

Fixes #34635

PR Close #34870
2020-01-23 10:16:35 -08:00
..
analysis fix(ivy): don't run decorator handlers against declaration files (#34557) 2020-01-10 15:54:51 -08:00
dependencies test(ngcc): update dependency host test description (#34695) 2020-01-15 10:24:50 -08:00
entry_point_finder fix(ngcc): avoid error due to circular dependency in EsmDependencyHost (#34512) 2020-01-08 15:00:50 -08:00
execution fix(ngcc): update package.json deterministically (#34870) 2020-01-23 10:16:35 -08:00
helpers feat(ngcc): lock ngcc when processing (#34722) 2020-01-22 15:35:34 -08:00
host fix(ngcc): recognize re-exports with imported TS helpers in CommonJS and UMD (#34527) 2020-01-10 08:28:50 -08:00
integration fix(ngcc): update package.json deterministically (#34870) 2020-01-23 10:16:35 -08:00
logging feat(compiler-cli): ngcc - make logging more configurable (#29591) 2019-04-01 11:53:28 -07:00
migrations feat(ivy): error in ivy when inheriting a ctor from an undecorated base (#34460) 2019-12-18 15:04:49 -08:00
packages test(ngcc): cleanup entry-point bundle testcases (#34415) 2019-12-16 07:45:36 -08:00
rendering fix(ngcc): insert definitions after statement (#34677) 2020-01-08 15:09:24 -08:00
writing fix(ngcc): update package.json deterministically (#34870) 2020-01-23 10:16:35 -08:00
BUILD.bazel test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736) 2020-01-15 14:58:07 -05:00
utils_spec.ts refactor(ngcc): use a special map for memoizing expensive-to-compute values (#34512) 2020-01-08 15:00:50 -08:00