Stop pulling @babel/generator stuff from babel-bridge

Reviewed By: rubennorte

Differential Revision: D7788531

fbshipit-source-id: e3244d45cbf1256b78bf838a032b2135b17d2262
This commit is contained in:
Peter van der Zee 2018-04-27 09:23:18 -07:00 committed by Facebook Github Bot
parent 7aea822948
commit d352b2a178
8 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@
'use strict';
const {babelGenerate} = require('../../babel-bridge');
const babelGenerate = require('@babel/generator').default;
const {
generateAssetCodeFileAst,
generateRemoteAssetCodeFileAst,

View File

@ -17,13 +17,13 @@ const collectDependencies = require('../ModuleGraph/worker/collectDependencies')
const constantFoldingPlugin = require('./worker/constant-folding-plugin');
const crypto = require('crypto');
const fs = require('fs');
const generate = require('@babel/generator').default;
const getMinifier = require('../lib/getMinifier');
const inlinePlugin = require('./worker/inline-plugin');
const optimizeDependencies = require('../ModuleGraph/worker/optimizeDependencies');
const path = require('path');
const {babylon} = require('../babel-bridge');
const {babelGenerate: generate} = require('../babel-bridge');
const {
fromRawMappings,
toBabelSegments,

View File

@ -10,7 +10,7 @@
const stub = require('sinon/lib/sinon/stub');
const {babelGenerate: generate} = require('../babel-bridge');
const generate = require('@babel/generator').default;
exports.fn = () => {
const s = stub();

View File

@ -15,11 +15,12 @@ const invariant = require('fbjs/lib/invariant');
const nullthrows = require('fbjs/lib/nullthrows');
const transformModule = require('../transform-module');
const generate = require('@babel/generator').default;
const {
babylon: {parse},
} = require('../../../babel-bridge');
const {babelTypes: types} = require('../../../babel-bridge');
const {babelGenerate: generate} = require('../../../babel-bridge');
const {babelTraverse: traverse} = require('../../../babel-bridge');
const {fn} = require('../../test-helpers');
const {SourceMapConsumer} = require('source-map');

View File

@ -12,10 +12,11 @@
const nullthrows = require('fbjs/lib/nullthrows');
const generate = require('@babel/generator').default;
const {babelTemplate} = require('../../babel-bridge');
const {babelTraverse: traverse} = require('../../babel-bridge');
const {babelTypes: types} = require('../../babel-bridge');
const {babelGenerate: generate} = require('../../babel-bridge');
import type {TransformResultDependency} from '../types.flow';
import type {Ast} from '@babel/core';

View File

@ -10,7 +10,7 @@
'use strict';
const {babelGenerate} = require('../../babel-bridge');
const babelGenerate = require('@babel/generator').default;
import type {Ast} from '@babel/core';

View File

@ -11,7 +11,7 @@
'use strict';
const {babelTraverse: traverse} = require('../../babel-bridge');
const {babelGenerate} = require('../../babel-bridge');
const babelGenerate = require('@babel/generator').default;
import type {TransformResultDependency} from '../types.flow';
import type {Ast} from '@babel/core';

View File

@ -13,7 +13,6 @@
// This is a temporary migration bridge to switch between babel 6 and 7
const babelGenerate7 = require('@babel/generator').default;
const babelTemplate7 = require('@babel/template').default;
const babelTraverse7 = require('@babel/traverse').default;
const babelTypes7 = require('@babel/types');
@ -52,7 +51,6 @@ function resolvePlugins7(plugins: Array<any>) {
}
module.exports = {
babelGenerate: babelGenerate7,
babelTemplate: babelTemplate7,
babelTraverse: babelTraverse7,
babelTypes: babelTypes7,