Skip to content

Commit

Permalink
ReactDOM: remove unstable-native-dependencies bundle
Browse files Browse the repository at this point in the history
This is only used by react-native-web and will be replaced by a user-space
implementation. See: necolas/react-native-web#1568
  • Loading branch information
necolas committed Apr 4, 2020
1 parent 7785a52 commit 9fe5ee0
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 68 deletions.
Expand Up @@ -404,11 +404,10 @@ describe('ResponderEventPlugin', () => {
beforeEach(() => {
jest.resetModules();

const ReactDOMUnstableNativeDependencies = require('react-dom/unstable-native-dependencies');
EventBatching = require('legacy-events/EventBatching');
EventPluginUtils = require('legacy-events/EventPluginUtils');
ResponderEventPlugin =
ReactDOMUnstableNativeDependencies.ResponderEventPlugin;
ResponderEventPlugin = require('legacy-events/ResponderEventPlugin')
.default;

deleteAllListeners(GRANDPARENT_INST);
deleteAllListeners(PARENT_INST);
Expand Down
7 changes: 0 additions & 7 deletions packages/react-dom/npm/unstable-native-dependencies.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/react-dom/package.json
Expand Up @@ -38,7 +38,6 @@
"unstable-fizz.js",
"unstable-fizz.browser.js",
"unstable-fizz.node.js",
"unstable-native-dependencies.js",
"cjs/",
"umd/"
],
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/client/ReactDOM.js
Expand Up @@ -172,8 +172,8 @@ function unstable_createPortal(
}

const Internals = {
// Keep in sync with ReactDOMUnstableNativeDependencies.js
// ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
// Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
// This is an array for better minification.
Events: [
getInstanceFromNode,
getNodeFromInstance,
Expand Down
3 changes: 1 addition & 2 deletions packages/react-dom/src/test-utils/ReactTestUtils.js
Expand Up @@ -25,8 +25,7 @@ import accumulateInto from 'legacy-events/accumulateInto';
import {enableModernEventSystem} from 'shared/ReactFeatureFlags';

const {findDOMNode} = ReactDOM;
// Keep in sync with ReactDOMUnstableNativeDependencies.js
// ReactDOM.js, and ReactTestUtilsAct.js:
// Keep in sync with ReactDOM.js, and ReactTestUtilsAct.js:
const [
getInstanceFromNode,
/* eslint-disable no-unused-vars */
Expand Down
3 changes: 1 addition & 2 deletions packages/react-dom/src/test-utils/ReactTestUtilsAct.js
Expand Up @@ -14,8 +14,7 @@ import ReactSharedInternals from 'shared/ReactSharedInternals';
import enqueueTask from 'shared/enqueueTask';
import * as Scheduler from 'scheduler';

// Keep in sync with ReactDOMUnstableNativeDependencies.js
// ReactDOM.js, and ReactTestUtils.js:
// Keep in sync with ReactDOM.js, and ReactTestUtils.js:
const [
/* eslint-disable no-unused-vars */
getInstanceFromNode,
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions packages/react-dom/unstable-native-dependencies.js

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/rollup/bundles.js
Expand Up @@ -155,15 +155,6 @@ const bundles = [
externals: ['react'],
},

/* React DOM internals required for react-native-web (e.g., to shim native events from react-dom) */
{
bundleTypes: [UMD_DEV, UMD_PROD, NODE_DEV, NODE_PROD],
moduleType: RENDERER_UTILS,
entry: 'react-dom/unstable-native-dependencies',
global: 'ReactDOMUnstableNativeDependencies',
externals: ['react', 'react-dom'],
},

/******* React DOM Server *******/
{
bundleTypes: [
Expand Down

0 comments on commit 9fe5ee0

Please sign in to comment.