From a3811a7ad20346ce5ba08a548ca59f79a032239f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 15 Apr 2019 23:41:19 -0400 Subject: [PATCH] fix(@angular-devkit/core): ensure long workspace value changes are multiline --- packages/angular_devkit/core/src/workspace/json/writer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/workspace/json/writer.ts b/packages/angular_devkit/core/src/workspace/json/writer.ts index 2c087178c65c..612258636718 100644 --- a/packages/angular_devkit/core/src/workspace/json/writer.ts +++ b/packages/angular_devkit/core/src/workspace/json/writer.ts @@ -209,7 +209,8 @@ function updateJsonWorkspace(metadata: JsonWorkspaceMetadata): string { new Map(); for (const { op, path, node, value, type } of metadata.changes) { - const multiline = node.start.line !== node.end.line; + // targets/projects are typically large objects so always use multiline + const multiline = node.start.line !== node.end.line || type !== 'json'; const pathSegments = path.split('/'); const depth = pathSegments.length - 1; // TODO: more complete analysis const propertyOrIndex = unescapeKey(pathSegments[depth]);