josdejong / workerpool

Offload tasks to a pool of workers on node.js and in the browser
Apache License 2.0
2.04k stars 148 forks source link

What's the oldest version of Safari that this package supports? #446

Open blordpluto opened 3 months ago

blordpluto commented 3 months ago

The readme currently says:

workerpool runs on node.js, Chrome, Firefox, Opera, Safari, and IE10+.

Without browser version numbers, this information is not quite useful for me. Could you be more specific? For example, what language features does workerpool use that IE9 doesn't have? Can those features be successfully polyfilled? etc.

josdejong commented 3 months ago

I don't know actually. I've written that sentence 10 years and 23 days ago and never updated it. We should do a bit of testing and update it accordingly.

I did a little test and at least the library isn't working on IE anymore (due to usages of => for example).

Your question about IE9 worries me. You shouldn't be using IE anymore at all, and definitely not older versions of it (IE11 isn's supported for 2 years already, leave alone IE10 or IE9). What kind of browsers do you have to support?

On a side note: you can get a rough idea of browser usage percentages here: https://browsersl.ist/#q=%3E+0.1%25

blordpluto commented 3 months ago

@josdejong Thanks, I'm very familiar with the landscape of evergreen browser tech.

I work on enterprise products for connected televisions, some of which run on highly antiquated browser runtimes. An example would be Chrome 32. It's not a personal choice 😄 . For complex reasons, manufacturers are still releasing these televisions in the year 2024. In my experience, software devs who work on modern browser JS are often surprised to learn this.

To follow your example just a bit, arrow functions can easily be transpiled.

josdejong commented 2 months ago

An example would be Chrome 32. [...] For complex reasons, manufacturers are still releasing these televisions in the year 2024.

😲 I can image old televisions still out there that are using an old browser version, but releasing new televisions using an old browser is really painful. Must be great targets for botnets, having plenty of documented vulnerabilities to pick from 😞 (though users doesnt typically use a TV for intensive browsing, only to use specific apps I suppose).

In https://github.com/josdejong/workerpool/commit/f01d5193f0ee6d275a4bb76f20a3651d426c63e8 I've configured Babel to output code that's compatible with IE10 again, and published that as v9.1.2. Can you give that a try? I think it will work though you need a couple of polyfills.

This backward compatibility makes the bundles 10% larger again, that is a pity. I think it would be good to output two versions: one modern ES version, and one bundle compatible with old browsers.