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

Incompatible with Deno #97

Closed
shepherdjerred opened this issue Nov 22, 2023 · 2 comments
Closed

Incompatible with Deno #97

shepherdjerred opened this issue Nov 22, 2023 · 2 comments

Comments

@shepherdjerred
Copy link
Contributor

Hi! Thanks for this library. It's made interacting with the Riot API much simpler.

I'm trying to move my project over to Deno. Deno is mostly compatible with Node/NPM modules, but there are some differences. One issue I ran into is how Deno sends HTTP requests. It calls toString on header values, which is an issue with this library because the Originheader is set to null, which produces an error.

https://github.com/denoland/deno/blob/main/ext/node/polyfills/_http_outgoing.ts#L253

https://github.com/Sansossio/twisted/blame/7cf11d3a2b4176b89de5632d90853b38fc023e97/src/base/base.ts#L211C21-L211C21

@shepherdjerred
Copy link
Contributor Author

shepherdjerred commented Nov 22, 2023

Hi @Sansossio!

Would you be willing to accept a PR that makes this package compatible with Deno? I'd be happy to contribute.

By the way, I've used your library to create a cool Discord bot that posts match reports to a Discord channel. Thanks for making this possible!

CleanShot 2023-11-22 at 12 58 38@2x

@Sansossio
Copy link
Owner

hey @shepherdjerred ! what a nice project congratulations!👌🏻

I have never used deno but of course create the pr! (dont forget to update package version to be able to publish it)

Sansossio added a commit that referenced this issue Nov 28, 2023
* fix: don't set `Origin` to null

fixes an imcompatibility with Deno: #97

* deps: update deps

* bump version to 1.55.0

* fix run examples

---------

Co-authored-by: Julio Sansossio <juliosansossio@gmail.com>
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

No branches or pull requests

2 participants