mirror of https://github.com/status-im/metro.git
Stop pulling @babel/traverse stuff from babel-bridge
Reviewed By: rubennorte Differential Revision: D7788537 fbshipit-source-id: 0f41dbcb898df9430b8ea085e46f527d5a471d4e
This commit is contained in:
parent
26426ae4a5
commit
7b47942ab8
|
@ -11,7 +11,8 @@
|
|||
'use strict';
|
||||
|
||||
/* eslint-disable lint/no-unclear-flowtypes */
|
||||
const {babelTypes, babelTraverse: traverse} = require('../../babel-bridge');
|
||||
const {babelTypes} = require('../../babel-bridge');
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const MODULE_FACTORY_PARAMETERS = ['global', 'require', 'module', 'exports'];
|
||||
const POLYFILL_FACTORY_PARAMETERS = ['global'];
|
||||
|
|
|
@ -16,12 +16,12 @@ const nullthrows = require('fbjs/lib/nullthrows');
|
|||
const transformModule = require('../transform-module');
|
||||
|
||||
const generate = require('@babel/generator').default;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const {
|
||||
babylon: {parse},
|
||||
} = require('../../../babel-bridge');
|
||||
const {babelTypes: types} = require('../../../babel-bridge');
|
||||
const {babelTraverse: traverse} = require('../../../babel-bridge');
|
||||
const {fn} = require('../../test-helpers');
|
||||
const {SourceMapConsumer} = require('source-map');
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ const nullthrows = require('fbjs/lib/nullthrows');
|
|||
|
||||
const babelTemplate = require('@babel/template').default;
|
||||
const generate = require('@babel/generator').default;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const {babelTraverse: traverse} = require('../../babel-bridge');
|
||||
const {babelTypes: types} = require('../../babel-bridge');
|
||||
|
||||
import type {TransformResultDependency} from '../types.flow';
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const {babelTraverse: traverse} = require('../../babel-bridge');
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const babelGenerate = require('@babel/generator').default;
|
||||
|
||||
import type {TransformResultDependency} from '../types.flow';
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
// This is a temporary migration bridge to switch between babel 6 and 7
|
||||
|
||||
const babelTraverse7 = require('@babel/traverse').default;
|
||||
const babelTypes7 = require('@babel/types');
|
||||
const babylon7 = require('metro-babylon7');
|
||||
const externalHelpersPlugin7 = require('babel-plugin-external-helpers');
|
||||
|
@ -50,7 +49,6 @@ function resolvePlugins7(plugins: Array<any>) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
babelTraverse: babelTraverse7,
|
||||
babelTypes: babelTypes7,
|
||||
getBabelRegisterConfig: getBabelRegisterConfig7,
|
||||
babylon: babylon7,
|
||||
|
|
Loading…
Reference in New Issue