From 938ab17b038278ee4d35d29ca161fd3df9182ff7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Sep 2020 05:03:45 +0000 Subject: [PATCH 1/4] Build(deps): Bump yaml-unist-parser from 1.3.0 to 1.3.1 Bumps [yaml-unist-parser](https://github.com/ikatyang/yaml-unist-parser) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/ikatyang/yaml-unist-parser/releases) - [Changelog](https://github.com/ikatyang/yaml-unist-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/ikatyang/yaml-unist-parser/compare/v1.3.0...v1.3.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 47d4bd3680fa..5e8173c5cfd0 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "unicode-regex": "3.0.0", "unified": "9.2.0", "vnopts": "1.0.2", - "yaml-unist-parser": "1.3.0" + "yaml-unist-parser": "1.3.1" }, "devDependencies": { "@babel/core": "7.11.6", diff --git a/yarn.lock b/yarn.lock index a71979796938..31094db8fce2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8477,10 +8477,10 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml-unist-parser@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/yaml-unist-parser/-/yaml-unist-parser-1.3.0.tgz#f64f1af96171fe4d7eb462e94225d42a6009b60e" - integrity sha512-kF1OS6fi9BzqX+vVC5hp+R5mmrHLH4f19Nx8fAwb08VqUwgFDBPOOu24VZO06nSOur13CGUTgHuaw5RIzpRnCw== +yaml-unist-parser@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/yaml-unist-parser/-/yaml-unist-parser-1.3.1.tgz#4305a54d8f8750dfff782bb998ff93d0da538d1a" + integrity sha512-4aHBMpYcnByF8l2OKj5hlBJlxSYIMON8Z1Hm57ymbBL4omXMlGgY+pEf4Di6h2qNT8ZG8seTVvAQYNOa7CZ9eA== dependencies: lines-and-columns "^1.1.6" tslib "^1.10.0" From 41f4a89040480819e8e8e173687190cc4802e376 Mon Sep 17 00:00:00 2001 From: fisker Date: Wed, 9 Sep 2020 14:24:18 +0800 Subject: [PATCH 2/4] Update snapshot --- tests/yaml/comment/__snapshots__/jsfmt.spec.js.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/yaml/comment/__snapshots__/jsfmt.spec.js.snap b/tests/yaml/comment/__snapshots__/jsfmt.spec.js.snap index 2217ba604a6d..9e899d762647 100644 --- a/tests/yaml/comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/yaml/comment/__snapshots__/jsfmt.spec.js.snap @@ -357,7 +357,7 @@ none(2): =====================================output===================================== before: -# before.comment + # before.comment after: # after.comment @@ -512,7 +512,7 @@ printWidth: 80 =====================================output===================================== - before -# before.comment + # before.comment - after # after.comment From 845f4d141fd9c5be1f6486342960c8cb330fbd30 Mon Sep 17 00:00:00 2001 From: fisker Date: Thu, 10 Sep 2020 09:18:15 +0800 Subject: [PATCH 3/4] Update changelog --- changelog_unreleased/yaml/pr-9143.md | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/changelog_unreleased/yaml/pr-9143.md b/changelog_unreleased/yaml/pr-9143.md index 9ddb644727ee..772e3f362e6d 100644 --- a/changelog_unreleased/yaml/pr-9143.md +++ b/changelog_unreleased/yaml/pr-9143.md @@ -1,27 +1,41 @@ -#### Fix printing doubles a blank line before a comment (#9143 by @sosukesuzuki) +#### Fix comment printing in mapping and sequence (#9143, #9169 by @sosukesuzuki, @fisker, fix in `yaml-unist-parser` by @ikatyang) ```yaml # Input -- foo: 0 - bar: 1 +- a + # Should indent +- bb - # baz: 2 -- quux: 3 +--- +- a: a + b: b + + # Should print one empty line before +- another # Prettier stable -- foo: 0 - bar: 1 +- a +# Should indent +- bb + +--- +- a: a + b: b - # baz: 2 -- quux: 3 + # Should print one empty line before +- another # Prettier master -- foo: 0 - bar: 1 +- a + # Should indent +- bb - # baz: 2 -- quux: 3 +--- +- a: a + b: b + # Should print one empty line before +- another ``` From d52c855f34df8470d2a1ffe542cffc272eef5380 Mon Sep 17 00:00:00 2001 From: fisker Date: Thu, 10 Sep 2020 09:28:01 +0800 Subject: [PATCH 4/4] spellcheck --- cspell.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspell.json b/cspell.json index 1c41a7026e32..72645b9a4b5a 100644 --- a/cspell.json +++ b/cspell.json @@ -401,7 +401,7 @@ "ignoreRegExpList": [ "\\n(`{3,})\\w*\\n[\\s\\S]+?\\1", "\\[(\\*{2})?@[-\\w]+?\\1\\]", - "by @[-\\w]+", + "by @[-\\w]+(?:, @[-\\w]+)?", "\\[`\\w+`\\]", "ve{2,}r{2,}y", "ve+r+y+long\\w*",