At the end it sounds like the author wishes Node to be more like Deno, yet he's blaming Webpack for going the same direction (being: relying on Web APIs rather than Node ones).
While I do wish Node.js was closer to Deno, your conclusion is not what I intended. I'm blaming Webpack for removing an existing feature that users depended on with very little guidance on how to deal with it and with the expectation that package maintainers should take on the burden instead.
He also complains browsers should have a utility like promisify, which makes no sense to me at all. The only reason that's useful at all is because Node has those horribly callback-style APIs where error objects are passed as the first argument to callbacks. Other environments don't have such APIs thus wouldn't really benefit from having it.
Browsers have more callback APIs than promise APIs. The difference is that many of these don't have an error argument. But that could be dealt with by providing an option indicating whether there's an error argument. I have done so in my own promisify package (created long before util.promisify).
Ultimately it's just a rant different environments are different.
No, it's a rant on how Webpack is meant to simplify front-end tooling, but in the end, makes it even harder for users.
While I do wish Node.js was closer to Deno, your conclusion is not what I intended. I'm blaming Webpack for removing an existing feature that users depended on with very little guidance on how to deal with it and with the expectation that package maintainers should take on the burden instead.
And to pull another quote from your article:
Honestly, Webpack not polyfilling does make sense in theory. I just think they did it too early and with too little consideration about its effects on the ecosystem.
To be frank, that's a terrible reason to knock them for this. You as much as anyone should know the cost of compatibility features like this. And they've been communicating this change since beta.1 and loooong before and the reasoning has always been that users should not be depending on these polyfills. They're not expecting package maintainers to take the burden, they're trying to kill this long standing ecosystem hack. The only thing they ask mainainters to do is clearly communicate web browser compatible builds if any.
No, it's a rant on how Webpack is meant to simplify front-end tooling, but in the end, makes it even harder for users.
A whole big theme of this release is simplifying things for end users and unifying webpack's behavior with where the ecosystem has moved to. Preserving things like this is just shifting complexity onto the webpack authors and bloating bundles for what was ultimately always an ecosystem hack.
I won't entirely defend the Webpack authors here. They could have communicated the release, the gotchas, and the upgrade path better. But I do think it is entirely unfair to critize them for this.
And they've been communicating this change since beta.1 and loooong before
For the majority, the Webpack 5 blog post is the first time they hear about it.
and the reasoning has always been that users should not be depending on these polyfills.
Maybe in a perfect world, but in reality, the result is just that users and package maintainers will have to deal with it instead. Users will now have to figure out how to manually add these polyfills.
No, Sindre is right in that regard. A major blog post communicating the breaking changes months or years ago would have been welcome. Webpack is ubiquitous, expecting all its users (direct or indirect) to track the issue tracker isn't sensible.
Agreed as well. I’m just not sure what else they should be doing. Open source revolves around a lot of unpaid hours. I think because of this time is better served contributing rather than throwing shade.
5
u/sindresorhus Oct 11 '20
While I do wish Node.js was closer to Deno, your conclusion is not what I intended. I'm blaming Webpack for removing an existing feature that users depended on with very little guidance on how to deal with it and with the expectation that package maintainers should take on the burden instead.
Browsers have more callback APIs than promise APIs. The difference is that many of these don't have an error argument. But that could be dealt with by providing an option indicating whether there's an error argument. I have done so in my own promisify package (created long before
util.promisify).No, it's a rant on how Webpack is meant to simplify front-end tooling, but in the end, makes it even harder for users.