Fix comments inside of ObjectPattern (#1045)
ast-types was missing a type, I sent a PR on ast-type ( https://github.com/benjamn/ast-types/pull/211 ) which was merged and released (thanks @benjamn for being super quick!). So I'm upgrading ast-types and add the test in this PR. Fixes #1007
This commit is contained in:
1 parent
a502bf9f45
commit
b012f7531e
5 files changed
+44
-4
No files matched your search
+1
-1
@@ -10,7 +10,7 @@
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"dependencies": {
|
||||
"ast-types": "0.9.4",
|
||||
"ast-types": "0.9.8",
|
||||
"babel-code-frame": "6.22.0",
|
||||
"babylon": "6.15.0",
|
||||
"chalk": "1.1.3",
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`flow_object_comment.js 1`] = `
|
||||
"export default (
|
||||
{
|
||||
foo,
|
||||
bar
|
||||
}: {
|
||||
// comment
|
||||
foo?: Object,
|
||||
// comment 2
|
||||
bar?: Object,
|
||||
},
|
||||
) => {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export default (
|
||||
{
|
||||
foo,
|
||||
bar
|
||||
}: {
|
||||
// comment
|
||||
foo?: Object,
|
||||
// comment 2
|
||||
bar?: Object
|
||||
}
|
||||
) => {};
|
||||
"
|
||||
`;
|
||||
@@ -0,0 +1,11 @@
|
||||
export default (
|
||||
{
|
||||
foo,
|
||||
bar
|
||||
}: {
|
||||
// comment
|
||||
foo?: Object,
|
||||
// comment 2
|
||||
bar?: Object,
|
||||
},
|
||||
) => {}
|
||||
@@ -0,0 +1 @@
|
||||
run_spec(__dirname);
|
||||
@@ -109,9 +109,9 @@ ast-types@0.8.18:
|
||||
version "0.8.18"
|
||||
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.18.tgz#c8b98574898e8914e9d8de74b947564a9fe929af"
|
||||
|
||||
ast-types@0.9.4:
|
||||
version "0.9.4"
|
||||
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.4.tgz#410d1f81890aeb8e0a38621558ba5869ae53c91b"
|
||||
ast-types@0.9.8:
|
||||
version "0.9.8"
|
||||
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.8.tgz#6cb6a40beba31f49f20928e28439fc14a3dab078"
|
||||
|
||||
async@^1.4.0, async@^1.4.2:
|
||||
version "1.5.2"
|
||||
|
||||
Reference in new issue
Block a user