diff --git a/.changeset/shaggy-pots-doubt.md b/.changeset/shaggy-pots-doubt.md new file mode 100644 index 0000000..022aabc --- /dev/null +++ b/.changeset/shaggy-pots-doubt.md @@ -0,0 +1,5 @@ +--- +'prettier-plugin-astro': patch +--- + +Update @astrojs/compiler and fix for spread in expression diff --git a/package.json b/package.json index cde15b8..8b727a6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "format": "prettier -w ." }, "dependencies": { - "@astrojs/compiler": "^0.14.1", + "@astrojs/compiler": "^0.15.2", "prettier": "^2.6.2", "sass-formatter": "^0.7.2", "synckit": "^0.7.0" diff --git a/test/fixtures/other/spread-operator/input.astro b/test/fixtures/other/spread-operator/input.astro index 1c4f329..25738ba 100644 --- a/test/fixtures/other/spread-operator/input.astro +++ b/test/fixtures/other/spread-operator/input.astro @@ -1,4 +1,7 @@ --- const meta = { title: "My Title", lang: "en" } --- -Foo \ No newline at end of file +Foo + + +{meta && Bar} diff --git a/test/fixtures/other/spread-operator/output.astro b/test/fixtures/other/spread-operator/output.astro index 47694b2..71e92ad 100644 --- a/test/fixtures/other/spread-operator/output.astro +++ b/test/fixtures/other/spread-operator/output.astro @@ -3,3 +3,6 @@ const meta = { title: "My Title", lang: "en" }; --- Foo + + +{meta && Bar} diff --git a/yarn.lock b/yarn.lock index 0768eff..d49138c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@astrojs/compiler@^0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.14.1.tgz#7dade245ef69a49bb80cb29682b820f3ebc306d9" - integrity sha512-dYgb52JvZE8jyDg84JkdJ/dTxRgHVbC47ou6Ymok/nZDh9kvlU7TJtEDCLlGfpfZTGvnkFTHMrz1kdbqCbFVCw== +"@astrojs/compiler@^0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.15.2.tgz#b8b3504ea92e2c279ce931c2aa97444f29caf03d" + integrity sha512-YsxIyx026zPWbxv3wYrudr1jh8u6oSnhP6MW+9OAgiFuICHjSX4Rw+qm8wJj1D5IkJ3HsDtE+kFMMYIozZ5bvQ== dependencies: tsm "^2.2.1" uvu "^0.5.3"