Skip to content

feat(language-service): strip ="" for boolean props completion edits#5888

Merged
KazariEX merged 9 commits intovuejs:masterfrom
KazariEX:feat/boolean-props-completion
Jan 5, 2026
Merged

feat(language-service): strip ="" for boolean props completion edits#5888
KazariEX merged 9 commits intovuejs:masterfrom
KazariEX:feat/boolean-props-completion

Conversation

@KazariEX
Copy link
Copy Markdown
Member

No description provided.

@KazariEX KazariEX marked this pull request as ready for review December 18, 2025 16:29
@johnsoncodehk johnsoncodehk force-pushed the master branch 2 times, most recently from 8c3584c to f36bc6c Compare December 20, 2025 09:31
@johnsoncodehk johnsoncodehk force-pushed the master branch 5 times, most recently from ee9f2e4 to ab594f1 Compare December 21, 2025 16:35
@KazariEX KazariEX merged commit 3ead212 into vuejs:master Jan 5, 2026
4 checks passed
@KazariEX KazariEX deleted the feat/boolean-props-completion branch January 5, 2026 19:44
theiter8r pushed a commit to theiter8r/vue that referenced this pull request Mar 12, 2026
Pin the Vue language server to version 3.2.1 to work around a crash
in @vue/language-service where `meta?.props.map(...)` throws a
TypeError when `meta.props` is undefined.

This bug was introduced upstream in vuejs/language-tools#5888 and
affects @vue/language-server versions 3.2.2+.

Upstream issue: vuejs/language-tools#5956
Fixes: zed-extensions#92
theiter8r added a commit to theiter8r/vue that referenced this pull request Mar 12, 2026
Pin the Vue language server to version 3.2.1 to work around a crash
in @vue/language-service where `meta?.props.map(...)` throws a
TypeError when `meta.props` is undefined.

This bug was introduced upstream in vuejs/language-tools#5888 and
affects @vue/language-server versions 3.2.2+.

Upstream issue: vuejs/language-tools#5956
Fixes: zed-extensions#92
MrSubidubi pushed a commit to zed-extensions/vue that referenced this pull request Mar 18, 2026
## Problem

The Vue language server crashes silently in Zed when providing attribute
completions. The crash originates in `@vue/language-service` at
`vue-template.js:604`, where the code uses:

```js
meta?.props.map(prop => [prop.name, prop]) ?? []
```

This throws a `TypeError: Cannot read properties of undefined (reading
'map')` when `meta` exists but `meta.props` is `undefined`. The safe
form would be `meta?.props?.map(...)`.

This bug was introduced upstream in
[vuejs/language-tools#5888](vuejs/language-tools#5888)
and affects `@vue/language-server` versions **3.2.2+**.

**Upstream issue:** vuejs/language-tools#5956

## Solution

Pin `@vue/language-server` to version **3.2.1** (the last known working
version before the buggy change) instead of dynamically fetching the
latest version via `npm_package_latest_version`.

This is a temporary workaround. Once the upstream package publishes a
fix, the pin should be removed so users can receive future updates.

## Changes

- Added a `PINNED_SERVER_VERSION` constant set to `"3.2.1"` with a
comment explaining the reason and linking to the upstream issue.
- Replaced `zed::npm_package_latest_version(PACKAGE_NAME)?` with
`PINNED_SERVER_VERSION.to_string()` in `server_script_path`.
- Added a `TODO` comment to remove the pin once upstream is fixed.

Fixes #92

Co-authored-by: theiter8r <theiter8r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants