-
Notifications
You must be signed in to change notification settings - Fork 144
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 support for running using deno #362
Conversation
Thanks for contributing to Node-GameDig! |
After merging, please make an issue to track denoland/deno#20138 to make the needed changes (hopefully just to remove that |
bin/gamedig.js
Outdated
.then(() => { | ||
// https://github.com/denoland/deno/issues/20138 | ||
if (typeof Deno !== "undefined") { | ||
gamedig.queryRunner.udpSocket?.socket?.close(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont exactly understand something, unref
is not implemented, but why do we close the connection only here on the binary one? wouldn't we need to also close instances after being used in lib-only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry I should've mentioned that. I just wasn't sure how to do that on the library as there's no real close method. I guess maybe could close after every query and reconstruct it for the next.
Hey, coming back late to this (sorry!), could you rebase please? Also, please add a line to the changelog mentioning support for Deno. |
93a9095 changed line endings in files, if I rebase I have to recommit entire files. Probably easier to just re-implement. |
Sorry about that, could you re-implement? |
Prefix node imports with "node:" and gate a socket API that is not implemented in [deno](https://deno.land) so that the library can be used there. This should not break node and doesn't in my brief testing.
dfddd81
to
eca552c
Compare
Prefix node imports with "node:" and gate a socket API that is not implemented in deno so that the library can be used there. This should not break node and doesn't in my brief testing.