Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
inglor
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
241.
▲
by
inglor
5y ago
@dang I can't seem to be able to edit this is there any way to fix the formatting by any chance?
242.
▲
by
inglor
5y ago
What is "this is how Node does it" complacency you speak of? Node has been talking about Fetch since at least 2018 _before_ Ryan even announced Deno. This is true for promises, ESModules etc. Ryan _attended those meetings_ in the
243.
▲
by
inglor
5y ago
You can use timeouts through `AbortController/AbortSignal` - eventually it'll even be built in with `AbortSignal.timeout` which is currently under-works in the spec level.
244.
▲
by
inglor
5y ago
This is very new and the implementation _just_ landed today so it makes sense Deno would be faster with an API they have been working on for years. I am confident that Node's implementation will _eventually_ have comparable performance
245.
▲
by
inglor
5y ago
You can upload a stream and monitor that for upload progress - so sure. If you upload a string for example you would have to take an extra step to get upload progress (make it into a stream and monitor that). There is additional (unrelated)
246.
▲
by
inglor
5y ago
Those wasm blobs are Node's own llhttp https://github.com/nodejs/llhttp in wasm to speed up HTTP parsing. The project itself added as a dependency is also by Node https://github.com/nodejs/und
247.
▲
by
inglor
5y ago
> `request.formData()` Yes. > FormData Yes, but not in that PR since `FormData` needs to behave differently as part of the platform but there is intent to support it before moving from experimental.
248.
▲
by
inglor
5y ago
There will be a blog post on this in the Node.js blog and official media communication. This _just_ landed today and I suspect the HN crowd are more in the "get news early" camp and not "wait for the official press release&qu
249.
▲
by
inglor
5y ago
Browsers will happily accept `.mjs` files they don't actually care about file extensions only about `Content-Type` and type=module on the script tag :]
250.
▲
by
inglor
5y ago
v17.5 but yeah
251.
▲
by
inglor
5y ago
This is fetch: https://github.com/whatwg/fetch https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API Here is discussion about it in Node with some (pretty old) discussion http
252.
▲
by
inglor
5y ago
It's behind a flag so that it can land in the next v16 semver minor - so soon'ish but keep in mind it _is_ experimental.
253.
▲
by
inglor
5y ago
Not yet but it's planned to eventually happen.
254.
▲
by
inglor
5y ago
A new standard would need buy-in from browsers to actually be a standard. Browsers likely don't have a lot of incentive to make spec changes only Node is interested in (like making the whole spec more complicated from their point of vi
255.
▲
by
inglor
5y ago
Yes, this is a place where Node.js will diverge from the spec see discussion on the fetch PR https://github.com/nodejs/node/pull/41749#issuecomment-10254...
256.
▲
by
inglor
5y ago
We are not, this is a place the server-side implementation is going to diverge and this was discussed in the PR: https://github.com/nodejs/node/pull/41749#issuecomment-10254...
257.
▲
by
inglor
5y ago
node-fetch (which is great btw!) implements fetch "reasonably" as in stuff like `fetch('./foo').then(x => x.json())` works but it's very far from a "real" fetch. Some people argued users would stil
258.
▲
by
inglor
5y ago
It's very easy to re-export ESM (import) as CJS (require) and vice-versa. The main issue is that ESM by default For example to use `require` inside ESModules you would do: ```mjs import { createRequire } from 'module'; const
259.
▲
by
inglor
5y ago
First: not a stupid question - the release cadence, multiple release lines and other minutia of a project like Node are not something I'd expect users to be intimately familiar with! This _just landed today_. You can get it by building
260.
▲
by
inglor
5y ago
The commit adds undici (another Node.js project at https://github.com/nodejs/undici ) as a dependency and exposes its `fetch` - the code changes you see are probably just adding a flag :) > I just wonder how come fe
261.
▲
by
inglor
5y ago
Basically because fetch isn't a great API for servers it took a while to get consensus on actually landing it for the interoprability/simple API value. Then it took a while to get consensus it's fine to do even if we can'
262.
▲
by
inglor
5y ago
I'm happy to hear that but I had a very small part in it all! The person who took it through the finish line (and deserves the most props here IMO) is Michael https://github.com/targos The people who worked most on Und
263.
▲
by
inglor
5y ago
Those have been supported for several years now :) You need to tell Node to use the format by either naming your file `.mjs` or setting `"type": "module"` in your `package.json` file. > Also why do so many libraries h
264.
▲
by
inglor
5y ago
I don't speak for the project a whole :) Node has supported ESModules (`import`) for a while and you can use it (either by naming your files `.mjs` or setting `type: module` in your package.json. There is a solid interop story between
265.
▲
by
inglor
5y ago
In general "when we feel it's ready". For some features I've worked recently (like `flatMap` and friends for streams) I think it'll take about a year. For `fetch` it will take us around a year or two probably. I wro
266.
▲
by
inglor
5y ago
Hey, Node core person here (and the person who triggered the land) - we're super excited for this and would love help and feedback. This is still experimental and we'd love to hear from the community what you'd like to see.
267.
▲
by
inglor
5y ago
This is great. Note it is co-authored by James Snell who I know from Node.js core. He has been a very prolific member working on things like QUIC in Node and web APIs. I can definitely see why this could benefit his work (at Cloudflare) a l
268.
▲
by
inglor
5y ago
Lucky for the Mossad they are not building a competitor to the iPhone/iMac/MacBookPro/iPad etc... They don't have to compete with apple they just have to find an interesting mistake in their code. On phones with tens of
269.
▲
by
inglor
5y ago
Also note the US government has been using companies like NSO to push its own political agenda since it lets it sell this sort of technology to allies (like Saudi Arabia) without scrutiny. This is following two other scandals relating to NS
270.
▲
by
inglor
5y ago
I keep seeing comments about how NSO is Israeli state funded. I think it's not entirely incorrect (am Israeli, know people who work at NSO and people at 8200) - but the relationship is quite sinister and not something the Israeli publi
More ›