Comment by philipwhiuk

Comment by philipwhiuk 5 days ago

4 replies

The lesson surely though is 'don't use web-tech, aimed at solving browser incompatibility issues for local scripting'.

When you're running NPM tooling you're running libraries primarily built for those problems, hence the torrent of otherwise unnecessary complexity of polyfills, that happen to be running on a JS engine that doesn't get a browser attached to it.

bakkoting 5 days ago

Very few packages published on npm include polyfills, especially packages you'd use when doing local scripting.

  • jazzypants 4 days ago

    I'm sorry, but this is just incorrect. Have you ever heard of ljharb[0]? The NPM ecosystem is rife with polyfills[1]. I don't know how you can make a distinction on which libraries would be used for "local scripting" as I don't think many library authors make that distinction.

    [0] - TC39 member who is self-described as "obsessed with backwards compatibility": https://github.com/ljharb

    [1] - Here's one of many articles describing the situation: https://marvinh.dev/blog/speeding-up-javascript-ecosystem-pa...

    • bakkoting 4 days ago

      Yes. I'm on TC39 as well, and I've talked to Jordan about this topic.

      It's true that there are a few people who publish packages on npm including polyfills, Jordan among them. But these are a very small fraction of all packages on npm, and none of the compromised packages were polyfills. Also, he cares about backwards compatibility _with old versions of node_; the fact that JavaScript was originally a web language, as the grandparent comment says, is completely irrelevant to the inclusion of those specific polyfills.

      Polyfills are just completely irrelevant to this discussion.

      • jazzypants 4 days ago

        Fair enough. Thank you for the clarification, and I apologize for not recognizing your status as a TC39 member.