Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(yaml): update parser #4931

Merged
merged 2 commits into from Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -60,8 +60,8 @@
"typescript-eslint-parser": "17.0.0",
"unicode-regex": "1.0.1",
"unified": "6.1.6",
"yaml": "1.0.0-rc.7",
"yaml-unist-parser": "1.0.0-rc.3"
"yaml": "ikatyang/yaml#a765c1ee16d6b8a5e715564645f2b85f7e04828b",
"yaml-unist-parser": "ikatyang/yaml-unist-parser#cd4f73325b3fc02a6d17842d0d9cee0dfc729c9b"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
Expand Down
8 changes: 8 additions & 0 deletions tests/yaml_comment/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -94,6 +94,14 @@ A:

`;

exports[`in-empty-item-without-newlline.yml - yaml-verify 1`] = `
a:
#123~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a:
#123

`;

exports[`root.yml - yaml-verify 1`] = `
#hello world
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions tests/yaml_comment/in-empty-item-without-newlline.yml
@@ -0,0 +1,2 @@
a:
#123
50 changes: 50 additions & 0 deletions tests/yaml_mapping/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -206,6 +206,56 @@ key:

`;

exports[`merge-twice.yml - yaml-verify 1`] = `
.anchors:
- &anchor1
key: value
- &anchor2
another: prop

foo:
bar: baz
<<: *anchor1
<<: *anchor2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.anchors:
- &anchor1
key: value
- &anchor2
another: prop

foo:
bar: baz
<<: *anchor1
<<: *anchor2

`;

exports[`merge-twice.yml - yaml-verify 2`] = `
.anchors:
- &anchor1
key: value
- &anchor2
another: prop

foo:
bar: baz
<<: *anchor1
<<: *anchor2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.anchors:
- &anchor1
key: value
- &anchor2
another: prop

foo:
bar: baz
<<: *anchor1
<<: *anchor2

`;

exports[`middle-comment.yml - yaml-verify 1`] = `
!!map # comment
a: 123
Expand Down
10 changes: 10 additions & 0 deletions tests/yaml_mapping/merge-twice.yml
@@ -0,0 +1,10 @@
.anchors:
- &anchor1
key: value
- &anchor2
another: prop

foo:
bar: baz
<<: *anchor1
<<: *anchor2
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -6008,16 +6008,16 @@ yallist@^3.0.0, yallist@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"

yaml-unist-parser@1.0.0-rc.3:
yaml-unist-parser@ikatyang/yaml-unist-parser#cd4f73325b3fc02a6d17842d0d9cee0dfc729c9b:
version "1.0.0-rc.3"
resolved "https://registry.yarnpkg.com/yaml-unist-parser/-/yaml-unist-parser-1.0.0-rc.3.tgz#d7b396353da92c75bb471a9e65973ba967e0b4f6"
resolved "https://codeload.github.com/ikatyang/yaml-unist-parser/tar.gz/cd4f73325b3fc02a6d17842d0d9cee0dfc729c9b"
dependencies:
lines-and-columns "^1.1.6"
tslib "^1.9.1"

yaml@1.0.0-rc.7:
yaml@ikatyang/yaml#a765c1ee16d6b8a5e715564645f2b85f7e04828b:
version "1.0.0-rc.7"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.0.0-rc.7.tgz#7cf9dba3c78992542b7a2d7cb9a7eeacbff63f77"
resolved "https://codeload.github.com/ikatyang/yaml/tar.gz/a765c1ee16d6b8a5e715564645f2b85f7e04828b"

yargs-parser@^7.0.0:
version "7.0.0"
Expand Down