@@ -6,16 +6,24 @@ import { parse as parseYaml } from "yaml";
6
6
import { spawn } from "child_process" ;
7
7
import fsExtra from "fs-extra" ;
8
8
9
- const { readFileSync, mkdirp, readJSON, writeJSON, rmdir } = fsExtra ;
9
+ const { readFileSync, mkdirp, readJSON, writeJSON, rmSync } = fsExtra ;
10
10
const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
11
11
12
12
const starterTemplateDir = "../../../starters/angular/basic" ;
13
13
14
14
const errors : any [ ] = [ ] ;
15
-
16
- await rmdir ( join ( __dirname , "runs" ) , { recursive : true } ) . catch ( ( ) => undefined ) ;
17
-
18
- console . log ( "\nBuilding and starting test projects in parallel..." ) ;
15
+ console . log ( "About to remove runs directory (sync)" ) ;
16
+ try {
17
+ rmSync ( join ( __dirname , "runs" ) , { recursive : true } ) ;
18
+ console . log ( "Runs directory removed successfully (sync)" ) ;
19
+ } catch ( err ) {
20
+ console . error ( "Error removing runs directory (sync):" , err ) ;
21
+ // console.error("Error details:", err.message, err.stack);
22
+ // if (err.code) {
23
+ // console.error("Error code:", err.code); // Check error codes
24
+ // }
25
+ }
26
+ console . log ( "Finished removal attempt" ) ;
19
27
20
28
const tests = await Promise . all (
21
29
[
@@ -41,7 +49,13 @@ const tests = await Promise.all(
41
49
stdio : "inherit" ,
42
50
shell : true ,
43
51
} ) ;
44
-
52
+ console . log ( `[${ runId } ] updating angular to next tag` ) ;
53
+ console . log ( `[${ runId } ] > ng update @angular/cli@next @angular/core@next` ) ;
54
+ await promiseSpawn ( "ng" , [ "update" , "@angular/cli@next" , "@angular/core@next" ] , {
55
+ cwd,
56
+ stdio : "inherit" ,
57
+ shell : true ,
58
+ } ) ;
45
59
const angularJSON = JSON . parse ( ( await readFile ( join ( cwd , "angular.json" ) ) ) . toString ( ) ) ;
46
60
47
61
if ( ! enableSSR ) {
0 commit comments