Skip to content

Forward allowPush and pushOnly options to core#138

Merged
mafintosh merged 2 commits intomainfrom
replication-opts
Mar 6, 2026
Merged

Forward allowPush and pushOnly options to core#138
mafintosh merged 2 commits intomainfrom
replication-opts

Conversation

@chm-diederichs
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread index.js
eagerUpgrade: true,
notDownloadingLinger: opts.notDownloadingLinger,
allowFork: opts.allowFork !== false,
allowPush: !!opts.allowPush,
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.

Curious why is allowPush truthy vs pushOnly explicitly needs true. Currently the are both coerced to truthy in hypercore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's a good point, made me dig in a bit and I remembered the pushOnly option is actually passed via the session opts and then set here: https://github.com/holepunchto/hypercore/blob/main/index.js#L350

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in the end, i realised it's actually just the allowPush option that was missing, so have updated the PR

@mafintosh mafintosh merged commit 77cbc72 into main Mar 6, 2026
5 checks passed
@mafintosh mafintosh deleted the replication-opts branch March 6, 2026 18:14
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.

3 participants