angular/packages/compiler-cli
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
..
integrationtest build: derive ts_library dep from jasmine_node_test boostrap label if it ends in _es5 (#34736) 2020-01-15 14:58:07 -05:00
ngcc fix(ngcc): update package.json deterministically (#34870) 2020-01-23 10:16:35 -08:00
src refactor(ivy): add exclusive mode to writeFile() (#34722) 2020-01-22 15:35:34 -08:00
test revert: refactor(ivy): remove styleSanitizer instruction in favor of an inline param (#34480) (#34910) 2020-01-22 15:59:33 -05:00
BUILD.bazel build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34736) 2020-01-15 14:58:07 -05:00
index.ts refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
package.json feat(compiler-cli): require node 10 as runtime engine (#34722) 2020-01-22 15:35:34 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00