Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use chrome data when android is absent (#10790)
* chore: rename test folder * chore: add test case * fix: use chrome support data when android is absent * chore: add type annotation * chore: add testcases last 2 versions not ie * chore: bump browerslist to v4.8.2 * chore: update test fixtures * chore: update test fixtures
- Loading branch information
Showing
19 changed files
with
284 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/debug/browserslists-android-3/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "core-js"; |
17 changes: 17 additions & 0 deletions
17
packages/babel-preset-env/test/fixtures/debug/browserslists-android-3/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"validateLogs": true, | ||
"ignoreOutput": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"debug": true, | ||
"targets": { | ||
"browsers": [ | ||
"android 3" | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} |
46 changes: 46 additions & 0 deletions
46
packages/babel-preset-env/test/fixtures/debug/browserslists-android-3/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@babel/preset-env: `DEBUG` option | ||
|
||
Using targets: | ||
{ | ||
"android": "3" | ||
} | ||
|
||
Using modules transform: auto | ||
|
||
Using plugins: | ||
transform-template-literals { "android":"3" } | ||
transform-literals { "android":"3" } | ||
transform-function-name { "android":"3" } | ||
transform-arrow-functions { "android":"3" } | ||
transform-block-scoped-functions { "android":"3" } | ||
transform-classes { "android":"3" } | ||
transform-object-super { "android":"3" } | ||
transform-shorthand-properties { "android":"3" } | ||
transform-duplicate-keys { "android":"3" } | ||
transform-computed-properties { "android":"3" } | ||
transform-for-of { "android":"3" } | ||
transform-sticky-regex { "android":"3" } | ||
transform-dotall-regex { "android":"3" } | ||
transform-unicode-regex { "android":"3" } | ||
transform-spread { "android":"3" } | ||
transform-parameters { "android":"3" } | ||
transform-destructuring { "android":"3" } | ||
transform-block-scoping { "android":"3" } | ||
transform-typeof-symbol { "android":"3" } | ||
transform-new-target { "android":"3" } | ||
transform-regenerator { "android":"3" } | ||
transform-exponentiation-operator { "android":"3" } | ||
transform-async-to-generator { "android":"3" } | ||
proposal-async-generator-functions { "android":"3" } | ||
proposal-object-rest-spread { "android":"3" } | ||
proposal-unicode-property-regex { "android":"3" } | ||
proposal-json-strings { "android":"3" } | ||
proposal-optional-catch-binding { "android":"3" } | ||
transform-named-capturing-groups-regex { "android":"3" } | ||
transform-member-expression-literals { "android":"3" } | ||
transform-property-literals { "android":"3" } | ||
transform-reserved-words { "android":"3" } | ||
transform-modules-commonjs { "android":"3" } | ||
proposal-dynamic-import { "android":"3" } | ||
|
||
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "core-js"; |
19 changes: 19 additions & 0 deletions
19
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"validateLogs": true, | ||
"ignoreOutput": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"debug": true, | ||
"targets": { | ||
"browsers": [ | ||
"defaults", | ||
"not ie 11", | ||
"not ie_mob 11" | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} |
50 changes: 50 additions & 0 deletions
50
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@babel/preset-env: `DEBUG` option | ||
|
||
Using targets: | ||
{ | ||
"android": "77", | ||
"chrome": "77", | ||
"edge": "17", | ||
"firefox": "68", | ||
"ios": "12.2", | ||
"opera": "63", | ||
"safari": "5.1", | ||
"samsung": "9.2" | ||
} | ||
|
||
Using modules transform: auto | ||
|
||
Using plugins: | ||
transform-template-literals { "ios":"12.2", "safari":"5.1" } | ||
transform-literals { "safari":"5.1" } | ||
transform-function-name { "edge":"17", "safari":"5.1" } | ||
transform-arrow-functions { "safari":"5.1" } | ||
transform-block-scoped-functions { "safari":"5.1" } | ||
transform-classes { "safari":"5.1" } | ||
transform-object-super { "safari":"5.1" } | ||
transform-shorthand-properties { "safari":"5.1" } | ||
transform-duplicate-keys { "safari":"5.1" } | ||
transform-computed-properties { "safari":"5.1" } | ||
transform-for-of { "safari":"5.1" } | ||
transform-sticky-regex { "safari":"5.1" } | ||
transform-dotall-regex { "edge":"17", "firefox":"68", "safari":"5.1" } | ||
transform-unicode-regex { "safari":"5.1" } | ||
transform-spread { "safari":"5.1" } | ||
transform-parameters { "edge":"17", "safari":"5.1" } | ||
transform-destructuring { "safari":"5.1" } | ||
transform-block-scoping { "safari":"5.1" } | ||
transform-typeof-symbol { "safari":"5.1" } | ||
transform-new-target { "safari":"5.1" } | ||
transform-regenerator { "safari":"5.1" } | ||
transform-exponentiation-operator { "safari":"5.1" } | ||
transform-async-to-generator { "safari":"5.1" } | ||
proposal-async-generator-functions { "edge":"17", "safari":"5.1" } | ||
proposal-object-rest-spread { "edge":"17", "safari":"5.1" } | ||
proposal-unicode-property-regex { "edge":"17", "firefox":"68", "safari":"5.1" } | ||
proposal-json-strings { "edge":"17", "safari":"5.1" } | ||
proposal-optional-catch-binding { "edge":"17", "safari":"5.1" } | ||
transform-named-capturing-groups-regex { "edge":"17", "firefox":"68", "safari":"5.1" } | ||
transform-modules-commonjs { "android":"77", "chrome":"77", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" } | ||
proposal-dynamic-import { "android":"77", "chrome":"77", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" } | ||
|
||
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "core-js"; |
15 changes: 15 additions & 0 deletions
15
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"validateLogs": true, | ||
"ignoreOutput": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"debug": true, | ||
"targets": { | ||
"browsers": "defaults" | ||
} | ||
} | ||
] | ||
] | ||
} |
51 changes: 51 additions & 0 deletions
51
packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@babel/preset-env: `DEBUG` option | ||
|
||
Using targets: | ||
{ | ||
"android": "77", | ||
"chrome": "77", | ||
"edge": "17", | ||
"firefox": "68", | ||
"ie": "11", | ||
"ios": "12.2", | ||
"opera": "63", | ||
"safari": "5.1", | ||
"samsung": "9.2" | ||
} | ||
|
||
Using modules transform: auto | ||
|
||
Using plugins: | ||
transform-template-literals { "ie":"11", "ios":"12.2", "safari":"5.1" } | ||
transform-literals { "ie":"11", "safari":"5.1" } | ||
transform-function-name { "edge":"17", "ie":"11", "safari":"5.1" } | ||
transform-arrow-functions { "ie":"11", "safari":"5.1" } | ||
transform-block-scoped-functions { "safari":"5.1" } | ||
transform-classes { "ie":"11", "safari":"5.1" } | ||
transform-object-super { "ie":"11", "safari":"5.1" } | ||
transform-shorthand-properties { "ie":"11", "safari":"5.1" } | ||
transform-duplicate-keys { "ie":"11", "safari":"5.1" } | ||
transform-computed-properties { "ie":"11", "safari":"5.1" } | ||
transform-for-of { "ie":"11", "safari":"5.1" } | ||
transform-sticky-regex { "ie":"11", "safari":"5.1" } | ||
transform-dotall-regex { "edge":"17", "firefox":"68", "ie":"11", "safari":"5.1" } | ||
transform-unicode-regex { "ie":"11", "safari":"5.1" } | ||
transform-spread { "ie":"11", "safari":"5.1" } | ||
transform-parameters { "edge":"17", "ie":"11", "safari":"5.1" } | ||
transform-destructuring { "ie":"11", "safari":"5.1" } | ||
transform-block-scoping { "ie":"11", "safari":"5.1" } | ||
transform-typeof-symbol { "ie":"11", "safari":"5.1" } | ||
transform-new-target { "ie":"11", "safari":"5.1" } | ||
transform-regenerator { "ie":"11", "safari":"5.1" } | ||
transform-exponentiation-operator { "ie":"11", "safari":"5.1" } | ||
transform-async-to-generator { "ie":"11", "safari":"5.1" } | ||
proposal-async-generator-functions { "edge":"17", "ie":"11", "safari":"5.1" } | ||
proposal-object-rest-spread { "edge":"17", "ie":"11", "safari":"5.1" } | ||
proposal-unicode-property-regex { "edge":"17", "firefox":"68", "ie":"11", "safari":"5.1" } | ||
proposal-json-strings { "edge":"17", "ie":"11", "safari":"5.1" } | ||
proposal-optional-catch-binding { "edge":"17", "ie":"11", "safari":"5.1" } | ||
transform-named-capturing-groups-regex { "edge":"17", "firefox":"68", "ie":"11", "safari":"5.1" } | ||
transform-modules-commonjs { "android":"77", "chrome":"77", "edge":"17", "firefox":"68", "ie":"11", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" } | ||
proposal-dynamic-import { "android":"77", "chrome":"77", "edge":"17", "firefox":"68", "ie":"11", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" } | ||
|
||
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "core-js"; |
19 changes: 19 additions & 0 deletions
19
...es/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"validateLogs": true, | ||
"ignoreOutput": true, | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"debug": true, | ||
"targets": { | ||
"browsers": [ | ||
"last 2 versions", | ||
"not ie <= 11", | ||
"not ie_mob <= 11" | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
...ages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@babel/preset-env: `DEBUG` option | ||
|
||
Using targets: | ||
{ | ||
"android": "77", | ||
"chrome": "77", | ||
"edge": "17", | ||
"firefox": "70", | ||
"ios": "13", | ||
"opera": "63", | ||
"safari": "12.1", | ||
"samsung": "9.2" | ||
} | ||
|
||
Using modules transform: auto | ||
|
||
Using plugins: | ||
transform-template-literals { "safari":"12.1" } | ||
transform-function-name { "edge":"17" } | ||
transform-dotall-regex { "edge":"17", "firefox":"70" } | ||
transform-parameters { "edge":"17" } | ||
proposal-async-generator-functions { "edge":"17" } | ||
proposal-object-rest-spread { "edge":"17" } | ||
proposal-unicode-property-regex { "edge":"17", "firefox":"70" } | ||
proposal-json-strings { "edge":"17" } | ||
proposal-optional-catch-binding { "edge":"17" } | ||
transform-named-capturing-groups-regex { "edge":"17", "firefox":"70" } | ||
transform-modules-commonjs { "android":"77", "chrome":"77", "edge":"17", "firefox":"70", "ios":"13", "opera":"63", "safari":"12.1", "samsung":"9.2" } | ||
proposal-dynamic-import { "android":"77", "chrome":"77", "edge":"17", "firefox":"70", "ios":"13", "opera":"63", "safari":"12.1", "samsung":"9.2" } | ||
|
||
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.