From 46ba1532fd9d0db88b38b215c962054af69dac56 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 3 May 2016 06:42:08 -0700 Subject: [PATCH] babel-preset - transform-es2015-constants was replaced by check-es2015-constants. Summary: The babel plugin transform-es2015-constants was replaced by check-es2015-constants. References: T2970 rBW0a3b3b03dbcfc8d1e809a0eaf6270eec8de80763 T3053 This patch updates the babel preset to use check-es2015-constants which should be more future-proof and will receive bug fixes. Closes https://github.com/facebook/react-native/pull/6943 Reviewed By: davidaurelio Differential Revision: D3189222 Pulled By: bestander fb-gh-sync-id: a5ec23e297e1d3591d51641dd567049f4310b107 fbshipit-source-id: a5ec23e297e1d3591d51641dd567049f4310b107 --- babel-preset/configs/main.js | 2 +- babel-preset/package.json | 4 ++-- babel-preset/plugins.js | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/babel-preset/configs/main.js b/babel-preset/configs/main.js index 84db8d99f..3e8b66167 100644 --- a/babel-preset/configs/main.js +++ b/babel-preset/configs/main.js @@ -23,7 +23,7 @@ module.exports = { 'transform-es2015-block-scoping', 'transform-es2015-classes', 'transform-es2015-computed-properties', - 'transform-es2015-constants', + 'check-es2015-constants', 'transform-es2015-destructuring', ['transform-es2015-modules-commonjs', { strict: false, allowTopLevelThis: true }], 'transform-es2015-parameters', diff --git a/babel-preset/package.json b/babel-preset/package.json index 87cf38d5e..3ea605804 100644 --- a/babel-preset/package.json +++ b/babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-react-native", - "version": "1.6.0", + "version": "1.7.0", "description": "Babel preset for React Native applications", "main": "index.js", "repository": "https://github.com/facebook/react-native/tree/master/babel-preset", @@ -15,6 +15,7 @@ }, "homepage": "https://github.com/facebook/react-native/tree/master/babel-preset/README.md", "dependencies": { + "babel-plugin-check-es2015-constants": "^6.5.0", "babel-plugin-react-transform": "2.0.2", "babel-plugin-syntax-async-functions": "^6.5.0", "babel-plugin-syntax-class-properties": "^6.5.0", @@ -27,7 +28,6 @@ "babel-plugin-transform-es2015-block-scoping": "^6.5.0", "babel-plugin-transform-es2015-classes": "^6.5.0", "babel-plugin-transform-es2015-computed-properties": "^6.5.0", - "babel-plugin-transform-es2015-constants": "^6.1.4", "babel-plugin-transform-es2015-destructuring": "^6.5.0", "babel-plugin-transform-es2015-for-of": "^6.5.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.5.0", diff --git a/babel-preset/plugins.js b/babel-preset/plugins.js index b11bcb81a..e52fdfe8c 100644 --- a/babel-preset/plugins.js +++ b/babel-preset/plugins.js @@ -19,7 +19,7 @@ module.exports = { 'babel-plugin-transform-es2015-block-scoping': require('babel-plugin-transform-es2015-block-scoping'), 'babel-plugin-transform-es2015-classes': require('babel-plugin-transform-es2015-classes'), 'babel-plugin-transform-es2015-computed-properties': require('babel-plugin-transform-es2015-computed-properties'), - 'babel-plugin-transform-es2015-constants': require('babel-plugin-transform-es2015-constants'), + 'babel-plugin-check-es2015-constants': require('babel-plugin-check-es2015-constants'), 'babel-plugin-transform-es2015-destructuring': require('babel-plugin-transform-es2015-destructuring'), 'babel-plugin-transform-es2015-modules-commonjs': require('babel-plugin-transform-es2015-modules-commonjs'), 'babel-plugin-transform-es2015-parameters': require('babel-plugin-transform-es2015-parameters'), diff --git a/package.json b/package.json index 8d12c0713..8e03b08ee 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "babel-core": "^6.6.4", "babel-plugin-external-helpers": "^6.5.0", "babel-polyfill": "^6.6.1", - "babel-preset-react-native": "~1.6.0", + "babel-preset-react-native": "^1.7.0", "babel-register": "^6.6.0", "babel-types": "^6.6.4", "babylon": "^6.6.4",