Skip to content

fix(graphql-language-service-server): move debounce-promise to dependencies#4328

Merged
trevor-scheer merged 1 commit into
graphql:mainfrom
vishwakt:fix/lsp-server-debounce-promise-dependency
Jun 4, 2026
Merged

fix(graphql-language-service-server): move debounce-promise to dependencies#4328
trevor-scheer merged 1 commit into
graphql:mainfrom
vishwakt:fix/lsp-server-debounce-promise-dependency

Conversation

@vishwakt

@vishwakt vishwakt commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

graphql-language-service-server imports debounce-promise at runtime in MessageProcessor.ts, but it was declared as a devDependency. It previously resolved only through dependency hoisting (the sibling graphql-language-service package lists it as a real dependency), which breaks under strict, isolated installs such as pnpm v11. There, graphql-lsp crashes on startup with Cannot find module 'debounce-promise'.

This moves debounce-promise into dependencies so it is always available at runtime, and adds @types/debounce-promise to devDependencies so type-checking no longer relies on hoisting either.

Fixes #4324.

Changes

  • Move debounce-promise from devDependencies to dependencies.
  • Add @types/debounce-promise to devDependencies.
  • Add a patch changeset.

Verification

  • Scanned the package source for bare (non-relative) runtime imports; debounce-promise was the only genuinely mis-declared runtime dependency (@graphql-tools/load is a type-only import and is erased at build time).
  • tsgo --build and tsgo --noEmit on graphql-language-service-server pass; the debounce-promise import and its types resolve correctly.

Credit

Thanks to @dylanarmstrong for the report and for correctly diagnosing the root cause in the issue.

…encies

debounce-promise is imported at runtime in MessageProcessor.ts but was
declared as a devDependency. It previously resolved only via hoisting,
which fails under strict installs such as pnpm v11 and causes graphql-lsp
to crash with "Cannot find module 'debounce-promise'".

Move it to dependencies and add @types/debounce-promise to devDependencies.
@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 494bb21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
graphql-language-service-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trevor-scheer trevor-scheer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@trevor-scheer trevor-scheer enabled auto-merge (squash) June 4, 2026 14:07
@trevor-scheer trevor-scheer merged commit d6b71ce into graphql:main Jun 4, 2026
12 checks passed
trevor-scheer pushed a commit that referenced this pull request Jun 6, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## codemirror-graphql@2.2.7

### Patch Changes

- Updated dependencies
[[`a526a10`](a526a10)]:
  - graphql-language-service@5.5.2
## @graphiql/react@0.37.6

### Patch Changes

- [#4332](#4332)
[`61d138f`](61d138f)
Thanks [@vishwakt](https://github.com/vishwakt)! - Fix image previews in
the response viewer fetching from the wrong host. Monaco splits the
hovered word on `:`, so a full URL like `https://example.com/img.png`
reaches the preview as the protocol-relative `//example.com/img.png`.
The preview stripped the leading character, turning that into the
host-relative `/example.com/img.png` and fetching it from the current
origin. The original host is now preserved.

- Updated dependencies
[[`a526a10`](a526a10)]:
  - graphql-language-service@5.5.2
## graphql-language-service@5.5.2

### Patch Changes

- [#4329](#4329)
[`a526a10`](a526a10)
Thanks [@vishwakt](https://github.com/vishwakt)! - Make the fields block
optional when parsing object, interface, input, and enum type
definitions (and their extensions) in the online parser. Per the GraphQL
spec these blocks are optional, so spec-valid SDL such as `extend type
Foo @onType` or `type Foo @onType` (directives only, no body) no longer
reports `invalidchar` during syntax highlighting.
## graphql-language-service-server@2.14.10

### Patch Changes

- [#4328](#4328)
[`d6b71ce`](d6b71ce)
Thanks [@vishwakt](https://github.com/vishwakt)! - Move
`debounce-promise` from `devDependencies` to `dependencies`. It is
imported at runtime in `MessageProcessor.ts`, so it must be a regular
dependency. Previously the package only resolved it via hoisting, which
fails under strict installs (e.g. `pnpm` v11), causing `graphql-lsp` to
crash with `Cannot find module 'debounce-promise'`.

- [#4331](#4331)
[`e1077b9`](e1077b9)
Thanks [@vishwakt](https://github.com/vishwakt)! - Import `Logger` from
`vscode-jsonrpc` instead of `vscode-languageserver`. `Logger` is defined
in `vscode-jsonrpc` (a direct dependency) and only reached
`vscode-languageserver` through a transitive re-export, which `tsgo`
failed to resolve on CI (`Module '"vscode-languageserver"' has no
exported member 'Logger'`). Importing from the package that owns the
type avoids relying on that fragile re-export chain.

- Updated dependencies
[[`a526a10`](a526a10)]:
  - graphql-language-service@5.5.2
## vscode-graphql-execution@0.3.6

### Patch Changes

- [#4306](#4306)
[`7aefde8`](7aefde8)
Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump `ws` to
8.20.1 to address
[GHSA-58qx-3vcg-4xpx](GHSA-58qx-3vcg-4xpx)
(uninitialized memory disclosure in `websocket.close()`).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@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.

[lsp-server] 🐞 debounce-promise in devDependencies

2 participants