File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -58,20 +58,18 @@ export function resolvePackageData(
5858 const cacheKey = getRpdCacheKey ( pkgName , basedir , preserveSymlinks )
5959 if ( packageCache ?. has ( cacheKey ) ) return packageCache . get ( cacheKey ) !
6060
61- let pkg : string | null
6261 try {
63- pkg = pnp . resolveToUnqualified ( pkgName , basedir , {
62+ const pkg = pnp . resolveToUnqualified ( pkgName , basedir , {
6463 considerBuiltins : false ,
6564 } )
65+ if ( ! pkg ) return null
66+
67+ const pkgData = loadPackageData ( path . join ( pkg , 'package.json' ) )
68+ packageCache ?. set ( cacheKey , pkgData )
69+ return pkgData
6670 } catch {
6771 return null
6872 }
69- if ( ! pkg ) return null
70-
71- const pkgData = loadPackageData ( path . join ( pkg , 'package.json' ) )
72- packageCache ?. set ( cacheKey , pkgData )
73-
74- return pkgData
7573 }
7674
7775 const originalBasedir = basedir
You can’t perform that action at this time.
0 commit comments