fix(graphql-language-service-server): move debounce-promise to dependencies#4328
Merged
trevor-scheer merged 1 commit intoJun 4, 2026
Conversation
…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 detectedLatest commit: 494bb21 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
1 task
trevor-scheer
approved these changes
Jun 4, 2026
trevor-scheer
left a comment
Contributor
There was a problem hiding this comment.
Thanks for fixing!
This was referenced Jun 4, 2026
Merged
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graphql-language-service-serverimportsdebounce-promiseat runtime inMessageProcessor.ts, but it was declared as adevDependency. It previously resolved only through dependency hoisting (the siblinggraphql-language-servicepackage lists it as a real dependency), which breaks under strict, isolated installs such aspnpmv11. There,graphql-lspcrashes on startup withCannot find module 'debounce-promise'.This moves
debounce-promiseintodependenciesso it is always available at runtime, and adds@types/debounce-promisetodevDependenciesso type-checking no longer relies on hoisting either.Fixes #4324.
Changes
debounce-promisefromdevDependenciestodependencies.@types/debounce-promisetodevDependencies.Verification
debounce-promisewas the only genuinely mis-declared runtime dependency (@graphql-tools/loadis a type-only import and is erased at build time).tsgo --buildandtsgo --noEmitongraphql-language-service-serverpass; thedebounce-promiseimport and its types resolve correctly.Credit
Thanks to @dylanarmstrong for the report and for correctly diagnosing the root cause in the issue.