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

fix(deno): set isDeno to false if version > 1.45.2 #23731

Closed
wants to merge 2 commits into from

Conversation

sc0Vu
Copy link
Contributor

@sc0Vu sc0Vu commented Sep 17, 2024

I think we shouldn't use self. after Deno 1.45.3., based on their comment denoland/deno#24726 (comment), Deno had followed the NodeJs behavior.

In this PR, I added simple comparison from semver (compare major / minor / patch).

# deno version
~/ccxt$ deno -v
deno 1.46.3

# before
~/ccxt$ deno -A binance-fetch-ohlcv-many-symbols-async-await.js
error: Uncaught (in promise) ReferenceError: self is not defined
    at file:///home/ubuntu/ccxt/node_modules/.deno/[email protected]/node_modules/ccxt/js/src/base/ws/WsClient.js:14:48

# patch
~/ccxt$ cp ../platform.js /home/ubuntu/ccxt/node_modules/.deno/[email protected]/node_modules/ccxt/js/src/base/functions
~/ccxt$ cp ../misc.js /home/ubuntu/ccxt/node_modules/.deno/[email protected]/node_modules/ccxt/js/src/base/functions

# after

TODO:

  • checked why the script stuck.
    something wrong happened in node-fetch, it stuck everytime......

The node-fetch seems not work well in deno. I'm gonna find another way to fix this.

@sc0Vu sc0Vu added the bug label Sep 17, 2024
@sc0Vu sc0Vu requested a review from carlosmiei September 17, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant