File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rnpm-plugin-windows" ,
3
- "version" : " 0.2.1 " ,
3
+ "version" : " 0.2.2 " ,
4
4
"description" : " rnpm plugin that generates a Windows template project" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -41,13 +41,13 @@ function getLatestVersion() {
41
41
. then ( result => result . version )
42
42
}
43
43
44
- function checkPackageExists ( version ) {
44
+ function getMatchingVersion ( version ) {
45
45
return fetch ( `https://registry.npmjs.org/react-native-windows?version=${ version } ` )
46
46
. then ( result => {
47
47
if ( result && result . ok ) {
48
48
return result . json ( ) . then ( pkg => pkg . version ) ;
49
49
} else {
50
- return getLatestPackage ( ) . then ( latestVersion => {
50
+ return getLatestVersion ( ) . then ( latestVersion => {
51
51
throw new Error ( `Could not find react-native-windows@${ version } . ` +
52
52
`Latest version of react-native-windows is ${ latestVersion } , try switching to ` +
53
53
`react-native@${ semver . major ( latestVersion ) } .${ semver . minor ( latestVersion ) } .*.` ) ;
@@ -71,7 +71,7 @@ function getInstallPackage(version) {
71
71
72
72
const validVersionOrRange = validVersion || validRange ;
73
73
if ( validVersionOrRange ) {
74
- return checkPackageExists ( validVersionOrRange )
74
+ return getMatchingVersion ( validVersionOrRange )
75
75
. then ( resultVersion => packageToInstall + '@' + resultVersion ) ;
76
76
} else {
77
77
return Promise . resolve ( version ) ;
You can’t perform that action at this time.
0 commit comments