File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,6 @@ class Template {
119119 }
120120}
121121
122- const TEMPLATE_VERSIONS_URL =
123- 'https://registry.npmjs.org/@react-native-community/template' ;
124122const minorVersion = ( version : string ) => {
125123 const v = semver . parse ( version ) ! ;
126124 return `${ v . major } .${ v . minor } ` ;
@@ -129,9 +127,9 @@ const minorVersion = (version: string) => {
129127export async function getTemplateVersion (
130128 reactNativeVersion : string ,
131129) : Promise < TemplateVersion | undefined > {
132- const json = await fetch ( TEMPLATE_VERSIONS_URL ) . then (
133- ( resp ) => resp . json ( ) as Promise < NpmTemplateResponse > ,
134- ) ;
130+ const json = await fetch (
131+ new URL ( '@react-native-community/template' , getNpmRegistryUrl ( ) ) ,
132+ ) . then ( ( resp ) => resp . json ( ) as Promise < NpmTemplateResponse > ) ;
135133
136134 // We are abusing which npm metadata is publicly available through the registry. Scripts
137135 // is always captured, and we use this in the Github Action that manages our releases to
You can’t perform that action at this time.
0 commit comments