File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 118118 "copyfiles" : " 2.0.0" ,
119119 "cross-env" : " 5.1.4" ,
120120 "del" : " 3.0.0" ,
121- "find-versions" : " 3.0.0" ,
121+ "find-versions" : " ^ 3.0.0" ,
122122 "get-port" : " 3.2.0" ,
123123 "glob-promise" : " 3.4.0" ,
124124 "gulp" : " 4.0.0" ,
149149 {
150150 "id" : " OmniSharp" ,
151151 "description" : " OmniSharp for Windows (.NET 4.6 / x86)" ,
152- "url" : " https://download.visualstudio.microsoft.com/download/pr/ed7cfe88-470c-421d-8078-062aea0f0ead/e9e2a6b82a6084fa4de82cb1515098fc /omnisharp-win-x86-1.32.7 .zip" ,
153- "fallbackUrl" : " https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x86-1.32.7 .zip" ,
154- "installPath" : " .omnisharp/1.32.7 " ,
152+ "url" : " https://download.visualstudio.microsoft.com/download/pr/515dbb33-d644-4ba6-9ee4-8ca7227ab580/02621f196a581cb3062dbeab2ec28429 /omnisharp-win-x86-1.32.8 .zip" ,
153+ "fallbackUrl" : " https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x86-1.32.8 .zip" ,
154+ "installPath" : " .omnisharp/1.32.8 " ,
155155 "platforms" : [
156156 " win32"
157157 ],
158158 "architectures" : [
159159 " x86"
160160 ],
161- "installTestPath" : " ./.omnisharp/1.32.7/OmniSharp.exe" ,
162- "platformId" : " win-x86" ,
163- "integrity" : " 30AE34B885D448D5677A85FB0D3ECA568F79EF135C3F34B5698F17AD90E2D3D2"
161+ "installTestPath" : " ./.omnisharp/1.32.8/OmniSharp.exe" ,
162+ "platformId" : " win-x86"
164163 },
165164 {
166165 "id" : " OmniSharp" ,
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ const findVersions = require('find-versions');
1515
1616interface PackageJSONFile {
1717 runtimeDependencies : Package [ ] ;
18+ defaults : {
19+ [ key : string ] : string ;
20+ } ;
1821}
1922
2023const dottedVersionRegExp = / [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + / g;
@@ -107,6 +110,12 @@ export async function updatePackageDependencies(): Promise<void> {
107110 dependency . fallbackUrl = replaceVersion ( dependency . fallbackUrl , newVersion ) ;
108111 dependency . installPath = replaceVersion ( dependency . installPath , newVersion ) ;
109112 dependency . installTestPath = replaceVersion ( dependency . installTestPath , newVersion ) ;
113+ Object . keys ( packageJSON . defaults ) . forEach ( key => {
114+ //Update the version present in the defaults
115+ if ( key . toLowerCase ( ) == dependency . id . toLowerCase ( ) ) {
116+ packageJSON . defaults [ key ] = newVersion ;
117+ }
118+ } ) ;
110119
111120 if ( dependency . fallbackUrl ) {
112121 const fallbackUrlIntegrity = await downloadAndGetHash ( dependency . fallbackUrl ) ;
@@ -195,7 +204,7 @@ function getLowercaseFileNameFromUrl(url: string): string {
195204
196205 if ( versions . length > 1 ) {
197206 //we expect only one version string to be present in the last part of the url
198- throw new Error ( `Ambiguous version pattern found in fallback URL '${ url } '. Multiple version strings found.` ) ;
207+ throw new Error ( `Ambiguous version pattern found URL '${ url } '. Multiple version strings found.` ) ;
199208 }
200209
201210 let versionIndex = fileName . indexOf ( versions [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments