DEV: upgrades babel to 6.26.3 (#7651)

DEV: upgrades babel to 6.26.3 (#7651)

This is the last version of the 6.x babel branch.

To achieve this I used GitHub - babel/babel-standalone: Now located in the Babel repo! Standalone build of Babel for use in non-Node.js environments, including browsers. witht he following patch:

diff --git a/gulpfile.js b/gulpfile.js index 2121b5f…c40bfa3 100644 — a/gulpfile.js +++ b/gulpfile.js @@ -74,24 +74,23 @@ const minifyAndRename = lazypipe() .pipe(uglify) .pipe(rename, { extname: ‘.min.js’ });

-gulp.task(‘default’, [‘build’]); -gulp.task(‘build’, [‘build-babel’, ‘build-babili’]);

-gulp.task(‘build-babel’, cb => {

  • pump([
  • gulp.src(‘src/index.js’),
  • webpackBuild(‘babel.js’, ‘Babel’, require(’./package.json’).version),
  • gulp.dest(’.’),
  • minifyAndRename(),
  • gulp.dest(’.’),
  • ], cb); -}); -gulp.task(‘build-babili’, cb => {
  • pump([
  • gulp.src(‘src/babili.js’),
  • webpackBuild(‘babili.js’, ‘Babili’, require(’./packages/babili-standalone/package.json’).version),
  • gulp.dest(‘packages/babili-standalone/’),
  • minifyAndRename(),
  • gulp.dest(‘packages/babili-standalone/’),
  • ], cb); -});
  • gulp.task(‘build-babel’, gulp.series(cb => {
  • pump([
  •  gulp.src('src/index.js'),
    
  •  webpackBuild('babel.js', 'Babel', require('./package.json').version),
    
  •  gulp.dest('.'),
    
  •  minifyAndRename(),
    
  •  gulp.dest('.'),
    
  • ], cb);
  • }));
  • gulp.task(‘build-babili’, gulp.series(cb => {
  • pump([
  •  gulp.src('src/babili.js'),
    
  •  webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version),
    
  •  gulp.dest('packages/babili-standalone/'),
    
  •  minifyAndRename(),
    
  •  gulp.dest('packages/babili-standalone/'),
    
  • ], cb);
  • })); +gulp.task(‘build’, gulp.series(‘build-babel’, ‘build-babili’)); +gulp.task(‘default’, gulp.series(‘build’)); diff --git a/package.json b/package.json index f2414d2…854cfad 100644 — a/package.json +++ b/package.json @@ -17,7 +17,7 @@ “url”: “git+https://github.com/Daniel15/babel-standalone.git” }, “devDependencies”: {
  • “babel-core”: “6.26.0”,
  • “babel-core”: “6.26.3”, “babel-helper-builder-react-jsx”: “6.23.0”, “babel-loader”: “6.4.1”, “babel-plugin-check-es2015-constants”: “6.22.0”, @@ -123,7 +123,7 @@ “babel-preset-stage-1”: “6.24.1”, “babel-preset-stage-2”: “6.24.1”, “babel-preset-stage-3”: “6.24.1”,
  • “gulp”: “^3.9.1”,
  • “gulp”: “^4”, “gulp-rename”: “^1.2.2”, “gulp-uglify”: “^2.0.1”, “jest”: “^18.1.0”,

and then ran: yarn yarn run build

diff --git a/gulpfile.js b/gulpfile.js
index 2121b5f..c40bfa3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -74,24 +74,23 @@ const minifyAndRename = lazypipe()
   .pipe(uglify)
   .pipe(rename, { extname: '.min.js' });

-gulp.task('default', ['build']);
-gulp.task('build', ['build-babel', 'build-babili']);
-
-gulp.task('build-babel', cb => {
-  pump([
-    gulp.src('src/index.js'),
-    webpackBuild('babel.js', 'Babel', require('./package.json').version),
-    gulp.dest('.'),
-    minifyAndRename(),
-    gulp.dest('.'),
-  ], cb);
-});
-gulp.task('build-babili', cb => {
-  pump([
-    gulp.src('src/babili.js'),
-    webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version),
-    gulp.dest('packages/babili-standalone/'),
-    minifyAndRename(),
-    gulp.dest('packages/babili-standalone/'),
-  ], cb);
-});
+  gulp.task('build-babel', gulp.series(cb => {
+    pump([
+      gulp.src('src/index.js'),
+      webpackBuild('babel.js', 'Babel', require('./package.json').version),
+      gulp.dest('.'),
+      minifyAndRename(),
+      gulp.dest('.'),
+    ], cb);
+  }));
+  gulp.task('build-babili', gulp.series(cb => {
+    pump([
+      gulp.src('src/babili.js'),
+      webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version),
+      gulp.dest('packages/babili-standalone/'),
+      minifyAndRename(),
+      gulp.dest('packages/babili-standalone/'),
+    ], cb);
+  }));
+gulp.task('build', gulp.series('build-babel', 'build-babili'));
+gulp.task('default', gulp.series('build'));
diff --git a/package.json b/package.json
index f2414d2..854cfad 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
     "url": "git+https://github.com/Daniel15/babel-standalone.git"
   },
   "devDependencies": {
-    "babel-core": "6.26.0",
+    "babel-core": "6.26.3",
     "babel-helper-builder-react-jsx": "6.23.0",
     "babel-loader": "6.4.1",
     "babel-plugin-check-es2015-constants": "6.22.0",
@@ -123,7 +123,7 @@
     "babel-preset-stage-1": "6.24.1",
     "babel-preset-stage-2": "6.24.1",
     "babel-preset-stage-3": "6.24.1",
-    "gulp": "^3.9.1",
+    "gulp": "^4",
     "gulp-rename": "^1.2.2",
     "gulp-uglify": "^2.0.1",
     "jest": "^18.1.0",

and then ran:
yarn
yarn run build

diff --git a/vendor/assets/javascripts/babel.js b/vendor/assets/javascripts/babel.js
index 4c54562..432a676 100644
--- a/vendor/assets/javascripts/babel.js
+++ b/vendor/assets/javascripts/babel.js
@@ -97,11 +97,11 @@ return /******/ (function(modules) { // webpackBootstrap
 	exports.transformScriptTags = transformScriptTags;
 	exports.disableScriptTags = disableScriptTags;
 
-	var _babelCore = __webpack_require__(286);
+	var _babelCore = __webpack_require__(295);
 
 	var Babel = _interopRequireWildcard(_babelCore);
 
-	var _transformScriptTags = __webpack_require__(620);
+	var _transformScriptTags = __webpack_require__(640);
 
 	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
@@ -218,107 +218,107 @@ return /******/ (function(modules) { // webpackBootstrap
 
 	// All the plugins we should bundle
 	registerPlugins({
-	  'check-es2015-constants': __webpack_require__(64),
-	  'external-helpers': __webpack_require__(318),
-	  'inline-replace-variables': __webpack_require__(319),
-	  'syntax-async-functions': __webpack_require__(65),
-	  'syntax-async-generators': __webpack_require__(191),
-	  'syntax-class-constructor-call': __webpack_require__(192),
-	  'syntax-class-properties': __webpack_require__(193),
-	  'syntax-decorators': __webpack_require__(124),
-	  'syntax-do-expressions': __webpack_require__(194),
-	  'syntax-exponentiation-operator': __webpack_require__(195),
-	  'syntax-export-extensions': __webpack_require__(196),
-	  'syntax-flow': __webpack_require__(125),
-	  'syntax-function-bind': __webpack_require__(197),
-	  'syntax-function-sent': __webpack_require__(321),
-	  'syntax-jsx': __webpack_require__(126),
-	  'syntax-object-rest-spread': __webpack_require__(198),
-	  'syntax-trailing-function-commas': __webpack_require__(127),
-	  'transform-async-functions': __webpack_require__(322),
-	  'transform-async-to-generator': __webpack_require__(128),
-	  'transform-async-to-module-method': __webpack_require__(324),
-	  'transform-class-constructor-call': __webpack_require__(199),
-	  'transform-class-properties': __webpack_require__(200),
-	  'transform-decorators': __webpack_require__(201),
-	  'transform-decorators-legacy': __webpack_require__(325).default, // <- No clue. Nope.
-	  'transform-do-expressions': __webpack_require__(202),
-	  'transform-es2015-arrow-functions': __webpack_require__(66),
-	  'transform-es2015-block-scoped-functions': __webpack_require__(67),
-	  'transform-es2015-block-scoping': __webpack_require__(68),
-	  'transform-es2015-classes': __webpack_require__(69),
-	  'transform-es2015-computed-properties': __webpack_require__(70),
-	  'transform-es2015-destructuring': __webpack_require__(71),
-	  'transform-es2015-duplicate-keys': __webpack_require__(129),
-	  'transform-es2015-for-of': __webpack_require__(72),
-	  'transform-es2015-function-name': __webpack_require__(73),
-	  'transform-es2015-instanceof': __webpack_require__(328),
-	  'transform-es2015-literals': __webpack_require__(74),
-	  'transform-es2015-modules-amd': __webpack_require__(130),
-	  'transform-es2015-modules-commonjs': __webpack_require__(75),
-	  'transform-es2015-modules-systemjs': __webpack_require__(204),
-	  'transform-es2015-modules-umd': __webpack_require__(205),
-	  'transform-es2015-object-super': __webpack_require__(76),
-	  'transform-es2015-parameters': __webpack_require__(77),
-	  'transform-es2015-shorthand-properties': __webpack_require__(78),
-	  'transform-es2015-spread': __webpack_require__(79),
-	  'transform-es2015-sticky-regex': __webpack_require__(80),
-	  'transform-es2015-template-literals': __webpack_require__(81),
-	  'transform-es2015-typeof-symbol': __webpack_require__(82),
-	  'transform-es2015-unicode-regex': __webpack_require__(83),
-	  'transform-es3-member-expression-literals': __webpack_require__(332),
-	  'transform-es3-property-literals': __webpack_require__(333),
-	  'transform-es5-property-mutators': __webpack_require__(334),
-	  'transform-eval': __webpack_require__(335),
-	  'transform-exponentiation-operator': __webpack_require__(131),
-	  'transform-export-extensions': __webpack_require__(206),
-	  'transform-flow-comments': __webpack_require__(336),
-	  'transform-flow-strip-types': __webpack_require__(207),
-	  'transform-function-bind': __webpack_require__(208),
-	  'transform-jscript': __webpack_require__(337),
-	  'transform-object-assign': __webpack_require__(338),
-	  'transform-object-rest-spread': __webpack_require__(209),
-	  'transform-object-set-prototype-of-to-assign': __webpack_require__(339),
-	  'transform-proto-to-assign': __webpack_require__(340),
-	  'transform-react-constant-elements': __webpack_require__(341),
-	  'transform-react-display-name': __webpack_require__(210),
-	  'transform-react-inline-elements': __webpack_require__(342),
-	  'transform-react-jsx': __webpack_require__(211),
-	  'transform-react-jsx-compat': __webpack_require__(343),
-	  'transform-react-jsx-self': __webpack_require__(345),
-	  'transform-react-jsx-source': __webpack_require__(346),
-	  'transform-regenerator': __webpack_require__(84),
-	  'transform-runtime': __webpack_require__(349),
-	  'transform-strict-mode': __webpack_require__(212),
-	  'undeclared-variables-check': __webpack_require__(350)
+	  'check-es2015-constants': __webpack_require__(70),
+	  'external-helpers': __webpack_require__(327),
+	  'inline-replace-variables': __webpack_require__(328),
+	  'syntax-async-functions': __webpack_require__(71),
+	  'syntax-async-generators': __webpack_require__(199),
+	  'syntax-class-constructor-call': __webpack_require__(200),
+	  'syntax-class-properties': __webpack_require__(201),
+	  'syntax-decorators': __webpack_require__(130),
+	  'syntax-do-expressions': __webpack_require__(202),
+	  'syntax-exponentiation-operator': __webpack_require__(203),
+	  'syntax-export-extensions': __webpack_require__(204),
+	  'syntax-flow': __webpack_require__(131),
+	  'syntax-function-bind': __webpack_require__(205),
+	  'syntax-function-sent': __webpack_require__(330),
+	  'syntax-jsx': __webpack_require__(132),
+	  'syntax-object-rest-spread': __webpack_require__(206),
+	  'syntax-trailing-function-commas': __webpack_require__(133),
+	  'transform-async-functions': __webpack_require__(331),
+	  'transform-async-to-generator': __webpack_require__(134),
+	  'transform-async-to-module-method': __webpack_require__(333),
+	  'transform-class-constructor-call': __webpack_require__(207),
+	  'transform-class-properties': __webpack_require__(208),
+	  'transform-decorators': __webpack_require__(209),
+	  'transform-decorators-legacy': __webpack_require__(334).default, // <- No clue. Nope.
+	  'transform-do-expressions': __webpack_require__(210),
+	  'transform-es2015-arrow-functions': __webpack_require__(72),
+	  'transform-es2015-block-scoped-functions': __webpack_require__(73),
+	  'transform-es2015-block-scoping': __webpack_require__(74),
+	  'transform-es2015-classes': __webpack_require__(75),
+	  'transform-es2015-computed-properties': __webpack_require__(76),
+	  'transform-es2015-destructuring': __webpack_require__(77),
+	  'transform-es2015-duplicate-keys': __webpack_require__(135),
+	  'transform-es2015-for-of': __webpack_require__(78),
+	  'transform-es2015-function-name': __webpack_require__(79),
+	  'transform-es2015-instanceof': __webpack_require__(337),
+	  'transform-es2015-literals': __webpack_require__(80),
+	  'transform-es2015-modules-amd': __webpack_require__(136),
+	  'transform-es2015-modules-commonjs': __webpack_require__(212),
+	  'transform-es2015-modules-systemjs': __webpack_require__(213),
+	  'transform-es2015-modules-umd': __webpack_require__(214),
+	  'transform-es2015-object-super': __webpack_require__(81),
+	  'transform-es2015-parameters': __webpack_require__(82),

[... diff too long, it was truncated ...]

GitHub sha: 9a4f6619