Skip to content

Commit

Permalink
Update @astrojs/compiler and fix for spread in expression (#206)
Browse files Browse the repository at this point in the history
* Update @astrojs/compiler and fix for spread in expression

* add changeset
  • Loading branch information
ota-meshi authored Jun 6, 2022
1 parent 06fe99e commit 8a8b3e9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-pots-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'prettier-plugin-astro': patch
---

Update @astrojs/compiler and fix for spread in expression
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion test/fixtures/other/spread-operator/input.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
const meta = { title: "My Title", lang: "en" }
---
<BaseLayout { ...meta }>Foo</BaseLayout>
<BaseLayout { ...meta }>Foo</BaseLayout>

<!-- spread in expression -->
{meta && <BaseLayout { ...meta }>Bar</BaseLayout>}
3 changes: 3 additions & 0 deletions test/fixtures/other/spread-operator/output.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ const meta = { title: "My Title", lang: "en" };
---

<BaseLayout {...meta}>Foo</BaseLayout>

<!-- spread in expression -->
{meta && <BaseLayout {...meta}>Bar</BaseLayout>}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8a8b3e9

Please sign in to comment.