Skip to content

Commit

Permalink
chore: skip android until upstream support is resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Dec 5, 2019
1 parent 1325bfd commit 8a005fe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
1 change: 0 additions & 1 deletion packages/babel-preset-env/data/built-in-modules.json
Expand Up @@ -6,7 +6,6 @@
"safari": "10.1",
"opera": "48",
"ios_saf": "10.3",
"android": "61",
"op_mob": "48",
"and_chr": "61",
"and_ff": "60",
Expand Down
4 changes: 4 additions & 0 deletions packages/babel-preset-env/scripts/build-modules-support.js
Expand Up @@ -16,6 +16,10 @@ const { stats } = moduleSupport;
const allowedBrowsers = {};

Object.keys(stats).forEach(browser => {
//todo: skip android until https://github.com/browserslist/browserslist/pull/428 is resolved
if (browser === "android") {
return;
}
const browserName = browserNameMap[browser] || browser;
const browserVersions = stats[browserName];
const allowedVersions = Object.keys(browserVersions)
Expand Down
Expand Up @@ -7,7 +7,8 @@ Using targets:
"firefox": "60",
"ios": "10.3",
"opera": "48",
"safari": "10.1"
"safari": "10.1",
"samsung": "8.2"
}

Using modules transform: false
Expand All @@ -22,13 +23,13 @@ Using plugins:
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
proposal-async-generator-functions { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }

Using polyfills with `usage` option:

[<CWD>/packages/babel-preset-env/test/fixtures/corejs2/usage-browserslist-config-ignore/input.mjs] Added following core-js polyfill:
web.dom.iterable { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
web.dom.iterable { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
Expand Up @@ -7,7 +7,8 @@ Using targets:
"firefox": "60",
"ios": "10.3",
"opera": "48",
"safari": "10.1"
"safari": "10.1",
"samsung": "8.2"
}

Using modules transform: false
Expand All @@ -22,14 +23,14 @@ Using plugins:
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
proposal-async-generator-functions { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }

Using polyfills with `usage` option:

[<CWD>/packages/babel-preset-env/test/fixtures/corejs3/usage-browserslist-config-ignore/input.mjs] Added following core-js polyfills:
es.array.iterator { "chrome":"61", "opera":"48" }
web.dom-collections.iterator { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
es.array.iterator { "chrome":"61", "opera":"48", "samsung":"8.2" }
web.dom-collections.iterator { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
6 changes: 5 additions & 1 deletion packages/babel-preset-env/test/targets-parser.spec.js
Expand Up @@ -120,7 +120,7 @@ describe("getTargets", () => {
it("does throws on unsupported versions", () => {
expect(() => {
getTargets({
browsers: "node 15.0.0, chrome 1000",
browsers: "node 1000.0.0, chrome 1000",
});
}).toThrow();
});
Expand Down Expand Up @@ -187,6 +187,7 @@ describe("getTargets", () => {
).toEqual({
chrome: "61.0.0",
safari: "10.1.0",
samsung: "8.2.0",
firefox: "60.0.0",
opera: "48.0.0",
ios: "10.3.0",
Expand All @@ -203,6 +204,7 @@ describe("getTargets", () => {
).toEqual({
chrome: "61.0.0",
safari: "10.1.0",
samsung: "8.2.0",
firefox: "60.0.0",
opera: "48.0.0",
ios: "10.3.0",
Expand All @@ -219,6 +221,7 @@ describe("getTargets", () => {
).toEqual({
chrome: "61.0.0",
safari: "10.1.0",
samsung: "8.2.0",
firefox: "60.0.0",
opera: "48.0.0",
ios: "10.3.0",
Expand All @@ -237,6 +240,7 @@ describe("getTargets", () => {
).toEqual({
chrome: "61.0.0",
safari: "10.1.0",
samsung: "8.2.0",
ios: "10.3.0",
ie: "11.0.0",
edge: "16.0.0",
Expand Down

0 comments on commit 8a005fe

Please sign in to comment.