Contributing

Contributions are always welcome. Feel free to ask @zloirock if you have some questions.

I want to help with code, but I don't know how

There is always some "help wanted" issues. You can look at them first. Sure, other help is also required - you could ask @zloirock about it or open issues if you have some ideas.

How to add a new polyfill

A simple example of adding a new polyfill.

How to update @core-js/compat data

For updating @core-js/compat data:

compat-table

engine how to run tests base data inherits from mandatory check mapping for a new version
android browser runner chrome, chrome_mobile
bun bun runner safari (only ES) required
chrome browser runner required
chrome_mobile browser runner chrome
deno deno runner chrome (only ES) non-ES features required
edge browser runner ie, chrome required (<= 18)
electron browser runner chrome required
firefox browser runner required
firefox_mobile browser runner firefox
hermes hermes runner required
ie browser runner required
ios browser runner safari if inconsistent (!= safari)
node node runner chrome (only ES) non-ES features required
opera browser runner chrome if inconsistent (!= chrome - 14)
opera_mobile browser runner opera, chrome_mobile required
quest browser runner chrome_mobile required
react_native hermes runner hermes required
rhino rhino runner required
safari browser runner required
samsung browser runner chrome_mobile required

If you have no access to all required browsers / versions of browsers, use Sauce Labs, BrowserStack or Cloud Browser.

Style and standards

The coding style should follow our eslint.config.js. You can test it by calling npm run lint. Different places have different syntax and standard library limitations:

File names should be in the kebab-case. Name of polyfill modules should follow the naming convention namespace.subnamespace-where-required.feature-name, for example, es.set.intersection. The top-level namespace should be es for stable ECMAScript features, esnext for ECMAScript proposals and web for other web standards.

Testing

Before testing, you should install dependencies:

npm i

You can run the most tests by

npm t

You can run parts of the test case separately: