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

Whitelist react-native-dom in haste/cli config defaults #20393

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
3 changes: 2 additions & 1 deletion jest/hasteImpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const path = require('path');
const ROOTS = [
path.resolve(__dirname, '..') + path.sep,
path.resolve(__dirname, '../../react-native-windows') + path.sep,
path.resolve(__dirname, '../../react-native-dom') + path.sep,
];

const BLACKLISTED_PATTERNS /*: Array<RegExp> */ = [
Expand All @@ -36,7 +37,7 @@ const NAME_REDUCERS /*: Array<[RegExp, string]> */ = [
// strip .js/.js.flow suffix
[/^(.*)\.js(\.flow)?$/, '$1'],
// strip .android/.ios/.native/.web suffix
[/^(.*)\.(android|ios|native|web|windows)$/, '$1'],
[/^(.*)\.(android|ios|native|web|windows|dom)$/, '$1'],
];

const haste = {
Expand Down
4 changes: 2 additions & 2 deletions local-cli/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ const defaultConfig = {
hasteImplModulePath: require.resolve('../../jest/hasteImpl'),

getPlatforms(): Array<string> {
return ['ios', 'android', 'windows', 'web'];
return ['ios', 'android', 'windows', 'web', 'dom'];
},

getProvidesModuleNodeModules(): Array<string> {
return ['react-native', 'react-native-windows'];
return ['react-native', 'react-native-windows', 'react-native-dom'];
},
};

Expand Down