Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compat data for Bun #1103

Merged
merged 5 commits into from Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
## Changelog
##### Unreleased
- Polyfill `Promise` with `unhandledrejection` event support (browser style) in Deno < [1.24](https://github.com/denoland/deno/releases/tag/v1.24.0)
- Added compat data for Bun, [#1103](https://github.com/zloirock/core-js/issues/1103)
- Added compat data for Hermes, [#1099](https://github.com/zloirock/core-js/issues/1099)
- Added compat data for Oculus Browser, [#1098](https://github.com/zloirock/core-js/issues/1098)

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -25,6 +25,7 @@ For updating `core-js-compat` data:

- If you want to add new data for NodeJS, run `npm run compat-node` with the installed required NodeJS version and you will see the results in the console. Use `npm run compat-node-json` if you want to get the result as JSON.
- If you want to add new data for Deno, run `npm run compat-deno` with the installed required Deno version and you will see the results in the console. Use `npm run compat-deno-json` if you want to get the result as JSON.
- If you want to add new data for Bun, run `npm run compat-bun` with the installed required Bun version and you will see the results in the console.
- If you want to add new data for Rhino, set the required Rhino version in `compat-rhino-prepare` NPM script in [`package.json`](./package.json), run `npm run compat-rhino` and you will see the results in the console.
- If you want to add new data for Hermes, run `npm run compat-hermes -- YOR_PATH_TO_HERMES` and you will see the results in the console.
- After getting this data, add it to [`packages/core-js-compat/src/data.mjs`](./packages/core-js-compat/src/data.mjs).
Expand All @@ -33,6 +34,7 @@ For updating `core-js-compat` data:
engine | mandatory check | how to run tests | base data inherits from | mapping for a new version
--- | --- | --- | --- | ---
`android` | | browser runner | `chrome` |
`bun` | features | bun runner | |
`chrome` | features | browser runner | |
`deno` | non-ES features | deno runner | `chrome` (only ES) | required
`edge` | features | browser runner | `ie` (<=18), `chrome` (>=74) |
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -103,11 +103,12 @@
"check-unused-modules": "zx scripts/check-unused-modules.mjs",
"check-v8-protectors": "node --trace-protector-invalidation packages/core-js",
"check": "run-s check-v8-protectors check-unused-modules check-compat-tests check-modules-by-versions check-mapping check-dependencies",
"compat-node": "node tests/compat/node-runner",
"compat-node-json": "node tests/compat/node-runner --mode=JSON",
"compat-bun": "bun tests/compat/bun-runner.js",
"compat-deno": "deno run --allow-read tests/compat/deno-runner.mjs",
"compat-deno-json": "deno run --allow-read tests/compat/deno-runner.mjs --mode=JSON",
"compat-hermes": "zx tests/compat/hermes-adapter.mjs",
"compat-node": "node tests/compat/node-runner",
"compat-node-json": "node tests/compat/node-runner --mode=JSON",
"compat-rhino": "run-s compat-rhino-prepare compat-rhino-run",
"compat-rhino-prepare": "zx tests/compat/rhino-prepare.mjs --version=1.7.14",
"compat-rhino-run": "java -jar tests/compat/rhino.jar -version 200 -require tests/compat/rhino-runner.js",
Expand Down
1 change: 1 addition & 0 deletions packages/core-js-compat/README.md
Expand Up @@ -66,6 +66,7 @@ console.log(targets);
// object:
{
android: '4.0', // Android WebView version
bun: '0.1.2', // Bun version
chrome: '38', // Chrome version
deno: '1.12', // Deno version
edge: '13', // Edge version
Expand Down