Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bevry/nodejs-ecmascript-compatibility

bevry165Artistic-2.05.8.0TypeScript support: included

API for the Node.js ECMAScript Compatibility information, such that for a particular Node.js release, you get details on which and how many features of an ECMAScript version are supported.

active, browser, compat, compatibility, current, date, deno, deno-edition, deno-entry, denoland, ecmascript, edition, editions, end, es, es2022, feature, features, fetch, filter, green, lts, maintenance, module, node, node-compat-table, node.green, node.js, nodejs, ratified, release, released, releases, start, typed, types, typescript, version, versions

readme

Node.js ECMAScript Compatibility

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

API for the Node.js ECMAScript Compatibility information, such that for a particular Node.js release, you get details on which and how many features of an ECMAScript version are supported.

Usage

Complete API Documentation.

import {
    fetchNodeVersionCompatibility,
    fetchNodeVersionsCompatibility,
    fetchMutualCompatibleESVersionsForNodeVersions,
    fetchExclusiveCompatibleESVersionsForNodeVersions,
    fetchAllCompatibleESVersionsForNodeVersions,
} from '@bevry/nodejs-ecmascript-compatibility'

// fetch the compatibility information for the current node.js version
fetchNodeVersionCompatibility().then(console.log)

// fetch the details for a specific node.js version
fetchNodeVersionCompatibility('4.9.1').then(console.log)

// fetch the details for multiple node.js versions
fetchNodeVersionsCompatibility(['4.9.1', '12.0.0']).then(console.log)

// fetch each ECMAScript version that supports both releases
fetchMutualCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

// fetch the minimum ECMAScript versions required to support both releases
fetchExclusiveCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

// fetch each ECMAScript version that supports either release
fetchAllCompatibleESVersionsForNodeVersions(['4.9.1', '12.0.0']).then(
    console.log,
)

Node.js versions 15 and 16 will need to use --experimental-global-fetch.

Install

npm

  • Install: npm install --save @bevry/nodejs-ecmascript-compatibility
  • Import: import * as pkg from ('@bevry/nodejs-ecmascript-compatibility')
  • Require: const pkg = require('@bevry/nodejs-ecmascript-compatibility')

Deno

import * as pkg from 'https://unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0/edition-deno/index.ts'

Skypack

<script type="module">
    import * as pkg from '//cdn.skypack.dev/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>

unpkg

<script type="module">
    import * as pkg from '//unpkg.com/@bevry/nodejs-ecmascript-compatibility@^5.8.0'
</script>

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/@bevry/nodejs-ecmascript-compatibility@5.8.0'
</script>

Editions

This package is published with the following editions:

  • @bevry/nodejs-ecmascript-compatibility/source/index.ts is TypeScript source code with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-browsers/index.js is TypeScript compiled against ES2022 for web browsers with Import for modules
  • @bevry/nodejs-ecmascript-compatibility aliases @bevry/nodejs-ecmascript-compatibility/edition-es2022/index.js
  • @bevry/nodejs-ecmascript-compatibility/edition-es2022/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Require for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-es2022-esm/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-types/index.d.ts is TypeScript compiled Types with Import for modules
  • @bevry/nodejs-ecmascript-compatibility/edition-deno/index.ts is TypeScript source code made to be compatible with Deno

History

Discover the release history by heading on over to the HISTORY.md file.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

  • Andrew Nesbitt — Software engineer and researcher
  • Balsa — We're Balsa, and we're building tools for builders.
  • Codecov — Empower developers with tools to improve code quality and testing.
  • Poonacha Medappa
  • Rob Morris
  • Sentry — Real-time crash reporting for your web apps, mobile apps, and games.
  • Syntax — Syntax Podcast

Donors

License

Unless stated otherwise all works are:

and licensed under:

changelog

History

v5.8.0 2023 December 30

v5.7.0 2023 December 28

v5.6.0 2023 December 6

v5.5.0 2023 November 25

v5.4.0 2023 November 21

v5.3.0 2023 November 20

v5.2.0 2023 November 20

v5.1.0 2023 November 2

v5.0.0 2023 November 1

  • Updated dependencies, base files, and editions using boundation
  • Updated license from MIT to Artistic-2.0
  • Minimum required node version changed from node: >=10 to node: >=18 to keep up with mandatory ecosystem changes
  • No longer uses node-fetch, instead uses the Node.js fetch builtin
  • Changed default threshold to 85% to support ES2018 with Node.js 14

v4.5.0 2021 July 30

v4.4.0 2021 July 29

v4.3.0 2021 July 28

v4.2.1 2021 July 28

  • Fixed the functionality of v4.2.1 for its intended use case

v4.2.0 2021 July 28

  • For the simpler API methods, it now supports a fallback return pre-seeded by a specified ECMAScript version (defaults to ES5) for when the API is inaccessible or the Node.js release has not yet had data added for it, such as Node.js v0.8.x.

v4.1.0 2021 July 28

  • Now supports significant Node.js version numbers, such as 12 or 0.12

v4.0.0 2021 July 28

  • Prior fetchExclusiveCompatibleESVersionsForNodeVersions is now fetchAllCompatibleESVersionsForNodeVersions
  • fetchExclusiveCompatibleESVersionsForNodeVersions now only returns the minimum amount of ECMAScript versions that are required to support the specified Node.js releases, which was its intent

v3.0.0 2021 July 28

  • Same API, however additional properties and methods for simplifying the identification of which ECMAScript versions are actually compatible

v2.0.0 2021 July 27

  • Now explicit about what version is what
  • Now includes the information of the versions in each ECMAScript version compatibility result for simplicity

v1.0.0 2021 July 26

  • Initial working release