diff --git a/packages/@aws-cdk/applet-js/package.json b/packages/@aws-cdk/applet-js/package.json index f11ce12189f42..3e76b13ec51e7 100644 --- a/packages/@aws-cdk/applet-js/package.json +++ b/packages/@aws-cdk/applet-js/package.json @@ -31,7 +31,7 @@ "@aws-cdk/cdk": "^0.19.0", "fs-extra": "^7.0.0", "source-map-support": "^0.5.6", - "yaml": "^1.0.1" + "yaml": "^1.1.0" }, "repository": { "url": "https://github.com/awslabs/aws-cdk.git", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 51128db6040ba..46a5f453c05e6 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -63,7 +63,8 @@ "request": "^2.83.0", "semver": "^5.5.0", "source-map-support": "^0.5.6", - "yaml": "^1.0.1", + "table": "^5.1.0", + "yaml": "^1.1.0", "yargs": "^9.0.1" }, "repository": { diff --git a/packages/aws-cdk/test/test.yaml.ts b/packages/aws-cdk/test/test.yaml.ts index 5df96ee06b708..529d8e1f46a7c 100644 --- a/packages/aws-cdk/test/test.yaml.ts +++ b/packages/aws-cdk/test/test.yaml.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { toYAML } from '../lib/serialize'; +import { fromYAML, toYAML } from '../lib/serialize'; // Preferred quote of the YAML library const q = '"'; @@ -64,4 +64,18 @@ export = { test.done(); }, + + 'validate emission of very long lines'(test: Test) { + const template = { + Field: ' very long line that starts with a space. very long line that starts with a space. start on a new line' + }; + + const output = toYAML(template); + + const parsed = fromYAML(output); + + test.deepEqual(template, parsed); + + test.done(); + } };