Stop pulling @babel/core stuff from babel-bridge

Reviewed By: rubennorte

Differential Revision: D7788533

fbshipit-source-id: e998bdfa6e7303b0811b01a6d5bc7c27aa3a7e40
This commit is contained in:
Peter van der Zee 2018-04-27 09:23:16 -07:00 committed by Facebook Github Bot
parent 5acc620f42
commit 7aea822948
8 changed files with 10 additions and 15 deletions

View File

@ -12,8 +12,8 @@
const constantFoldingPlugin = require('../constant-folding-plugin');
const {transformSync} = require('../../../babel-bridge');
const {transformFromAstSync} = require('../../../babel-bridge');
const {transformSync} = require('@babel/core');
const {transformFromAstSync} = require('@babel/core');
import type {TransformResult} from '@babel/core';

View File

@ -13,8 +13,8 @@
const inlinePlugin = require('../inline-plugin');
const invariant = require('fbjs/lib/invariant');
const {transformSync} = require('../../../babel-bridge');
const {transformFromAstSync} = require('../../../babel-bridge');
const {transformSync} = require('@babel/core');
const {transformFromAstSync} = require('@babel/core');
import type {TransformResult} from '@babel/core';
import type {Ast} from 'babel-core';

View File

@ -18,7 +18,7 @@ const invariant = require('fbjs/lib/invariant');
const optimizeDependencies = require('./optimizeDependencies');
const sourceMap = require('source-map');
const {transformSync} = require('../../babel-bridge');
const {transformSync} = require('@babel/core');
import type {PostMinifyProcess} from '../../Bundler';
import type {TransformedSourceFile, TransformResult} from '../types.flow';

View File

@ -13,15 +13,14 @@
// This is a temporary migration bridge to switch between babel 6 and 7
const babelCore7 = require('@babel/core');
const babelGenerate7 = require('@babel/generator').default;
const babelTemplate7 = require('@babel/template').default;
const babelTraverse7 = require('@babel/traverse').default;
const babelTypes7 = require('@babel/types');
const babylon7 = require('metro-babylon7');
const externalHelpersPlugin7 = require('babel-plugin-external-helpers');
const inlineRequiresPlugin7 = require('babel-preset-fbjs/plugins/inline-requires');
const makeHMRConfig7 = makeMakeHMRConfig7();
function resolvePlugins7(plugins: Array<any>) {
/**
@ -53,10 +52,6 @@ function resolvePlugins7(plugins: Array<any>) {
}
module.exports = {
// need to abstract the transform* funcs here since their name changed
transformSync: babelCore7.transformSync,
transformFileSync: babelCore7.transformFileSync,
transformFromAstSync: babelCore7.transformFromAstSync,
babelGenerate: babelGenerate7,
babelTemplate: babelTemplate7,
babelTraverse: babelTraverse7,

View File

@ -9,7 +9,7 @@
*/
'use strict';
const {transformSync} = require('./babel-bridge');
const {transformSync} = require('@babel/core');
import type {TransformOptions} from './JSTransformer/worker';
import type {Plugins as BabelPlugins} from 'babel-core';

View File

@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getTransformCacheKeyFn Should return always the same key for the same params 1`] = `"e65336d380f8bf43e00f5cd94b8bf541b1b08f5c"`;
exports[`getTransformCacheKeyFn Should return always the same key for the same params 1`] = `"21cd943759b1802bca8cea636538f13b2f7b89a8"`;

View File

@ -15,7 +15,7 @@
const fs = require('fs');
const {getBabelRegisterConfig} = require('../../../babel-bridge');
const {transformSync} = require('../../../babel-bridge');
const {transformSync} = require('@babel/core');
const babelConfig = getBabelRegisterConfig();

View File

@ -21,7 +21,7 @@ const {getPreset} = require('./babel-bridge');
const {inlineRequiresPlugin} = require('./babel-bridge');
const {makeHMRConfig} = require('./babel-bridge');
const {resolvePlugins} = require('./babel-bridge');
const {transformSync} = require('./babel-bridge');
const {transformSync} = require('@babel/core');
import type {Transformer, TransformOptions} from './JSTransformer/worker';
import type {Plugins as BabelPlugins} from 'babel-core';