Add full runtime support for node-redis (v4/v5) clients - #714
Open
rafagsiqueira wants to merge 11 commits into
Open
Add full runtime support for node-redis (v4/v5) clients#714rafagsiqueira wants to merge 11 commits into
rafagsiqueira wants to merge 11 commits into
Conversation
The upstream graphql-redis-subscriptions project appears unmaintained. Publish this fork under a new npm name. - package.json: rename package, point repo/bugs/homepage at the fork, add contributor, restrict published files to dist/ - README: retitle, add fork note, update install + import examples - LICENSE: retain original copyright, add fork maintainer Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Raises line coverage from 89.69% to ~96%, above nyc's default threshold. The node-redis support and with-filter helper had no direct tests. Also point repository/bugs/homepage at the renamed rafagsiqueira/apollo-redis-subscriptions repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…riptions Rebrand fork as apollo-redis-subscriptions
v2.7.1: version bump and local cluster test setup
- Run `npm run compile` (the actual build script) so dist/ exists; `npm run build --if-present` was a silent no-op, which would have published an empty tarball given files: ["dist"]. - Upgrade npm to guarantee >= 11.5.1 for trusted publishing (OIDC). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
setup-node's `cache: false` errors with "Caching for 'false' is not supported"; `package-manager` is not a valid input. Omitting both disables dependency caching, which is fine for the publish job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`npm install -g npm@latest` left the global npm unable to resolve the bundled `sigstore` module, breaking `npm publish --provenance`. Node 24 already ships an OIDC-capable npm, so drop the self-update. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
prepublishOnly already runs the full test suite during npm publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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
Completes the work started in #712, which added TypeScript types for
node-redisclients but only handled compile-time typing — at runtime,node-redis's promise-based pub/sub API was invoked as if it wereioredis's callback-based API, sosubscribe()never actually resolved and messages were never delivered (node-redishas no generic'message'/'pmessage'events; it delivers messages to the listener passed directly tosubscribe()/pSubscribe()).RedisPubSubnow detects which client library (ioredisvsnode-redis) was passed in aspublisher/subscriberand branches its pub/sub wiring accordingly.subscribe(): fornode-redis, passes a real per-trigger listener intosubscribe()/pSubscribe()and awaits the returned Promise instead of misinterpreting the message listener as an error-first callback.'message'/'pmessage'event listeners forioredisclients, sincenode-redishas no equivalent.unsubscribe()/close()call the correct method names (pUnsubscribe/closevspunsubscribe/quit) and normalize return values.redisas an optional/dev dependency, matching the existingioredispattern.Test plan
src/test/integration-tests.tscoveringnode-redis: plain client pub/sub (regular + pattern subscriptions) andnode-redisCluster pub/sub.npm run testonly— 24 passing (existing ioredis-mock unit tests, unaffected).npm run integration— 10 passing (existing ioredis/cluster tests + new node-redis/node-redis-cluster tests), run repeatedly against a real local Redis + Redis Cluster to confirm stability.npm run lintandtsc— clean (no new warnings/errors).🤖 Generated with Claude Code