From fb6a2bb90a4453c4bd208c72f25bce0b7bc9c2fb Mon Sep 17 00:00:00 2001 From: Mattia Manzati Date: Thu, 7 May 2026 00:11:31 +0200 Subject: [PATCH 1/2] chore: update typescript-go --- .changeset/update-typescript-go-1e58c841.md | 7 +++++++ _patches/001-cmd-tsgo-main.patch | 5 +++-- shim/ast/shim.go | 2 +- shim/collections/shim.go | 2 ++ shim/core/shim.go | 2 ++ typescript-go | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .changeset/update-typescript-go-1e58c841.md diff --git a/.changeset/update-typescript-go-1e58c841.md b/.changeset/update-typescript-go-1e58c841.md new file mode 100644 index 00000000..91503c05 --- /dev/null +++ b/.changeset/update-typescript-go-1e58c841.md @@ -0,0 +1,7 @@ +--- +"@effect/tsgo": patch +--- + +Update the pinned `typescript-go` submodule to `1e58c8419142e35f338840dc50822c48dcc4ec1f` and refresh the local patch metadata needed to apply cleanly on that upstream revision. + +Regenerate shim bindings for upstream API changes introduced by the submodule update. diff --git a/_patches/001-cmd-tsgo-main.patch b/_patches/001-cmd-tsgo-main.patch index 1f5695ad..f1016965 100644 --- a/_patches/001-cmd-tsgo-main.patch +++ b/_patches/001-cmd-tsgo-main.patch @@ -1,8 +1,8 @@ diff --git a/cmd/tsgo/main.go b/cmd/tsgo/main.go -index 5eabc96df..82b7bf932 100644 +index a2fe02e8c..10044042c 100644 --- a/cmd/tsgo/main.go +++ b/cmd/tsgo/main.go -@@ -3,6 +3,11 @@ package main +@@ -3,7 +3,12 @@ package main import ( "os" @@ -11,6 +11,7 @@ index 5eabc96df..82b7bf932 100644 + _ "github.com/effect-ts/tsgo/etscheckerhooks" // checker diagnostics hooks + _ "github.com/effect-ts/tsgo/etslshooks" // LS codefix hooks + + "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/execute" ) diff --git a/shim/ast/shim.go b/shim/ast/shim.go index 6dfc6f53..507d6073 100644 --- a/shim/ast/shim.go +++ b/shim/ast/shim.go @@ -789,7 +789,7 @@ func IsEqualityOperatorOrHigher(kind ast.Kind) bool //go:linkname IsExclusivelyTypeOnlyImportOrExport github.com/microsoft/typescript-go/internal/ast.IsExclusivelyTypeOnlyImportOrExport func IsExclusivelyTypeOnlyImportOrExport(node *ast.Node) bool //go:linkname IsExpandoInitializer github.com/microsoft/typescript-go/internal/ast.IsExpandoInitializer -func IsExpandoInitializer(initializer *ast.Node) bool +func IsExpandoInitializer(declaration *ast.Node, initializer *ast.Node) bool //go:linkname IsExpandoPropertyDeclaration github.com/microsoft/typescript-go/internal/ast.IsExpandoPropertyDeclaration func IsExpandoPropertyDeclaration(node *ast.Node) bool //go:linkname IsExponentiationOperator github.com/microsoft/typescript-go/internal/ast.IsExponentiationOperator diff --git a/shim/collections/shim.go b/shim/collections/shim.go index 95c10f40..bfd93fd7 100644 --- a/shim/collections/shim.go +++ b/shim/collections/shim.go @@ -5,6 +5,8 @@ package collections import "github.com/microsoft/typescript-go/internal/collections" +type CopyOnWriteMap[K comparable, V any] = collections.CopyOnWriteMap[K,V] +type CopyOnWriteSet[K comparable] = collections.CopyOnWriteSet[K] type MapEntry[K comparable, V any] = collections.MapEntry[K,V] type MultiMap[K, V comparable] = collections.MultiMap[K,V] type OrderedMap[K comparable, V any] = collections.OrderedMap[K,V] diff --git a/shim/core/shim.go b/shim/core/shim.go index eb1e29f5..02080218 100644 --- a/shim/core/shim.go +++ b/shim/core/shim.go @@ -10,6 +10,8 @@ import _ "unsafe" //go:linkname ApplyBulkEdits github.com/microsoft/typescript-go/internal/core.ApplyBulkEdits func ApplyBulkEdits(text string, edits []core.TextChange) string +//go:linkname ApplyDebugStackLimit github.com/microsoft/typescript-go/internal/core.ApplyDebugStackLimit +func ApplyDebugStackLimit() type Arena[T any] = core.Arena[T] //go:linkname BoolToTristate github.com/microsoft/typescript-go/internal/core.BoolToTristate func BoolToTristate(b bool) core.Tristate diff --git a/typescript-go b/typescript-go index 56ab4af4..1e58c841 160000 --- a/typescript-go +++ b/typescript-go @@ -1 +1 @@ -Subproject commit 56ab4af421576f5326e0c08be5ac67149c053618 +Subproject commit 1e58c8419142e35f338840dc50822c48dcc4ec1f From 5f2f3aa1089edd8e2234545abc475daa76239b2a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 22:18:22 +0000 Subject: [PATCH 2/2] Refresh flake vendor hash --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 8f9871f5..24924439 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ /* Source of truth: git submodule `typescript-go` commit. Keep in sync via `_tools/update-flake-vendor-hash.sh`. */ typescript-go-src = { - url = "github:microsoft/typescript-go/56ab4af421576f5326e0c08be5ac67149c053618?submodules=1"; + url = "github:microsoft/typescript-go/1e58c8419142e35f338840dc50822c48dcc4ec1f?submodules=1"; flake = false; }; /* Source of truth: typescript-go's `_submodules/TypeScript` commit.