6 ms·
Interesting how this will play out. It's an ambitious goal to consolidate client side and server side javascript ecosystems which is quite fragmented today. On
by potamic 4y ago
Interesting how this will play out. It's an ambitious goal to consolidate client side and server side javascript ecosystems which is quite fragmented today. On the other hand, this may only increase fragmentation further by introducing another target to develop for (wait for transpilers that can automagically convert between deno and node code). I will always look at javascript as this problem kid that cannot get its shit together in life, perpetually chasing the romance of utopia.
- jitl 4y agoThere is already a system for building a NPM node package from a Deno package, called dnt (deno to node). It's maintained by some Deno team members. Here's a blog post they wrote about porting "Oak" (a deno HTTP server framework) to Node: https://deno.com/blog/dnt-oak https://deno.com/blog/dnt-oak The nice thing about Deno conceptually, is that it's much more similar to the browser platform than node is. It uses ES6 only, has things like `fetch` built-in by default, and generally follows browser standards around interfaces like Request, Response, etc. Instead of needing a complicated build process to make Node code work on the browser, now we have a complicated build process to make Deno/Browser code work on Node. ¯\_(ツ)_/¯
- capableweb 4y agoNot to take away from the rest of your message, I thought you wanted to get up to speed on that `fetch` is now available in nodejs core since version 17 or something like that (think it got included early this year).
- jitl 4y agoI think this requires the `--experimental-fetch` command-line argument (per https://nodejs.org/tr/blog/release/v17.5.0/ https://nodejs.org/tr/blog/release/v17.5.0/), so I don't think it qualifies as "by default".
- wging 4y agoThat's an old blog post; the current release is 18.4.0, which supports `fetch` without a command-line argument. You do get this warning the first time it's invoked, though: (node:340760) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created) (some later blog posts that mention fetch being enabled-by-default and in the global scope are https://nodejs.org/en/blog/announcements/v18-release-announce/ https://nodejs.org/en/blog/announcements/v18-release-announc... and https://nodejs.org/en/blog/release/v18.0.0/ https://nodejs.org/en/blog/release/v18.0.0/)
- wdb 4y agoYeah, but you could use `undici`-package for older Node version as it is being used to provide this experimental Fetch in Node 17+
- the_gipsy 4y agoWhat about using an npm package in deno?
- wperron 4y agoHas been possible (and surprinsingly easy) for a while through CDNs like skypack or esm.sh
- yencabulator 4y agoIt's possible when it happens to work. https://github.com/esm-dev/esm.sh/issues?q=is%3Aissue+is%3Aopen+Failed+to+import https://github.com/esm-dev/esm.sh/issues?q=is%3Aissue+is%3Ao...
- the_gipsy 4y agoSo deno runs JS? I thought it ran exclusively typescript.
- whostolemyhat 4y agoJavascript is Typescript - TS is a superset of JS, so valid JS is valid TS, although you'd almost certainly get lint errors in dev complaining about lack of types.
- melony 4y agoCan the same build pipelines be reused for CF/Fastly workers? The DX for workers is horrible with multiple buggy Wrangler implementations and zero observability into deployed workers.
- danielvaughn 4y agoIt's what I kind of love about it though - the JS ecosystem is Neverland.
- tambourine_man 4y agohttps://xkcd.com/927/ https://xkcd.com/927/
- ricardonunez 4y agoI knew that xkcd before I even clicked. They should update it and increase the number dramatically.
- tambourine_man 4y agoIt could store a cookie and increment the number every time you see the comic
- keyle 4y agoI think we're in the 100s by now, within the javascript ecosystem alone! :)
- ascorbic 4y agoThat's not a fair reply. One of the main benefits of Deno is that they're using existing standards. It's Node that's the outlier.
- thdxr 4y agothere is a group formed including Deno that will work together to try to maintain standards + compatibility https://blog.cloudflare.com/introducing-the-wintercg/ https://blog.cloudflare.com/introducing-the-wintercg/
- rising-sky 4y agoIt's a battle of ideals, you could have have a high entropy ecosystem that's constantly evolving and perhaps "appears" unstable, or an ecosystem that's "gotten it's shit together" and probably trends toward stagnation and apathy
- jjtheblunt 4y agoIs Go a counterexample?
- berkes 4y agoIt is. As is Rust. Grandparent confuses correlation for causation.
- ascorbic 4y agoDeno code is really close to browser code. If you have ESM code that runs in the browser and doesn't need access to the DOM then it's a good bet it'll run on Deno, and vice versa. They use web standards for most things, and anything proprietary is put on the Deno global object. For standards that need adapting to work outside the browser, they're working with Cloudflare and others on WinterCG, which is defining a common baseline for these non-browser runtimes.
- Cthulhu_ 4y agoI do think Deno is a step in the right direction, by reducing the need for transpiler steps (e.g. TS to JS) and embracing JS standards instead of building their own (which is what NodeJS did, but this was in a time when JS had no standard for dependencies or per-file isolation).