Stop exposing adbkit and crc32 as globals
Summary: Since no plugin directly uses adbkit or crc32 anymore, we removed them from the globals. They wouldn't work in the browser anyway Reviewed By: aigoncharov Differential Revision: D33019084 fbshipit-source-id: 66ab0756399fdb401c63f5e8271bdd62cb79ab4a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ac9080abac
commit
9e09c0d5f7
@@ -17,14 +17,12 @@ const pattern = /^\*\r?\n[\S\s]*Facebook[\S\s]* \* @format\r?\n/;
|
||||
|
||||
// This list should match the replacements defined in `replace-flipper-requires.ts` and `dispatcher/plugins.tsx`
|
||||
const builtInModules = [
|
||||
'fb-qpl-xplat',
|
||||
'flipper',
|
||||
'flipper-plugin',
|
||||
'flipper-plugin-lib',
|
||||
'react',
|
||||
'react-dom',
|
||||
'electron',
|
||||
'adbkit',
|
||||
'antd',
|
||||
'immer',
|
||||
'@emotion/styled',
|
||||
|
||||
@@ -21,12 +21,10 @@ const requireReplacements: any = {
|
||||
'flipper-plugin': 'global.FlipperPlugin',
|
||||
react: 'global.React',
|
||||
'react-dom': 'global.ReactDOM',
|
||||
adbkit: 'global.adbkit',
|
||||
antd: 'global.antd',
|
||||
immer: 'global.Immer',
|
||||
'@emotion/styled': 'global.emotion_styled',
|
||||
'@ant-design/icons': 'global.antdesign_icons',
|
||||
crc32: 'global.crc32_hack_fix_me',
|
||||
};
|
||||
|
||||
export function tryReplaceFlipperRequire(path: NodePath<CallExpression>) {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
"@tanishiking/aho-corasick": "^0.0.1",
|
||||
"@types/archiver": "^5.1.1",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"adbkit": "^2.11.1",
|
||||
"antd": "4.16.8",
|
||||
"archiver": "^5.0.2",
|
||||
"async-mutex": "^0.3.2",
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
import {PluginDefinition} from '../plugin';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import adbkit from 'adbkit';
|
||||
import {
|
||||
registerPlugins,
|
||||
addGatekeepedPlugins,
|
||||
@@ -42,8 +41,6 @@ import * as Immer from 'immer';
|
||||
import * as antd from 'antd';
|
||||
import * as emotion_styled from '@emotion/styled';
|
||||
import * as antdesign_icons from '@ant-design/icons';
|
||||
// @ts-ignore
|
||||
import * as crc32 from 'crc32';
|
||||
|
||||
import {isDevicePluginDefinition} from '../utils/pluginUtils';
|
||||
import isPluginCompatible from '../utils/isPluginCompatible';
|
||||
@@ -62,13 +59,11 @@ export default async (store: Store, _logger: Logger) => {
|
||||
globalObject.React = React;
|
||||
globalObject.ReactDOM = ReactDOM;
|
||||
globalObject.Flipper = require('../deprecated-exports');
|
||||
globalObject.adbkit = adbkit;
|
||||
globalObject.FlipperPlugin = FlipperPluginSDK;
|
||||
globalObject.Immer = Immer;
|
||||
globalObject.antd = antd;
|
||||
globalObject.emotion_styled = emotion_styled;
|
||||
globalObject.antdesign_icons = antdesign_icons;
|
||||
globalObject.crc32_hack_fix_me = crc32;
|
||||
|
||||
const gatekeepedPlugins: Array<ActivatablePluginDetails> = [];
|
||||
const disabledPlugins: Array<ActivatablePluginDetails> = [];
|
||||
|
||||
Reference in New Issue
Block a user