Skip to content
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
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
"haste": {
"defaultPlatform": "ios",
"providesModuleNodeModules": [
"fbjs",
"react",
"react-native",
"parse",
"react-transform-hmr"
"parse"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David tells me this is for Jest and we should keep the format here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the exact same format that packager is using. I just asked @skevy to make it backwards compatible so that his change was non-breaking :)

],
"platforms": [
"ios",
Expand Down Expand Up @@ -155,7 +153,7 @@
"mkdirp": "^0.5.1",
"module-deps": "^3.9.1",
"node-fetch": "^1.3.3",
"node-haste": "~2.4.0",
"node-haste": "~2.6.1",
"opn": "^3.0.2",
"optimist": "^0.6.1",
"progress": "^1.1.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
jest
.dontMock('node-haste/lib/lib/getPlatformExtension')
.dontMock('node-haste/node_modules/throat')
.dontMock('node-haste/lib/fastpath')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fastpath should not be mocked, otherwise the test fails.

.dontMock('../');

jest
Expand Down
11 changes: 8 additions & 3 deletions packager/react-packager/src/Resolver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,18 @@ class Resolver {
(opts.blacklistRE && opts.blacklistRE.test(filepath));
},
providesModuleNodeModules: [
'react',
'react-native',
// Use the project's installed version of react-native
// as the "haste" version of `react-native`
// (and ignore any nested copies);
{ name: 'react-native', parent: null },
// Use the react peerDep for the "haste"
// version of `react`.
{ name: 'react', parent: null },
// Parse requires AsyncStorage. They will
// change that to require('react-native') which
// should work after this release and we can
// remove it from here.
'parse',
{ name: 'parse', parent: null },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6039 also contained fbjs here but it's gone on master.

],
platforms: ['ios', 'android'],
preferNativePlatform: true,
Expand Down