Skip to content

Commit

Permalink
[enzyme-adapter-react-helper] [fix] use intersects instead of `sati…
Browse files Browse the repository at this point in the history
…sfies`
  • Loading branch information
ljharb committed Nov 17, 2017
1 parent fc06093 commit acf7eb6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,39 @@ try {
}

console.log(`Installing React@${reactVersion} and related packages...`);
if (semver.satisfies(reactVersion, '^16.0.0-0')) {
if (semver.intersects(reactVersion, '^16.0.0-0')) {
try {
npmRun.execSync('install-peerdeps -S enzyme-adapter-react-16', { stdio: 'inherit' });
} catch (e) {
console.error('An installation failed');
console.log(e);
process.exit(16);
}
} else if (semver.satisfies(reactVersion, '^15.5.0')) {
} else if (semver.intersects(reactVersion, '^15.5.0')) {
try {
npmRun.execSync('install-peerdeps -S enzyme-adapter-react-15', { stdio: 'inherit' });
} catch (e) {
console.error('An installation failed');
console.log(e);
process.exit(155);
}
} else if (semver.satisfies(reactVersion, '15.0.0-0 - 15.4.x')) {
} else if (semver.intersects(reactVersion, '15.0.0-0 - 15.4.x')) {
try {
npmRun.execSync('install-peerdeps -S enzyme-adapter-react-15.4', { stdio: 'inherit' });
} catch (e) {
console.error('An installation failed');
console.log(e);
process.exit(15);
}
} else if (semver.satisfies(reactVersion, '^0.14.0')) {
} else if (semver.intersects(reactVersion, '^0.14.0')) {
try {
npmRun.execSync('install-peerdeps -S enzyme-adapter-react-14', { stdio: 'inherit' });
} catch (e) {
console.error('An installation failed');
console.log(e);
process.exit(14);
}
} else if (semver.satisfies(reactVersion, '^0.13.0')) {
} else if (semver.intersects(reactVersion, '^0.13.0')) {
try {
npmRun.execSync('install-peerdeps -S enzyme-adapter-react-13', { stdio: 'inherit' });
} catch (e) {
Expand Down

0 comments on commit acf7eb6

Please sign in to comment.