diff --git a/packages/core/core/src/public/Environment.js b/packages/core/core/src/public/Environment.js index 8123280447d..050ef042862 100644 --- a/packages/core/core/src/public/Environment.js +++ b/packages/core/core/src/public/Environment.js @@ -66,7 +66,10 @@ const supportData = { and_ff: '68', samsung: '8.2', and_qq: '10.4', + and_uc: '15.5', op_mob: '64', + kaios: '3', + baidu: '7.18', }, 'dynamic-import': { edge: '76', @@ -74,13 +77,16 @@ const supportData = { chrome: '63', safari: '11.1', opera: '50', - ios: '11.3', + ios: '11.0', android: '63', and_chr: '63', and_ff: '67', samsung: '8', and_qq: '10.4', + and_uc: '15.5', op_mob: '64', + baidu: '7.18', + kaios: '3', }, 'worker-module': { edge: '80', @@ -104,13 +110,14 @@ const supportData = { and_ff: '62', samsung: '9.2', and_qq: '10.4', + and_uc: '15.5', op_mob: '64', }, 'arrow-functions': { - chrome: '47', - opera: '34', - edge: '13', - firefox: '45', + chrome: '45', + opera: '32', + edge: '12', + firefox: '22', safari: '10', node: '6', ios: '10', @@ -122,7 +129,10 @@ const supportData = { kaios: '2.5', and_chr: '50', and_qq: '12.12', + and_uc: '15.5', + and_ff: '22', op_mob: '64', + baidu: '6.4', }, 'global-this': { chrome: '75', diff --git a/packages/core/core/test/PublicEnvironment.test.js b/packages/core/core/test/PublicEnvironment.test.js index c3a3f72a79d..99e4c4793d4 100644 --- a/packages/core/core/test/PublicEnvironment.test.js +++ b/packages/core/core/test/PublicEnvironment.test.js @@ -9,11 +9,9 @@ describe('Public Environment', () => { it('has correct support data for ChromeAndroid', () => { let env = new PublicEnvironment( createEnvironment({ - context: 'browser', engines: { browsers: ['last 1 Chrome version', 'last 1 ChromeAndroid version'], }, - outputFormat: 'esmodule', }), DEFAULT_OPTIONS, ); @@ -24,4 +22,31 @@ describe('Public Environment', () => { assert(env.supports('import-meta-url')); assert(env.supports('arrow-functions')); }); + it('matches browserslist for es6-modules support', () => { + let env = new PublicEnvironment( + createEnvironment({ + engines: {browsers: 'fully supports es6-module'}, + }), + DEFAULT_OPTIONS, + ); + assert(env.supports('esmodules')); + }); + it('matches browserslist for dynamic-imports support', () => { + let env = new PublicEnvironment( + createEnvironment({ + engines: {browsers: 'fully supports es6-module-dynamic-import'}, + }), + DEFAULT_OPTIONS, + ); + assert(env.supports('dynamic-import')); + }); + it('matches browserslist for arrow-functions support', () => { + let env = new PublicEnvironment( + createEnvironment({ + engines: {browsers: 'fully supports arrow-functions'}, + }), + DEFAULT_OPTIONS, + ); + assert(env.supports('arrow-functions')); + }); }); diff --git a/yarn.lock b/yarn.lock index bc22cf96e87..9996b3fa47a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4074,9 +4074,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001272, caniuse-lite@^1.0.30001541: - version "1.0.30001564" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz#eaa8bbc58c0cbccdcb7b41186df39dd2ba591889" - integrity sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg== + version "1.0.30001627" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz" + integrity sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw== ccount@^1.0.0: version "1.1.0"