@@ -966,6 +966,44 @@ it.layer(
966966 } ) ,
967967 ) ;
968968
969+ it . effect . skipIf ( ! symlinksSupported ) (
970+ "keeps npm's latest version for an npm install whose launcher is in the native location" ,
971+ ( ) =>
972+ Effect . gen ( function * ( ) {
973+ const tempDir = yield * makeTempDir ( "t3-native-npm-prefix" ) ;
974+ const target = NodePath . join (
975+ tempDir ,
976+ ".local" ,
977+ "lib" ,
978+ "node_modules" ,
979+ "@example" ,
980+ "native-package-tool" ,
981+ "bin" ,
982+ "native-package-tool" ,
983+ ) ;
984+ writeExecutable ( target ) ;
985+ const launcher = NodePath . join ( tempDir , ".local" , "bin" , "native-package-tool" ) ;
986+ NodeFS . mkdirSync ( NodePath . dirname ( launcher ) , { recursive : true } ) ;
987+ NodeFS . symlinkSync ( target , launcher ) ;
988+
989+ const capabilities = yield * resolveProviderMaintenanceCapabilitiesEffect (
990+ makePackageManagedProviderMaintenanceResolver ( {
991+ provider : driver ( "nativePackageTool" ) ,
992+ npmPackageName : "@example/native-package-tool" ,
993+ nativeUpdate : {
994+ args : [ "update" ] ,
995+ isCommandPath : isNativeTestCommandPath ( "/.local/bin/native-package-tool" ) ,
996+ lookupLatestVersion : Effect . die ( "an npm install should not read the native feed" ) ,
997+ } ,
998+ } ) ,
999+ { binaryPath : launcher , env : { PATH : "" } } ,
1000+ ) . pipe ( Effect . provideService ( ChildProcessSpawner . ChildProcessSpawner , noSpawn ) ) ;
1001+
1002+ expect ( capabilities . update ?. args ) . toEqual ( [ "update" ] ) ;
1003+ expect ( capabilities . latestVersion ) . toBeUndefined ( ) ;
1004+ } ) ,
1005+ ) ;
1006+
9691007 it . effect . each ( [ "wrapper" , "symlink" ] ) (
9701008 "keeps a mise-owned %s in a native install location manual-only" ,
9711009 ( launcher , { skip } ) => {
0 commit comments