Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exit handler for Node.js environments, fix #51 #55 #56

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

hanspagel
Copy link
Contributor

This PR introduces:

  1. A check if the provider is running in a browser or Node.js context.
  2. Registers an exit handler for Node.js environments.

The check isn’t very strict, but I don’t see a reason why someone would benefit from manipulating the check. From what I know it’s pretty complex to make that check harder to manipulate.

A very similar change in lib0 is necessary to make y-websocket work in Node.js (again?). I’ll send a PR there too. Let me know if a change to the PR would make it easier to merge it. Happy to update it.

@dmonad dmonad merged commit 4006b77 into yjs:master Jun 25, 2021
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.

2 participants