Skip to content

Commit

Permalink
add Deno 1.14 compat data mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Aug 17, 2021
1 parent b1d2031 commit 69601f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
##### Unreleased
- Added a workaround of a Closure Compiler unsafe optimization, [#972](https://github.com/zloirock/core-js/issues/972)
- One more fix crashing of `Object.create(null)` on WSH, [#970](https://github.com/zloirock/core-js/issues/970)
- Added Deno 1.14 compat data mapping

##### 3.16.1 - 2021.08.09
- Fixed microtask implementation on iOS Pebble, [#967](https://github.com/zloirock/core-js/issues/967)
Expand Down
1 change: 1 addition & 0 deletions packages/core-js-compat/src/mapping.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {
[91, '1.9'],
[92, '1.12'],
[93, '1.13'],
[94, '1.14'],
],
// https://github.com/mdn/browser-compat-data/blob/main/browsers/samsunginternet_android.json
ChromeToSamsung: [
Expand Down
8 changes: 4 additions & 4 deletions scripts/check-compat-data-mapping.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ async function getJSON(path) {
return result.json();
}

async function latestMDN(name) {
async function latestMDN(name, branch = 'mdn/browser-compat-data/main') {
const {
browsers: { [name]: { releases } },
} = await getJSON(`https://raw.githubusercontent.com/mdn/browser-compat-data/main/browsers/${ name }.json`);
} = await getJSON(`https://raw.githubusercontent.com/${ branch }/browsers/${ name }.json`);
const version = Object.keys(releases).reduce((a, b) => {
return releases[b].engine_version && cmp(coerce(b), '>', coerce(a)) ? b : a;
});
Expand All @@ -40,8 +40,8 @@ const [{ v8 }] = await getJSON('https://nodejs.org/dist/index.json');
assert(modernV8ToChrome(v8) <= latest(mapping.ChromeToNode)[0], 'NodeJS');

// wait for https://github.com/mdn/browser-compat-data/pull/10753
// const deno = await latestMDN('deno');
// assert(modernV8ToChrome(deno.engine) <= latest(mapping.ChromeToDeno)[0], 'Opera Mobile');
const deno = await latestMDN('deno', 'lucacasonato/browser-compat-data/deno');
assert(modernV8ToChrome(deno.engine) <= latest(mapping.ChromeToDeno)[0], 'Deno');

const samsung = await latestMDN('samsunginternet_android');
assert(samsung.engine <= latest(mapping.ChromeToSamsung)[0], 'Samsung Internet');
Expand Down

0 comments on commit 69601f3

Please sign in to comment.