Skip to content

Commit

Permalink
feat: support bind:value={get, set}
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Nov 21, 2024
1 parent 4e88090 commit ab6e713
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# prettier-plugin-svelte changelog

## 3.3.1

- (feat) Svelte 5: support upcoming `bind:value={get, set}`

## 3.3.0

- (feat) Svelte 5: support upcoming `<svelte:boundary>`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier-plugin-svelte",
"version": "3.3.0",
"version": "3.3.1",
"description": "Svelte plugin for prettier",
"main": "plugin.js",
"files": [
Expand Down
1 change: 1 addition & 0 deletions src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function embed(path: FastPath, _options: Options) {
printJS(parent, 'expression', {});
break;
case 'ConstTag':
case 'Binding':
printJS(parent, 'expression', { removeParentheses: true });
break;
case 'RenderTag':
Expand Down
3 changes: 3 additions & 0 deletions test/printer/samples/binding-get-set.html.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input bind:value={() => value, (v) => (value = v)} />

<input bind:value={get, set} />

0 comments on commit ab6e713

Please sign in to comment.