Skip to content

Commit

Permalink
Merge pull request #1103 from zloirock/bun
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock authored Jul 24, 2022
2 parents 7c9361b + b8f5eee commit 1f78646
Show file tree
Hide file tree
Showing 10 changed files with 282 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 1f78646

Please sign in to comment.