Fix Deno compatibility issues with PouchDB and trystero#37
Open
echthesia wants to merge 4 commits intovrtmrz:mainfrom
Open
Fix Deno compatibility issues with PouchDB and trystero#37echthesia wants to merge 4 commits intovrtmrz:mainfrom
echthesia wants to merge 4 commits intovrtmrz:mainfrom
Conversation
Override $$createPouchDBInstance to use Deno's native fetch instead of the node:http compatibility layer, which fails with "request body stream errored / resource closed" when the live changes feed reconnects through a reverse proxy (e.g. Traefik). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The vrtmrz fork has been upstreamed and Deno doesn't support the GitHub URL dependency syntax used previously. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Await DirectFileManipulator's ready promise in put/delete/get/getMeta to prevent Hub.dispatch() from calling these methods before initializeDatabase() completes on container restart. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous fix (7b626a2) awaited `this.man.ready.promise` in put/get/delete/getMeta, but that promise resolves after the first initializeDatabase() call. When start() applies remote tweaks and calls initializeDatabase() a second time, the old PouchDB instance is closed while in-flight operations are still using it. Replace with a custom `_started` deferred promise that only resolves after start() fully completes, ensuring DB operations wait for any re-initialization from tweaks. Co-Authored-By: Claude Opus 4.6 <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
node:httpshim failing withrequest body stream errored/resource closedwhen the live changes feed reconnects — override$$createPouchDBInstanceto use Deno's nativefetch()instead of thenode:httpcompatibility layernpm:trystero@^0.22.0since the fork was upstreamed and Deno doesn't support the previous URL syntaxTest plan
🤖 Generated with Claude Code