Skip to content

Commit

Permalink
Point to Sinon 9 for legacy support
Browse files Browse the repository at this point in the history
  • Loading branch information
fatso83 committed May 11, 2021
1 parent 64aca54 commit 51d1e0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
9 changes: 6 additions & 3 deletions COMPATIBILITY.md
Expand Up @@ -4,13 +4,14 @@ This file is the canonical resource for compatibility goals for the libraries th

## ES2017

The source is as [ES2017][es2017] and requires no transpiler or polyfills in supporting runtimes.
Sinon has historically been written as [ES5][es5], but starting from Sinon 10 we made the breaking change to allow more modern ECMAScript versions, starting with ECMAScript [2017][es2017].
The source version is [ES2017][es2017] and requires no transpiler or polyfills in supporting runtimes.

For legacy runtimes, a transpiler can be used by dependent projects.
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:
Sinon.JS aims at supporting the following runtimes (from our shared [eslint-config][shared-config]).

<!-- browserslist start -->

Expand All @@ -34,4 +35,6 @@ To see what that means in practice, you can use https://browserslist.dev
<a href="https://saucelabs.com/u/sinonjs"><img src="https://saucelabs.com/browser-matrix/sinonjs.svg" alt="Sauce Test Status"></a>
</p>

[es5]: http://www.ecma-international.org/ecma-262/5.1/
[es2017]: https://262.ecma-international.org/8.0/
[shared-config]: https://github.com/sinonjs/eslint-config
20 changes: 5 additions & 15 deletions docs/release-source/release.md
Expand Up @@ -25,24 +25,14 @@ This page contains the entire Sinon.JS API documentation along with brief introd

{% include docs/migration-guides.md %}

## Compatibility

The most up-to-date reference on which runtimes and browsers we support can be found by looking at our shared [eslint-config][shared-config].

### ECMAScript versions

Sinon has historically been written as [ES5][es5], but starting from Sinon 10 we made the breaking change to use more modern ECMAScript versions, starting with ECMAScript [2017][es2017]. `{{page.release_id}}` requires no transpiler or polyfills to run in the runtimes mentioned below.

### Supported runtimes
## Compatibility and supported runtimes

As of Sinon 10 we stopped maintaining compatibility with legacy browsers. Instead, we focus on compatibility with evergreen browsers, [Node.js LTS versions](https://github.com/nodejs/Release) and recent Safari versions.
The most up-to-date reference on which runtimes and browsers we support can be found by looking at our [compatibility docs][compat-doc].

There should not be any issues with using Sinon `{{page.release_id}}` in newer versions of the same runtimes.

If you need to support old runtimes you can try one of the older Sinon versions.
If you need to support old runtimes you can try [Sinon 9][compat-doc-v9].

{% include docs/contribute.md %}

[es5]: http://www.ecma-international.org/ecma-262/5.1/
[es2017]: http://www.ecma-international.org/ecma-262/8.0/
[shared-config]: https://github.com/sinonjs/eslint-config
[compat-doc]: https://github.com/sinonjs/sinon/COMPATIBILITY.md
[compat-doc-v9]: https://github.com/sinonjs/sinon/blob/v9.2.4/COMPATIBILITY.md

0 comments on commit 51d1e0b

Please sign in to comment.