fix(ivy): ngcc - use spaces in overwritten package.json
content for readability (#30831)
When ngcc processes an entrypoint, it updates `package.json` with metadata about the processed format. Previously, it overwrote the `package.json` with the stringified JSON object without spaces. This made the file difficult to read (for example when looking at the file while debugging an ngcc failure). This commit fixes it by using spaces in the new `package.json` content. PR Close #30831
This commit is contained in:

committed by
Misko Hevery

parent
17bfedd224
commit
ea2d453118
@ -51,5 +51,5 @@ export function markAsProcessed(
|
||||
format: EntryPointJsonProperty) {
|
||||
if (!packageJson.__processed_by_ivy_ngcc__) packageJson.__processed_by_ivy_ngcc__ = {};
|
||||
packageJson.__processed_by_ivy_ngcc__[format] = NGCC_VERSION;
|
||||
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
|
||||
fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||
}
|
||||
|
Reference in New Issue
Block a user