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

Move getNextDebugID() to React package. #9005

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions grunt/config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var shimSharedModules = aliasify.configure({
'react/lib/React': 'react/lib/ReactUMDShim',
'react/lib/ReactCurrentOwner': 'react/lib/ReactCurrentOwnerUMDShim',
'react/lib/ReactComponentTreeHook': 'react/lib/ReactComponentTreeHookUMDShim',
'react/lib/getNextDebugID': 'react/lib/getNextDebugIDUMDShim',
},
});

Expand Down
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ var moduleMapReact = Object.assign(
'react/lib/checkPropTypes': './checkPropTypes',
'react/lib/ReactComponentTreeHook': './ReactComponentTreeHook',
'react/lib/ReactDebugCurrentFrame': './ReactDebugCurrentFrame',
'react/lib/getNextDebugID': './getNextDebugID',
},
moduleMapBase
);
Expand All @@ -141,6 +142,7 @@ var rendererSharedState = {
'react/lib/checkPropTypes': 'react/lib/checkPropTypes',
'react/lib/ReactComponentTreeHook': 'react/lib/ReactComponentTreeHook',
'react/lib/ReactDebugCurrentFrame': 'react/lib/ReactDebugCurrentFrame',
'react/lib/getNextDebugID': 'react/lib/getNextDebugID',
};

var moduleMapReactDOM = Object.assign(
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions src/node_modules/react/lib/getNextDebugID.js

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

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var ReactCompositeComponent = require('ReactCompositeComponent');
var ReactEmptyComponent = require('ReactEmptyComponent');
var ReactHostComponent = require('ReactHostComponent');

var getNextDebugID = require('getNextDebugID');
var getNextDebugID = require('react/lib/getNextDebugID');
var invariant = require('fbjs/lib/invariant');
var warning = require('fbjs/lib/warning');

Expand Down
2 changes: 1 addition & 1 deletion src/test/ReactShallowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var ReactReconciler = require('ReactReconciler');
var ReactUpdates = require('ReactUpdates');

var emptyObject = require('fbjs/lib/emptyObject');
var getNextDebugID = require('getNextDebugID');
var getNextDebugID = require('react/lib/getNextDebugID');
var invariant = require('fbjs/lib/invariant');

class NoopInternalComponent {
Expand Down
1 change: 1 addition & 0 deletions src/umd/ReactUMDEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (__DEV__) {
{
// ReactComponentTreeHook should not be included in production.
ReactComponentTreeHook: require('react/lib/ReactComponentTreeHook'),
getNextDebugID: require('react/lib/getNextDebugID'),
}
);
}
Expand Down
1 change: 1 addition & 0 deletions src/umd/ReactWithAddonsUMDEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (__DEV__) {
{
// ReactComponentTreeHook should not be included in production.
ReactComponentTreeHook: require('react/lib/ReactComponentTreeHook'),
getNextDebugID: require('react/lib/getNextDebugID'),
}
);
}
Expand Down
19 changes: 19 additions & 0 deletions src/umd/shims/getNextDebugIDUMDShim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule getNextDebugId
*/

/* globals React */

'use strict';

var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

module.exports = ReactInternals.getNextDebugID;