Skip to content

Commit 9b98f08

Browse files
committed
bump angular version to canary in e2e tests
1 parent a6bd6ff commit 9b98f08

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

packages/@apphosting/adapter-angular/e2e/run-local.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,24 @@ import { parse as parseYaml } from "yaml";
66
import { spawn } from "child_process";
77
import fsExtra from "fs-extra";
88

9-
const { readFileSync, mkdirp, readJSON, writeJSON, rmdir } = fsExtra;
9+
const { readFileSync, mkdirp, readJSON, writeJSON, rmSync } = fsExtra;
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111

1212
const starterTemplateDir = "../../../starters/angular/basic";
1313

1414
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");
1927

2028
const tests = await Promise.all(
2129
[
@@ -41,7 +49,13 @@ const tests = await Promise.all(
4149
stdio: "inherit",
4250
shell: true,
4351
});
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+
});
4559
const angularJSON = JSON.parse((await readFile(join(cwd, "angular.json"))).toString());
4660

4761
if (!enableSSR) {

0 commit comments

Comments
 (0)