qunitjs / qunit

🔮 An easy-to-use JavaScript unit testing framework.
https://qunitjs.com
MIT License
4.02k stars 784 forks source link

Drop support for IE9-IE10 #1725

Closed NullVoxPopuli closed 4 months ago

NullVoxPopuli commented 11 months ago

Hello, I was looking through the rollup config here: https://github.com/qunitjs/qunit/blob/main/rollup.config.js#L43

and saw that babel was configured to support IE9 -- which.. could cause qunit to be over-compiled. can we get rid of that? no one supports IE these days (esp since Edge is now just chrome). I believe this could give us some small perf boosts as well.

thanks!

Krinkle commented 11 months ago

@NullVoxPopuli

Cutting IE9 and IE10 sounds good to me. There hasn't been a semver-major yet, but definitely the next major release can simply cut these from the compiliation target!

For IE11, I'm a bit hesitant, but we could do it. Wikipedia offered Grade A support to IE11 until earlier this year (ref), and GOV.UK is still in the process of phasing out support (ref). It seems a bit too early to cut this off as I don't want QUnit to play a role in deciding against how accessible a company would otherwise make their applications.

If there's specific functional/performance downsides to compiling down to IE11, we could drop it regardless and encourage those to stay on QUnit 2 instead. Another compromise might be to down-compile only the CJS distribution. That should make it pretty cheap to keep support only during the release process and not affecting the ESM distribution.

Noting that we encourage out-of-the-box use as an application and support (simple) projects that don't need a build step.

Krinkle commented 11 months ago

Added to the roadmap. I expect that, this will naturally also break some other older mobile devices and desktop browsers, we can drop those at the same time (i.e. 5+ year versions of Firefox/Chromium/iOS).

NullVoxPopuli commented 11 months ago

For folks using ie11, they can continue to use qunit 2.x, but i don't yet know how much of what i want out of qunit won't be supported by ie11. Need to dig in still.

For compiling, if we want ie11, i think we'd want to do an ie11 specific build, not cjs (browsers don't support cjs natively), probably iife, and that could compile away all the modern syntax that keeps the authoring experiences nice.

So for compilation targets, this brings us to 5 total so far? (All for browser, we haven't even talked about how the cli would work yet)