File tree Expand file tree Collapse file tree
packages/provider-core/src/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ it.layer(
513513 ChildProcessSpawner . ChildProcessSpawner ,
514514 stdoutSpawner ( ( ) => {
515515 probes ++ ;
516- return JSON . stringify ( version ) ;
516+ return JSON . stringify ( { "@example/package-tool" : { latest : version } } ) ;
517517 } ) ,
518518 ) ,
519519 Effect . tap ( ( capabilities ) =>
@@ -685,6 +685,7 @@ it.layer(
685685 packageName : "@example/package-tool" ,
686686 latestVersion : null ,
687687 lookupLatestVersion : expect . anything ( ) ,
688+ latestVersionCacheKey : expect . any ( String ) ,
688689 update : {
689690 command : `npm install -g --prefix ${ tempDir } --allow-scripts=@example/package-tool @example/package-tool@latest` ,
690691 executable : "npm" ,
Original file line number Diff line number Diff line change @@ -949,7 +949,7 @@ export const resolvePackageManagedProviderMaintenance = Effect.fn(
949949 if ( npmPrefix ) {
950950 const services = yield * Effect . context < ProviderMaintenanceResolverServices > ( ) ;
951951 // npm 12 requires script approval to install native binaries; older npm only warns about the flag.
952- return makeProviderMaintenanceCapabilities ( {
952+ const capabilities = makeProviderMaintenanceCapabilities ( {
953953 provider : definition . provider ,
954954 packageName,
955955 updateExecutable : "npm" ,
@@ -970,6 +970,15 @@ export const resolvePackageManagedProviderMaintenance = Effect.fn(
970970 Effect . provideContext ( services ) ,
971971 ) ,
972972 } ) ;
973+ return {
974+ ...capabilities ,
975+ latestVersionCacheKey : [
976+ "npm-global" ,
977+ normalizeCommandPath ( npmPrefix ) ,
978+ packageName ,
979+ environmentCacheKey ( context . env ) ,
980+ ] . join ( "\0" ) ,
981+ } ;
973982 }
974983
975984 const homebrew = homebrewOwnershipFromCommandPath ( context . realCommandPath ) ;
You can’t perform that action at this time.
0 commit comments