File tree 1 file changed +12
-0
lines changed
packages/angular/cli/src/utilities
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,11 @@ export async function fetchPackageMetadata(
249
249
...( registry ? { registry } : { } ) ,
250
250
} ) ;
251
251
252
+ if ( ! response . versions ) {
253
+ // While pacote type declares that versions cannot be undefined this is not the case.
254
+ response . versions = { } ;
255
+ }
256
+
252
257
// Normalize the response
253
258
const metadata : PackageMetadata = {
254
259
...response ,
@@ -312,6 +317,13 @@ export async function getNpmPackageJson(
312
317
fullMetadata : true ,
313
318
...npmrc ,
314
319
...( registry ? { registry } : { } ) ,
320
+ } ) . then ( ( response ) => {
321
+ // While pacote type declares that versions cannot be undefined this is not the case.
322
+ if ( ! response . versions ) {
323
+ response . versions = { } ;
324
+ }
325
+
326
+ return response ;
315
327
} ) ;
316
328
317
329
npmPackageJsonCache . set ( packageName , response ) ;
You can’t perform that action at this time.
0 commit comments