You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After Deno 2 was released a lot of the code had to be changed and, during this process, I noticed the browser version now is just a "pure JavaScript without external dependencies" version. Deno 2 no longer is close to a browser, it doesn't even have a window global anymore and the remaining browser-alike features like window.crypto are now supported by Node.js.
So it doesn't longer make sense to use Deno to test the library, we could just use Node.js instead, making the code simpler, easier to maintain and faster.
Maybe we could test using a real browser, but the overload of a real browser is too high it would make testing way too slow (in comparison with now). I know many people test with real browsers, but that seems overkill for this library.
IMHO Deno 2 was a mistake: the way --allow-import was implemented (with a built-in whitelist) goes away the open nature of the internet and the initial idea of using URL imports, which is was one of the core ideas of Deno 1 and that motivated me to use for single-file scripts and the examples section of MEGAJS. Deno 1 tried to be browser compatible but Deno 2 ditched it completely by removing the window global and adding Node.js compatibility. Deno 2 for me is just trying to be a Node.js alternative with TypeScript and permission models. The built-in features like the linter are just wasted network and disk space, as they are useless for me for having so few configurations. Even TypeScript being built-in for me is a problem since its implementation is different from TSC which causes issues (probably the type definitions from MEGAJS aren't working because of that). Thus, for me, I don't understand someone would want to use Deno nowadays unless they plan to use TypeScript, Deno complicated permission models, have benchmarked it and found it was faster for their use-case or have an existing project. You can just use Node.js and have fewer issues as it have a way larger community to support it and because it's way more stable (Node.js wouldn't drop window breaking a lot of the existing code base).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
After Deno 2 was released a lot of the code had to be changed and, during this process, I noticed the browser version now is just a "pure JavaScript without external dependencies" version. Deno 2 no longer is close to a browser, it doesn't even have a
window
global anymore and the remaining browser-alike features likewindow.crypto
are now supported by Node.js.So it doesn't longer make sense to use Deno to test the library, we could just use Node.js instead, making the code simpler, easier to maintain and faster.
Maybe we could test using a real browser, but the overload of a real browser is too high it would make testing way too slow (in comparison with now). I know many people test with real browsers, but that seems overkill for this library.
Beta Was this translation helpful? Give feedback.
All reactions