Skip to content
This repository has been archived by the owner on Sep 20, 2018. It is now read-only.

Commit

Permalink
remove all internal api's
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jun 29, 2017
1 parent ccf04b7 commit 0d1bf5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
"testRegex": "tests\\/.+\\.js$"
},
"peerDependencies": {
"react": "^15.5.0",
"react-dom": "^15.5.0"
"react": "^15.5.0 || ^16.0.0",
"react-dom": "^15.5.0 || ^16.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^5.8.25",
"babel-eslint": "^7.2.3",
"babel-jest": "^19.0.0",
"babel-preset-jason": "^2.0.1",
"chai": "^3.5.0",
Expand All @@ -63,7 +64,7 @@
"invariant": "^2.2.0",
"lodash": "^3.10.1",
"promise": "^7.1.1",
"react-test-renderer": "^15.5.4",
"react-test-renderer": "^15.5.4 || ^16.0.0",
"warning": "^2.1.0"
},
"release-script": {
Expand Down
19 changes: 2 additions & 17 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ import { createNode, NODE_TYPES } from 'bill/node';

let ReactTestUtils = require('react-dom/test-utils');
let ReactShallowRenderer = require('react-test-renderer/shallow');
let ReactMount = require('react-dom/lib/ReactMount')


let {
getID, getNode, findReactContainerForID
, getReactRootID, _instancesByReactRootID } = ReactMount;

export const Simulate = ReactTestUtils.Simulate;

Expand Down Expand Up @@ -190,23 +184,14 @@ export let getMountPoint = ifDef({
let info = privInst._nativeContainerInfo || privInst._hostContainerInfo;
let container = createNode(info._topLevelWrapper)
return findDOMNode(container.instance).parentNode
},
'*': function getMountPoint(instance) {
var id = getID(findDOMNode(instance));
return findReactContainerForID(id);
}
})

export function getRootInstance(mountPoint){
return _instancesByReactRootID[getReactRootID(mountPoint)];
}

export function findDOMNode(component){
return component instanceof window.HTMLElement
? component
: component && component._rootID
? getNode(component._rootID)
: component ? ReactDOM.findDOMNode(component) : null
: component
? ReactDOM.findDOMNode(component) : null
}

let buildSelector = sel => typeof sel === 'function' ? bill.selector`${sel}` : sel
Expand Down

0 comments on commit 0d1bf5b

Please sign in to comment.