Refactor code formatting for consistency in scaffold and update port registry scripts

This commit is contained in:
2026-05-20 14:04:01 -04:00
parent 3b668c9ced
commit 14b71eac0a
3 changed files with 97 additions and 53 deletions

View File

@@ -27,7 +27,9 @@ function readJson(filePath) {
}
test("creates local snapshot and machine registry", () => {
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
const tempDir = fs.mkdtempSync(
path.join(os.tmpdir(), "copilot-port-registry-"),
);
const stateDir = path.join(tempDir, "state");
const projectPath = path.join(tempDir, "workspace-a");
fs.mkdirSync(projectPath, { recursive: true });
@@ -40,7 +42,11 @@ test("creates local snapshot and machine registry", () => {
assert.equal(result.status, 0, result.stderr);
const localSnapshotPath = path.join(projectPath, ".local", "project-ports.json");
const localSnapshotPath = path.join(
projectPath,
".local",
"project-ports.json",
);
assert.equal(fs.existsSync(localSnapshotPath), true);
const localSnapshot = readJson(localSnapshotPath);
@@ -53,7 +59,9 @@ test("creates local snapshot and machine registry", () => {
});
test("reports conflict and recommends changing newest project", () => {
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
const tempDir = fs.mkdtempSync(
path.join(os.tmpdir(), "copilot-port-registry-"),
);
const stateDir = path.join(tempDir, "state");
const projectA = path.join(tempDir, "workspace-a");
@@ -118,7 +126,9 @@ test("reports conflict and recommends changing newest project", () => {
});
test("keeps firstSeenAt stable across re-sync", () => {
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
const tempDir = fs.mkdtempSync(
path.join(os.tmpdir(), "copilot-port-registry-"),
);
const stateDir = path.join(tempDir, "state");
const projectPath = path.join(tempDir, "workspace-a");
fs.mkdirSync(path.join(projectPath, ".local"), { recursive: true });