Repository navigation
Conversation
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.
The kind of change this PR does introduce
Current behavior
Emitter.of()in@socket.io/postgres-emittercreates the new emitter without the options of the current one:So
channelPrefix,tableNameandpayloadThresholdgo back to their defaults for any namespace other than the main one. With a customchannelPrefix, the servers listen onmy-app#/adminand never receive whatemitter.of("/admin")publishes. With a customtableName, large or binary payloads are inserted intosocket_io_attachmentsinstead.New behavior
The emitter keeps its options, and
of()passes them to the new emitter, likeof()in@socket.io/redis-streams-emitterdoes.Other information (e.g. related issues)
Added a test that creates an emitter with all three options and checks them on
emitter.of("/custom"). It fails without the change (expected 'socket.io#/custom' to sort of equal 'custom-prefix#/custom'). All 13 tests pass with Postgres 14, andnpm run format:checkpasses.This does not overlap with #5570 / #5601, which add the top-level
nspto published messages.