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

Convert the Source to ES Modules #11389

Merged
merged 23 commits into from Nov 2, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+7 −29
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

Remove TODOs I don’t intend to fix yet

  • Loading branch information...
gaearon committed Nov 2, 2017
commit 56519b403adbfcc0035ef6f26f2dcfb832ed3111
@@ -52,7 +52,6 @@ import {
} from '../shared/HTMLNodeType';
import DOMProperty from '../shared/DOMProperty';
// TODO: convert some of these to named imports
var {ROOT_ATTRIBUTE_NAME} = DOMProperty;
var {
createElement,
@@ -41,12 +41,10 @@ import {
validateProperties as validateUnknownProperties,
} from '../shared/ReactDOMUnknownPropertyHook';
// TODO: convert to named imports
var {
getCurrentFiberOwnerName,
getCurrentFiberStackAddendum,
} = ReactDebugCurrentFiber;
var didWarnInvalidHydration = false;
var didWarnShadyDOM = false;
@@ -20,12 +20,6 @@ import ReactDOMComponentTree from './ReactDOMComponentTree';
import ReactControlledValuePropTypes
from '../shared/ReactControlledValuePropTypes';
// TODO: named imports
var {
getCurrentFiberOwnerName,
getCurrentFiberStackAddendum,
} = ReactDebugCurrentFiber;
type InputWithWrapperState = HTMLInputElement & {
_wrapperState: {
initialValue: ?string,
@@ -34,6 +28,10 @@ type InputWithWrapperState = HTMLInputElement & {
},
};
var {
getCurrentFiberOwnerName,
getCurrentFiberStackAddendum,
} = ReactDebugCurrentFiber;
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
@@ -17,7 +17,6 @@ import warning from 'fbjs/lib/warning';
import ReactControlledValuePropTypes
from '../shared/ReactControlledValuePropTypes';
// TODO: named imports
var {
getCurrentFiberOwnerName,
getCurrentFiberStackAddendum,
@@ -18,17 +18,15 @@ import ReactDebugCurrentFiber
import ReactControlledValuePropTypes
from '../shared/ReactControlledValuePropTypes';
// TODO: named imports
var {getCurrentFiberStackAddendum} = ReactDebugCurrentFiber;
var didWarnValDefaultVal = false;
type TextAreaWithWrapperState = HTMLTextAreaElement & {
_wrapperState: {
initialValue: string,
},
};
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
@@ -13,9 +13,7 @@ import warning from 'fbjs/lib/warning';
import ReactDebugCurrentFiber
from 'react-reconciler/src/ReactDebugCurrentFiber';
// TODO: named import
var {getCurrentFiberStackAddendum} = ReactDebugCurrentFiber;
var validateDOMNesting = emptyFunction;
if (__DEV__) {
@@ -14,7 +14,6 @@ import ReactDOMEventListener from './ReactDOMEventListener';
import isEventSupported from './isEventSupported';
import BrowserEventConstants from './BrowserEventConstants';
// TODO: named import?
var {topLevelTypes} = BrowserEventConstants;
/**
@@ -23,9 +23,7 @@ import UIManager from 'UIManager';
import ReactNativeComponentTree from './ReactNativeComponentTree';
// TODO: named imports?
const {getClosestInstanceFromNode} = ReactNativeComponentTree;
let getInspectorDataForViewTag;
if (__DEV__) {
@@ -43,7 +43,6 @@ import {
} from './ReactFiber';
import ReactDebugCurrentFiber from './ReactDebugCurrentFiber';
// TODO: named import?
const {getCurrentFiberStackAddendum} = ReactDebugCurrentFiber;
if (__DEV__) {
@@ -408,5 +408,6 @@ if (__DEV__) {
};
}
// TODO: named exports maybe?
// TODO: convert to named exports
// if this doesn't inflate the bundle.
export default ReactDebugFiberPerf;
@@ -62,9 +62,7 @@ import {
} from './ReactFiberContext';
import {NoWork, Never} from './ReactFiberExpirationTime';
// TODO: named imports
var {cancelWorkTimer} = ReactDebugFiberPerf;
if (__DEV__) {
var warnedAboutStatelessRefs = {};
}
@@ -36,9 +36,7 @@ import {
} from './ReactFiberUpdateQueue';
import {hasContextChanged} from './ReactFiberContext';
// TODO: named imports?
var {startPhaseTimer, stopPhaseTimer} = ReactDebugFiberPerf;
const fakeInternalInstance = {};
const isArray = Array.isArray;
@@ -29,7 +29,6 @@ import {commitCallbacks} from './ReactFiberUpdateQueue';
import {onCommitUnmount} from './ReactFiberDevToolsHook';
import ReactDebugFiberPerf from './ReactDebugFiberPerf';
// TODO: named imports
var {invokeGuardedCallback, hasCaughtError, clearCaughtError} = ReactErrorUtils;
var {startPhaseTimer, stopPhaseTimer} = ReactDebugFiberPerf;
@@ -24,7 +24,6 @@ import {createCursor, pop, push} from './ReactFiberStack';
import ReactDebugCurrentFiber from './ReactDebugCurrentFiber';
import ReactDebugFiberPerf from './ReactDebugFiberPerf';
// TODO: named imports?
const {startPhaseTimer, stopPhaseTimer} = ReactDebugFiberPerf;
if (__DEV__) {
@@ -65,7 +65,6 @@ import {AsyncUpdates} from './ReactTypeOfInternalContext';
import {getUpdateExpirationTime} from './ReactFiberUpdateQueue';
import {resetContext} from './ReactFiberContext';
// TODO: named imports
var {invokeGuardedCallback, hasCaughtError, clearCaughtError} = ReactErrorUtils;
var {
recordEffect,
@@ -19,9 +19,7 @@ import invariant from 'fbjs/lib/invariant';
import ReactNativeRTComponentTree from './ReactNativeRTComponentTree';
// TODO: named imports?
const {getFiberFromTag} = ReactNativeRTComponentTree;
let getInspectorDataForViewTag;
if (__DEV__) {
ProTip! Use n and p to navigate between commits in a pull request.