fix: more

This commit is contained in:
evilebottnawi 2020-11-02 19:08:06 +03:00
parent 868613d4c0
commit 480c4c0761
3 changed files with 58 additions and 23 deletions

View File

@ -182,6 +182,7 @@
"onconnect", "onconnect",
"nwjs", "nwjs",
"redeclaration", "redeclaration",
"kaios",
"webassemblyjs", "webassemblyjs",
"fsevents", "fsevents",

View File

@ -103,27 +103,32 @@ const resolve = browsers => {
const anyBrowser = browsers.some(b => /^(?!node)/.test(b)); const anyBrowser = browsers.some(b => /^(?!node)/.test(b));
const browserProperty = !anyBrowser ? false : anyNode ? null : true; const browserProperty = !anyBrowser ? false : anyNode ? null : true;
const nodeProperty = !anyNode ? false : anyBrowser ? null : true; const nodeProperty = !anyNode ? false : anyBrowser ? null : true;
// Internet Explorer Mobile, Blackberry browser and Opera Mini are very old browsers, they do not support new features
const es6DynamicImport = rawChecker({ const es6DynamicImport = rawChecker({
chrome: 63, chrome: 63,
and_chr: 63, and_chr: 63,
edge: 79, edge: 79,
firefox: 67, firefox: 67,
and_ff: 67, and_ff: 67,
// ie: Not supported, // ie: Not supported
opera: 50, opera: 50,
op_mob: 46, op_mob: 46,
safari: [11, 1], safari: [11, 1],
ios_saf: [11, 3], ios_saf: [11, 3],
samsung: [8, 0], samsung: [8, 2],
android: 63, android: 63,
and_qq: [10, 4],
// baidu: Not supported
// and_uc: Not supported
// kaios: Not supported
// Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0 // Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0
node: [13, 14] node: [13, 14]
}); });
return { return {
const: rawChecker({ const: rawChecker({
chrome: 21, chrome: 49,
and_chr: 25, and_chr: 49,
edge: 12, edge: 12,
// Prior to Firefox 13, <code>const</code> is implemented, but re-assignment is not failing. // Prior to Firefox 13, <code>const</code> is implemented, but re-assignment is not failing.
// Prior to Firefox 46, a <code>TypeError</code> was thrown on redeclaration instead of a <code>SyntaxError</code>. // Prior to Firefox 46, a <code>TypeError</code> was thrown on redeclaration instead of a <code>SyntaxError</code>.
@ -131,13 +136,18 @@ const resolve = browsers => {
and_ff: 36, and_ff: 36,
// Not supported in for-in and for-of loops // Not supported in for-in and for-of loops
// ie: Not supported // ie: Not supported
opera: 9, opera: 36,
op_mob: [10, 1], op_mob: 36,
safari: [5, 1], safari: [10, 0],
ios_saf: 6, ios_saf: [10, 0],
// Before 5.0 supported correctly in strict mode, otherwise supported without block scope // Before 5.0 supported correctly in strict mode, otherwise supported without block scope
samsung: [5, 0], samsung: [5, 0],
android: 37, android: 37,
and_qq: [10, 4],
// Supported correctly in strict mode, otherwise supported without block scope
// baidu: Not supported
and_uc: [12, 12],
kaios: [2, 5],
node: [6, 0] node: [6, 0]
}), }),
arrowFunction: rawChecker({ arrowFunction: rawChecker({
@ -155,6 +165,10 @@ const resolve = browsers => {
ios_saf: 10, ios_saf: 10,
samsung: [5, 0], samsung: [5, 0],
android: 45, android: 45,
and_qq: [10, 4],
baidu: [7, 12],
and_uc: [12, 12],
kaios: [2, 5],
node: [6, 0] node: [6, 0]
}), }),
forOf: rawChecker({ forOf: rawChecker({
@ -171,6 +185,10 @@ const resolve = browsers => {
ios_saf: 7, ios_saf: 7,
samsung: [3, 0], samsung: [3, 0],
android: 38, android: 38,
// and_qq: Unknown support
// baidu: Unknown support
// and_uc: Unknown support
// kaios: Unknown support
node: [0, 12] node: [0, 12]
}), }),
destructuring: rawChecker({ destructuring: rawChecker({
@ -186,6 +204,10 @@ const resolve = browsers => {
ios_saf: 8, ios_saf: 8,
samsung: [5, 0], samsung: [5, 0],
android: 49, android: 49,
// and_qq: Unknown support
// baidu: Unknown support
// and_uc: Unknown support
// kaios: Unknown support
node: [6, 0] node: [6, 0]
}), }),
bigIntLiteral: rawChecker({ bigIntLiteral: rawChecker({
@ -199,8 +221,12 @@ const resolve = browsers => {
op_mob: 48, op_mob: 48,
safari: 14, safari: 14,
ios_saf: 14, ios_saf: 14,
samsung: [9, 0], samsung: [9, 2],
android: 67, android: 67,
// and_qq: Not supported
// baidu: Not supported
// and_uc: Not supported
// kaios: Not supported
node: [10, 4] node: [10, 4]
}), }),
// Support syntax `import` and `export` and no limitations and bugs on Node.js // Support syntax `import` and `export` and no limitations and bugs on Node.js
@ -217,10 +243,14 @@ const resolve = browsers => {
safari: [10, 1], safari: [10, 1],
ios_saf: [10, 3], ios_saf: [10, 3],
samsung: [8, 0], samsung: [8, 0],
android: 61,
and_qq: [10, 4],
// baidu: Not supported
// and_uc: Not supported
// kaios: Not supported
// Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0 // Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0
node: [13, 14] node: [13, 14]
}), }),
// browserslistChecker("es6-module") && rawChecker({ node: [12, 17] }), // browserslistChecker("es6-module") && rawChecker({ node: [12, 17] }),
dynamicImport: es6DynamicImport, dynamicImport: es6DynamicImport,
dynamicImportInWorker: es6DynamicImport && !anyNode, dynamicImportInWorker: es6DynamicImport && !anyNode,
@ -237,8 +267,12 @@ const resolve = browsers => {
op_mob: 50, op_mob: 50,
safari: [12, 1], safari: [12, 1],
ios_saf: [12, 2], ios_saf: [12, 2],
samsung: [10, 0], samsung: [10, 1],
android: 71, android: 71,
// and_qq: Unknown support
// baidu: Unknown support
// and_uc: Unknown support
// kaios: Unknown support
node: [12, 0] node: [12, 0]
}), }),

View File

@ -56,14 +56,14 @@ Object {
exports[`browserslist target ["and_qq 10.4"] 1`] = ` exports[`browserslist target ["and_qq 10.4"] 1`] = `
Object { Object {
"arrowFunction": false, "arrowFunction": true,
"bigIntLiteral": false, "bigIntLiteral": false,
"browser": true, "browser": true,
"const": false, "const": true,
"destructuring": false, "destructuring": false,
"document": true, "document": true,
"dynamicImport": false, "dynamicImport": true,
"dynamicImportInWorker": false, "dynamicImportInWorker": true,
"electron": false, "electron": false,
"fetchWasm": true, "fetchWasm": true,
"forOf": false, "forOf": false,
@ -71,7 +71,7 @@ Object {
"globalThis": false, "globalThis": false,
"importScripts": false, "importScripts": false,
"importScriptsInWorker": true, "importScriptsInWorker": true,
"module": false, "module": true,
"node": false, "node": false,
"nodeBuiltins": false, "nodeBuiltins": false,
"nwjs": false, "nwjs": false,
@ -83,10 +83,10 @@ Object {
exports[`browserslist target ["and_uc 12.12"] 1`] = ` exports[`browserslist target ["and_uc 12.12"] 1`] = `
Object { Object {
"arrowFunction": false, "arrowFunction": true,
"bigIntLiteral": false, "bigIntLiteral": false,
"browser": true, "browser": true,
"const": false, "const": true,
"destructuring": false, "destructuring": false,
"document": true, "document": true,
"dynamicImport": false, "dynamicImport": false,
@ -206,7 +206,7 @@ Object {
"globalThis": true, "globalThis": true,
"importScripts": false, "importScripts": false,
"importScriptsInWorker": true, "importScriptsInWorker": true,
"module": false, "module": true,
"node": false, "node": false,
"nodeBuiltins": false, "nodeBuiltins": false,
"nwjs": false, "nwjs": false,
@ -218,7 +218,7 @@ Object {
exports[`browserslist target ["baidu 7.12"] 1`] = ` exports[`browserslist target ["baidu 7.12"] 1`] = `
Object { Object {
"arrowFunction": false, "arrowFunction": true,
"bigIntLiteral": false, "bigIntLiteral": false,
"browser": true, "browser": true,
"const": false, "const": false,
@ -488,10 +488,10 @@ Object {
exports[`browserslist target ["kaios 2.5"] 1`] = ` exports[`browserslist target ["kaios 2.5"] 1`] = `
Object { Object {
"arrowFunction": false, "arrowFunction": true,
"bigIntLiteral": false, "bigIntLiteral": false,
"browser": true, "browser": true,
"const": false, "const": true,
"destructuring": false, "destructuring": false,
"document": true, "document": true,
"dynamicImport": false, "dynamicImport": false,
@ -734,7 +734,7 @@ Object {
"arrowFunction": true, "arrowFunction": true,
"bigIntLiteral": false, "bigIntLiteral": false,
"browser": true, "browser": true,
"const": true, "const": false,
"destructuring": true, "destructuring": true,
"document": true, "document": true,
"dynamicImport": false, "dynamicImport": false,