From 33e5ec6d375772281342906693e5fdc2f297f64a Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 13 Mar 2026 23:33:21 -0600 Subject: [PATCH] fix: replace TS parameter properties with explicit fields for Node strip-types compatibility MergeConflictError used `public readonly` constructor parameter properties, which are not supported by Node's --experimental-strip-types mode (type stripping only, no TS-to-JS transforms). This crashed 19 test files on import. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/git-service.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/resources/extensions/gsd/git-service.ts b/src/resources/extensions/gsd/git-service.ts index d2c2dc370..be460082e 100644 --- a/src/resources/extensions/gsd/git-service.ts +++ b/src/resources/extensions/gsd/git-service.ts @@ -50,17 +50,26 @@ export interface MergeSliceResult { * caller can dispatch a fix-merge session to resolve it. */ export class MergeConflictError extends Error { + readonly conflictedFiles: string[]; + readonly strategy: "squash" | "merge"; + readonly branch: string; + readonly mainBranch: string; + constructor( - public readonly conflictedFiles: string[], - public readonly strategy: "squash" | "merge", - public readonly branch: string, - public readonly mainBranch: string, + conflictedFiles: string[], + strategy: "squash" | "merge", + branch: string, + mainBranch: string, ) { super( `${strategy === "merge" ? "Merge" : "Squash-merge"} of "${branch}" into "${mainBranch}" ` + `failed with conflicts in ${conflictedFiles.length} non-.gsd file(s): ${conflictedFiles.join(", ")}`, ); this.name = "MergeConflictError"; + this.conflictedFiles = conflictedFiles; + this.strategy = strategy; + this.branch = branch; + this.mainBranch = mainBranch; } }