From abdbeeccc6f56c084e6d30c7ad8aefa1e9949a1d Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Wed, 17 May 2017 10:26:23 -0500 Subject: [PATCH] Tweak version mappings to match compat-table updates (#323) --- data/built-ins.json | 38 +++++++++++++++++++------------------- data/plugins.json | 2 +- package.json | 2 +- scripts/build-data.js | 25 +------------------------ yarn.lock | 4 ++-- 5 files changed, 24 insertions(+), 47 deletions(-) diff --git a/data/built-ins.json b/data/built-ins.json index b0ecacbd..de589f66 100644 --- a/data/built-ins.json +++ b/data/built-ins.json @@ -14,7 +14,7 @@ "opera": 12, "edge": 12, "firefox": 15, - "safari": 5, + "safari": 5.1, "node": 0.12, "ie": 10, "android": 4, @@ -490,7 +490,7 @@ "chrome": 45, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 4, "ios": 8, "opera": 32, @@ -500,7 +500,7 @@ "chrome": 45, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 4, "ios": 8, "opera": 32, @@ -510,7 +510,7 @@ "chrome": 45, "edge": 12, "firefox": 31, - "safari": 8, + "safari": 7.1, "node": 4, "ios": 8, "opera": 32, @@ -520,7 +520,7 @@ "chrome": 38, "edge": 12, "firefox": 28, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -606,7 +606,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -617,7 +617,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -628,7 +628,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -639,7 +639,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -661,7 +661,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -672,7 +672,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -683,7 +683,7 @@ "chrome": 38, "edge": 12, "firefox": 26, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -694,7 +694,7 @@ "chrome": 38, "edge": 12, "firefox": 27, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -716,7 +716,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -727,7 +727,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -738,7 +738,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -760,7 +760,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -771,7 +771,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, @@ -782,7 +782,7 @@ "chrome": 38, "edge": 12, "firefox": 25, - "safari": 8, + "safari": 7.1, "node": 0.12, "android": 5.1, "ios": 8, diff --git a/data/plugins.json b/data/plugins.json index 52bb1c27..ef9456b9 100644 --- a/data/plugins.json +++ b/data/plugins.json @@ -54,7 +54,7 @@ "chrome": 44, "edge": 12, "firefox": 34, - "safari": 8, + "safari": 7.1, "node": 4, "ios": 8, "opera": 31, diff --git a/package.json b/package.json index 8b888cce..72dc6611 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "babel-register": "^6.23.0", "chai": "^3.5.0", "codecov": "^1.0.1", - "compat-table": "kangax/compat-table#f49f1b23ad35e61819c388bc1876d936bc6ad8bf", + "compat-table": "kangax/compat-table#1f0bb0913736fe8c4c11b139766c73b9cbedb9f2", "eslint": "^3.17.1", "eslint-config-babel": "^6.0.0", "eslint-plugin-flowtype": "^2.29.1", diff --git a/scripts/build-data.js b/scripts/build-data.js index 2a1a2628..94ce128d 100644 --- a/scripts/build-data.js +++ b/scripts/build-data.js @@ -125,29 +125,6 @@ const environments = [ "phantom" ]; -const envMap = { - safari51: "safari5", - safari71_8: "safari8", - safari10_1: "safari10.1", - firefox3_5: "firefox3", - firefox3_6: "firefox3", - node010: "node0.10", - node012: "node0.12", - iojs: "node3.3", - node64: "node6", - node65: "node6.5", - node76: "node7.6", - android40: "android4.0", - android41: "android4.1", - android42: "android4.2", - android43: "android4.3", - android44: "android4.4", - android50: "android5.0", - android51: "android5.1", - ios51: "ios5.1", - ios10_3: "ios10.3", -}; - const compatibilityTests = flattenDeep([ es6, es2016plus, @@ -198,7 +175,7 @@ const getLowestImplementedVersion = ({ features }, env) => { // Babel assumes strict mode .filter((test) => tests[i].res[test] === true || tests[i].res[test] === "strict") // normalize some keys - .map((test) => envMap[test] || test) + .map((test) => test.replace("_", ".")) .filter((test) => !isNaN(parseFloat(test.replace(env, "")))) .shift(); }); diff --git a/yarn.lock b/yarn.lock index cf65c6ba..5e56c150 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1270,9 +1270,9 @@ commoner@^0.10.1: q "^1.1.2" recast "^0.11.17" -compat-table@kangax/compat-table#f49f1b23ad35e61819c388bc1876d936bc6ad8bf: +compat-table@kangax/compat-table#1f0bb0913736fe8c4c11b139766c73b9cbedb9f2: version "0.0.0" - resolved "https://codeload.github.com/kangax/compat-table/tar.gz/f49f1b23ad35e61819c388bc1876d936bc6ad8bf" + resolved "https://codeload.github.com/kangax/compat-table/tar.gz/1f0bb0913736fe8c4c11b139766c73b9cbedb9f2" dependencies: babel-core latest babel-polyfill latest