Back to Sinon

Compatibility

COMPATIBILITY.md

21.1.22.0 KB
Original Source

Compatibility

This file is the canonical resource for compatibility goals for the libraries that make up Sinon.JS.

Moving target: ES2023+

Sinon has historically been written as ES5, but starting from Sinon 10 (March 2021) we made the breaking change to allow more modern ECMAScript versions, starting with ECMAScript 2017. This is not a fixed level: it will change in time without us updating it here (though we might, from time to time). The source version requires no transpiler or polyfills in supporting runtimes.

For legacy runtimes, a transpiler can be used by dependent projects, but use of newer APIs might break. If you need to support older browsers, have a look at Sinon 9.

Runtimes

Sinon.JS aims at supporting the following runtimes (from our shared eslint-config).

<!-- browserslist start -->
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 11
not op_mini all
maintained node versions
<!-- browserslist end -->

The compatibility is enforced using eslint-plugin-compat.

To see what that means in practice, you can use https://browserslist.dev

<p align=center> <a href="https://saucelabs.com/u/sinonjs"></a> </p>

Previous supported Node.js

The following table serves as an orientation if support for an older unsupported Node.js version is required.

Sinon.JSsupported Node.js
1818, 20, 22
1718, 20
1616, 18, 20
1514, 16, 18
1414, 16, 18
1312, 14, 16
1212, 14, 16
1112, 14
1010, 12, 14
910, 12
88, 10, 12