Skip to content

Commit

Permalink
Stable Named Exports
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Feb 24, 2020
1 parent 5fc2f27 commit ed86c04
Show file tree
Hide file tree
Showing 81 changed files with 25,951 additions and 26,166 deletions.
256 changes: 128 additions & 128 deletions build/bundle-sizes.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions build/dist/react-cache.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,4 @@
exports.unstable_createResource = unstable_createResource;
exports.unstable_setGlobalCacheLimit = unstable_setGlobalCacheLimit;

Object.defineProperty(exports, '__esModule', { value: true });

})));
2 changes: 1 addition & 1 deletion build/dist/react-cache.production.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 33 additions & 59 deletions build/dist/react-dom-testing.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
'use strict';

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
typeof define === 'function' && define.amd ? define(['react'], factory) :
(global = global || self, global.ReactDOM = factory(global.React));
}(this, (function (React) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(global = global || self, factory(global.ReactDOM = {}, global.React));
}(this, (function (exports, React) { 'use strict';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
// Current owner and dispatcher used to share the same ref,
Expand Down Expand Up @@ -25072,6 +25072,7 @@

unbatchedUpdates(function () {
legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
// $FlowFixMe This should probably use `delete container._reactRootContainer`
container._reactRootContainer = null;
unmarkContainerAsRoot(container);
});
Expand Down Expand Up @@ -25135,53 +25136,36 @@
throw Error( "Target container is not a DOM element." );
}
} // TODO: pass ReactDOM portal implementation as third argument
// $FlowFixMe The Flow type is opaque but there's no way to actually create it.


return createPortal(children, container, null, key);
}

var ReactDOM = {
createPortal: createPortal$1,
unstable_batchedUpdates: batchedUpdates$1,
flushSync: flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
// Keep in sync with ReactDOMUnstableNativeDependencies.js
// ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
},
version: ReactVersion
};
function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {

{
ReactDOM.findDOMNode = findDOMNode;
ReactDOM.hydrate = hydrate;
ReactDOM.render = render;
ReactDOM.unmountComponentAtNode = unmountComponentAtNode;
return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
}

{
ReactDOM.unstable_renderSubtreeIntoContainer = function () {

return unstable_renderSubtreeIntoContainer.apply(void 0, arguments);
};
}
function unstable_createPortal(children, container) {
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

{
// Temporary alias since we already shipped React 16 RC with it.
// TODO: remove in React 17.
ReactDOM.unstable_createPortal = function () {
{
if (!didWarnAboutUnstableCreatePortal) {
didWarnAboutUnstableCreatePortal = true;
{
if (!didWarnAboutUnstableCreatePortal) {
didWarnAboutUnstableCreatePortal = true;

warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
}
warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
}
}

return createPortal$1.apply(void 0, arguments);
};
return createPortal$1(children, container, key);
}

var Internals = {
// Keep in sync with ReactDOMUnstableNativeDependencies.js
// ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
};
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1 ,
Expand All @@ -25203,27 +25187,17 @@
}
}

{
ReactDOM.act = act;
}

var ReactDOM$1 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': ReactDOM
});

function getCjsExportFromNamespace (n) {
return n && n['default'] || n;
}

var ReactDOM$2 = getCjsExportFromNamespace(ReactDOM$1);

// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest.


var testing = ReactDOM$2.default || ReactDOM$2;

return testing;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.act = act;
exports.createPortal = createPortal$1;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync;
exports.hydrate = hydrate;
exports.render = render;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_createPortal = unstable_createPortal;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.version = ReactVersion;

})));

0 comments on commit ed86c04

Please sign in to comment.