@@ -58,16 +58,12 @@ describe("entry compile cache", () => {
5858 shouldEnableOpenClawCompileCache ( {
5959 env : { } ,
6060 installRoot : root ,
61- nodeVersion : "24.15.0" ,
62- platform : "win32" ,
6361 } ) ,
6462 ) . toBe ( true ) ;
6563 expect (
6664 shouldEnableOpenClawCompileCache ( {
6765 env : { NODE_DISABLE_COMPILE_CACHE : "1" } ,
6866 installRoot : root ,
69- nodeVersion : "24.15.0" ,
70- platform : "win32" ,
7167 } ) ,
7268 ) . toBe ( false ) ;
7369 } ) ;
@@ -204,46 +200,18 @@ describe("entry compile cache", () => {
204200 expect ( plan ?. detachForProcessTree ) . toBe ( false ) ;
205201 } ) ;
206202
207- it ( "does not respawn unaffected packaged installs when NODE_COMPILE_CACHE is configured" , ( ) => {
203+ it ( "does not respawn packaged installs when NODE_COMPILE_CACHE is configured" , ( ) => {
208204 const root = tempDirs . make ( "openclaw-compile-cache-package-respawn-" ) ;
209205
210206 expect (
211207 buildOpenClawCompileCacheRespawnPlan ( {
212208 currentFile : path . join ( root , "dist" , "entry.js" ) ,
213209 env : { NODE_COMPILE_CACHE : "/tmp/openclaw-cache" } ,
214210 installRoot : root ,
215- nodeVersion : "24.1.0" ,
216- platform : "linux" ,
217211 } ) ,
218212 ) . toBeUndefined ( ) ;
219213 } ) ;
220214
221- it ( "builds a no-cache respawn plan for affected Windows packaged installs" , ( ) => {
222- const root = tempDirs . make ( "openclaw-compile-cache-package-win24-" ) ;
223- const entryFile = path . join ( root , "dist" , "entry.js" ) ;
224-
225- const plan = buildOpenClawCompileCacheRespawnPlan ( {
226- currentFile : entryFile ,
227- env : { NODE_COMPILE_CACHE : "/tmp/openclaw-cache" } ,
228- execArgv : [ "--no-warnings" ] ,
229- execPath : "/usr/bin/node" ,
230- installRoot : root ,
231- argv : [ "/usr/bin/node" , entryFile , "doctor" , "--fix" , "--non-interactive" ] ,
232- nodeVersion : "24.1.0" ,
233- platform : "win32" ,
234- } ) ;
235-
236- expect ( plan ) . toEqual ( {
237- command : "/usr/bin/node" ,
238- args : [ "--no-warnings" , entryFile , "doctor" , "--fix" , "--non-interactive" ] ,
239- env : {
240- NODE_DISABLE_COMPILE_CACHE : "1" ,
241- OPENCLAW_COMPILE_CACHE_DISABLED_RESPAWNED : "1" ,
242- } ,
243- detachForProcessTree : false ,
244- } ) ;
245- } ) ;
246-
247215 it ( "does not respawn source checkouts twice" , async ( ) => {
248216 const root = tempDirs . make ( "openclaw-compile-cache-respawn-once-" ) ;
249217 await fs . mkdir ( path . join ( root , "src" ) , { recursive : true } ) ;
@@ -376,72 +344,4 @@ describe("entry compile cache", () => {
376344 vi . useRealTimers ( ) ;
377345 }
378346 } ) ;
379-
380- it ( "disables compile cache for early Node 24.x versions on Windows" , ( ) => {
381- const root = tempDirs . make ( "openclaw-compile-cache-node24-" ) ;
382- expect (
383- shouldEnableOpenClawCompileCache ( {
384- env : { } ,
385- installRoot : root ,
386- nodeVersion : "24.1.0" ,
387- platform : "win32" ,
388- } ) ,
389- ) . toBe ( false ) ;
390- expect (
391- shouldEnableOpenClawCompileCache ( {
392- env : { } ,
393- installRoot : root ,
394- nodeVersion : "24.14.0" ,
395- platform : "win32" ,
396- } ) ,
397- ) . toBe ( false ) ;
398- } ) ;
399-
400- it ( "keeps compile cache enabled for early Node 24.x on non-Windows packaged installs" , ( ) => {
401- const root = tempDirs . make ( "openclaw-compile-cache-node24-nonwin-" ) ;
402- expect (
403- shouldEnableOpenClawCompileCache ( {
404- env : { } ,
405- installRoot : root ,
406- nodeVersion : "24.1.0" ,
407- platform : "linux" ,
408- } ) ,
409- ) . toBe ( true ) ;
410- expect (
411- shouldEnableOpenClawCompileCache ( {
412- env : { } ,
413- installRoot : root ,
414- nodeVersion : "24.14.0" ,
415- platform : "darwin" ,
416- } ) ,
417- ) . toBe ( true ) ;
418- } ) ;
419-
420- it ( "keeps compile cache enabled for Node 24.15+ and other majors on Windows" , ( ) => {
421- const root = tempDirs . make ( "openclaw-compile-cache-node2415-" ) ;
422- expect (
423- shouldEnableOpenClawCompileCache ( {
424- env : { } ,
425- installRoot : root ,
426- nodeVersion : "24.15.0" ,
427- platform : "win32" ,
428- } ) ,
429- ) . toBe ( true ) ;
430- expect (
431- shouldEnableOpenClawCompileCache ( {
432- env : { } ,
433- installRoot : root ,
434- nodeVersion : "22.22.0" ,
435- platform : "win32" ,
436- } ) ,
437- ) . toBe ( true ) ;
438- expect (
439- shouldEnableOpenClawCompileCache ( {
440- env : { } ,
441- installRoot : root ,
442- nodeVersion : "25.0.0" ,
443- platform : "win32" ,
444- } ) ,
445- ) . toBe ( true ) ;
446- } ) ;
447347} ) ;
0 commit comments