From 13bb8aa838e99c0c46900c669d8635928a1b3e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 16 Jan 2020 02:17:01 +0100 Subject: [PATCH] Fix plugin ordering in preset-env --- packages/babel-compat-data/data/plugins.json | 22 +++++++++---------- .../scripts/data/plugin-features.js | 9 +++++--- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index de0a613bf234..e3392082774c 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -91,17 +91,6 @@ "opera": "28", "electron": "0.24" }, - "transform-block-scoping": { - "chrome": "49", - "edge": "14", - "firefox": "51", - "safari": "11", - "node": "6", - "ios": "11", - "samsung": "5", - "opera": "36", - "electron": "1" - }, "transform-classes": { "chrome": "46", "edge": "13", @@ -358,5 +347,16 @@ "samsung": "5", "opera": "37", "electron": "1.1" + }, + "transform-block-scoping": { + "chrome": "49", + "edge": "14", + "firefox": "51", + "safari": "11", + "node": "6", + "ios": "11", + "samsung": "5", + "opera": "36", + "electron": "1" } } diff --git a/packages/babel-compat-data/scripts/data/plugin-features.js b/packages/babel-compat-data/scripts/data/plugin-features.js index e0f20c7d1acf..790ab4c8a250 100644 --- a/packages/babel-compat-data/scripts/data/plugin-features.js +++ b/packages/babel-compat-data/scripts/data/plugin-features.js @@ -20,9 +20,6 @@ module.exports = { "transform-block-scoped-functions": { features: ["block-level function declaration"], }, - "transform-block-scoping": { - features: ["const", "let"], - }, "transform-classes": { features: ["class", "super"], }, @@ -102,4 +99,10 @@ module.exports = { 'RegExp "y" and "u" flags / "u" flag', ], }, + + // This must run after all the plugins that manipulate bindings + // eslint-disable-next-line sort-keys + "transform-block-scoping": { + features: ["const", "let"], + }, };