diff --git a/package.json b/package.json index 6cfe2fd00..69560bee7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..1314cca0a --- /dev/null +++ b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap @@ -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 + } +) => {}; +" +`; diff --git a/tests/flow_object_comment/flow_object_comment.js b/tests/flow_object_comment/flow_object_comment.js new file mode 100644 index 000000000..7b9e268ed --- /dev/null +++ b/tests/flow_object_comment/flow_object_comment.js @@ -0,0 +1,11 @@ +export default ( + { + foo, + bar + }: { + // comment + foo?: Object, + // comment 2 + bar?: Object, + }, +) => {} diff --git a/tests/flow_object_comment/jsfmt.spec.js b/tests/flow_object_comment/jsfmt.spec.js new file mode 100644 index 000000000..989047bcc --- /dev/null +++ b/tests/flow_object_comment/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname); diff --git a/yarn.lock b/yarn.lock index 0b4ff6272..52c8e3c8e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"