Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReactDOM: remove unstable-native-dependencies bundle #18483

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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',
necolas marked this conversation as resolved.
Show resolved Hide resolved
global: 'ReactDOMUnstableNativeDependencies',
externals: ['react', 'react-dom'],
},

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