mirror of https://github.com/status-im/metro.git
Stop pulling @babel/types stuff from babel-bridge
Reviewed By: rubennorte Differential Revision: D7788528 fbshipit-source-id: 6df623741be7ec0f9cd6879456faa8c2147fcd29
This commit is contained in:
parent
7b47942ab8
commit
de30633c37
|
@ -10,8 +10,9 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const babelTypes = require('@babel/types');
|
||||
|
||||
const {babylon} = require('../babel-bridge');
|
||||
const {babelTypes} = require('../babel-bridge');
|
||||
|
||||
import type {AssetDataWithoutFiles} from '../Assets';
|
||||
import type {ModuleTransportLike} from '../shared/types.flow';
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import typeof {types as BabelTypes} from 'babel-core';
|
||||
import typeof {types as BabelTypes} from '@babel/core';
|
||||
|
||||
function constantFoldingPlugin(context: {types: BabelTypes}) {
|
||||
const t = context.types;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import typeof {types as BabelTypes} from 'babel-core';
|
||||
import typeof {types as BabelTypes} from '@babel/core';
|
||||
|
||||
const importMap = new Map([['ReactNative', 'react-native']]);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
const createInlinePlatformChecks = require('./inline-platform');
|
||||
|
||||
import typeof {types as BabelTypes} from 'babel-core';
|
||||
import typeof {types as BabelTypes} from '@babel/core';
|
||||
import type {Ast} from 'babel-core';
|
||||
|
||||
type Context = {types: BabelTypes};
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
'use strict';
|
||||
|
||||
/* eslint-disable lint/no-unclear-flowtypes */
|
||||
const {babelTypes} = require('../../babel-bridge');
|
||||
const babelTypes = require('@babel/types');
|
||||
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const MODULE_FACTORY_PARAMETERS = ['global', 'require', 'module', 'exports'];
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
const invariant = require('fbjs/lib/invariant');
|
||||
const nullthrows = require('fbjs/lib/nullthrows');
|
||||
const transformModule = require('../transform-module');
|
||||
const types = require('@babel/types');
|
||||
|
||||
const generate = require('@babel/generator').default;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
@ -21,7 +22,6 @@ const traverse = require('@babel/traverse').default;
|
|||
const {
|
||||
babylon: {parse},
|
||||
} = require('../../../babel-bridge');
|
||||
const {babelTypes: types} = require('../../../babel-bridge');
|
||||
const {fn} = require('../../test-helpers');
|
||||
const {SourceMapConsumer} = require('source-map');
|
||||
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
'use strict';
|
||||
|
||||
const nullthrows = require('fbjs/lib/nullthrows');
|
||||
const types = require('@babel/types');
|
||||
|
||||
const babelTemplate = require('@babel/template').default;
|
||||
const generate = require('@babel/generator').default;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
|
||||
const {babelTypes: types} = require('../../babel-bridge');
|
||||
|
||||
import type {TransformResultDependency} from '../types.flow';
|
||||
import type {Ast} from '@babel/core';
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
// This is a temporary migration bridge to switch between babel 6 and 7
|
||||
|
||||
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');
|
||||
|
@ -49,7 +48,6 @@ function resolvePlugins7(plugins: Array<any>) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
babelTypes: babelTypes7,
|
||||
getBabelRegisterConfig: getBabelRegisterConfig7,
|
||||
babylon: babylon7,
|
||||
|
||||
|
|
Loading…
Reference in New Issue