Skip to content

Commit 48b9bdd

Browse files
authored
fix(aws-cdk): fix YAML line wrapping issue (#1334)
Fix the issue where incorrect UserData was generated by updating to a newer version of the yaml library. Fixes #1309.
1 parent 3076070 commit 48b9bdd

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

packages/@aws-cdk/applet-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@aws-cdk/cdk": "^0.19.0",
3232
"fs-extra": "^7.0.0",
3333
"source-map-support": "^0.5.6",
34-
"yaml": "^1.0.1"
34+
"yaml": "^1.1.0"
3535
},
3636
"repository": {
3737
"url": "https://github.com/awslabs/aws-cdk.git",

packages/aws-cdk/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"request": "^2.83.0",
6464
"semver": "^5.5.0",
6565
"source-map-support": "^0.5.6",
66-
"yaml": "^1.0.1",
66+
"table": "^5.1.0",
67+
"yaml": "^1.1.0",
6768
"yargs": "^9.0.1"
6869
},
6970
"repository": {

packages/aws-cdk/test/test.yaml.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Test } from 'nodeunit';
2-
import { toYAML } from '../lib/serialize';
2+
import { fromYAML, toYAML } from '../lib/serialize';
33

44
// Preferred quote of the YAML library
55
const q = '"';
@@ -64,4 +64,18 @@ export = {
6464

6565
test.done();
6666
},
67+
68+
'validate emission of very long lines'(test: Test) {
69+
const template = {
70+
Field: ' very long line that starts with a space. very long line that starts with a space. start on a new line'
71+
};
72+
73+
const output = toYAML(template);
74+
75+
const parsed = fromYAML(output);
76+
77+
test.deepEqual(template, parsed);
78+
79+
test.done();
80+
}
6781
};

0 commit comments

Comments
 (0)