Re:Deno raises $21M
by capableweb on Tuesday June 21, 2022 @03:25PM
(#31828045)
Not 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).
I think this requires the `--experimental-fetch` command-line argument (per https://nodejs.org/tr/blog/release/v17.5.0/), so I don't think it qualifies as "by default".
That'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-announc... and https://nodejs.org/en/blog/release/v18.0.0/)Yeah, but you could use `undici`-package for older Node version as it is being used to provide this experimental Fetch in Node 17+
Can 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.
What about using an npm package in deno?
Has been possible (and surprinsingly easy) for a while through CDNs like skypack or esm.sh
Re:Deno raises $21M
by yencabulator on Wednesday June 22, 2022 @08:12PM
(#31843543)
It's possible when it happens to work.
https://github.com/esm-dev/esm.sh/issues?q=is%3Aissue+is%3Ao...
So deno runs JS? I thought it ran exclusively typescript.
Re:Deno raises $21M
by whostolemyhat on Wednesday June 22, 2022 @05:34AM
(#31833736)
Javascript 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.
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. ¯\_(ツ)_/¯