Skip to content

Commit

Permalink
Avoid accessing private React modules
Browse files Browse the repository at this point in the history
Summary:
We should not reach into `react/lib` directly to allow React to refactor the layout. Instead use the public module that exposes this. We still have `react/lib/reactComponentExpect` left, but that seems a bit more tricky.
Closes #1335

Reviewed By: sebmarkbage

Differential Revision: D3711134

Pulled By: kassens

fbshipit-source-id: 4033e7575b8351295a6a14fef75b98ac36a5f25f
  • Loading branch information
kassens authored and Facebook Github Bot 2 committed Aug 12, 2016
1 parent bf88f80 commit bb38793
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"jest": "^14.0.0",
"object-assign": "^4.1.0",
"react": "^15.1.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.1.0",
"run-sequence": "^1.2.1",
"webpack": "^1.13.1",
Expand Down Expand Up @@ -98,6 +99,7 @@
"<rootDir>/node_modules/fbjs/lib/(?!(ErrorUtils.js$|fetch.js$|fetchWithRetries.js$))",
"<rootDir>/node_modules/object-assign/",
"<rootDir>/node_modules/react/",
"<rootDir>/node_modules/react-addons-test-utils/",
"<rootDir>/node_modules/react-dom/",
"<rootDir>/node_modules/react-static-container/"
]
Expand Down
3 changes: 1 addition & 2 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const babelOptions = getBabelOptions({
'reactComponentExpect': 'react/lib/reactComponentExpect',
'ReactDOM': 'react-dom',
'ReactDOMServer': 'react-dom/server',
'ReactTestUtils': 'react/lib/ReactTestUtils.js',
'ReactUpdates': 'react/lib/ReactUpdates',
'ReactTestUtils': 'react-addons-test-utils',
'StaticContainer.react': 'react-static-container',
},
plugins: [
Expand Down

0 comments on commit bb38793

Please sign in to comment.