Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ require (

require (
github.com/google/go-cmp v0.7.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
golang.org/x/mod v0.26.0 // indirect
)

require (
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 // indirect
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a // indirect
golang.org/x/text v0.28.0
)
10 changes: 8 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 h1:KaJSg7E
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 h1:i9XPvR7BvGGkaYZfb2Ah6YlcGMK85JaxgEBXHoejjB0=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a h1:CDBRuWqR59hrdJw7R6T+rIvlCzFvc8fZmt+h7BddimA=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a h1:a6TNDN9CgG+cYjaeN8l2mc4kSz2iMiCDQxPEyltUV/I=
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a/go.mod h1:EbW0wDK/qEUYI0A5bqq0C2kF8JTQwWONmGDBbzsxxHo=
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
Expand Down
5 changes: 2 additions & 3 deletions internal/utils/create_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"

"github.com/microsoft/typescript-go/shim/bundled"
"github.com/microsoft/typescript-go/shim/collections"
"github.com/microsoft/typescript-go/shim/compiler"
"github.com/microsoft/typescript-go/shim/core"
"github.com/microsoft/typescript-go/shim/tsoptions"
Expand All @@ -16,8 +15,8 @@ import (

func CreateCompilerHost(cwd string, fs vfs.FS) compiler.CompilerHost {
defaultLibraryPath := bundled.LibPath()
var extendedConfigCache collections.SyncMap[tspath.Path, *tsoptions.ExtendedConfigCacheEntry]
return compiler.NewCompilerHost(cwd, fs, defaultLibraryPath, &extendedConfigCache,nil)
var extendedConfigCache tsoptions.ExtendedConfigCache
return compiler.NewCompilerHost(cwd, fs, defaultLibraryPath, extendedConfigCache, nil)
}

func CreateProgram(singleThreaded bool, fs vfs.FS, cwd string, tsconfigPath string, host compiler.CompilerHost) (*compiler.Program, error) {
Expand Down
5 changes: 5 additions & 0 deletions internal/utils/overlay_vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type OverlayVFS struct {
VirtualFiles map[string]string
}

// Chtimes implements vfs.FS.
func (vfs *OverlayVFS) Chtimes(path string, aTime time.Time, mTime time.Time) error {
panic("unimplemented")
}

var _ vfs.FS = (*OverlayVFS)(nil)

func (vfs *OverlayVFS) UseCaseSensitiveFileNames() bool {
Expand Down
3 changes: 2 additions & 1 deletion shim/ast/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ module github.com/microsoft/typescript-go/shim/ast

go 1.25

require github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459
require github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a

require (
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/text v0.28.0 // indirect
)
6 changes: 4 additions & 2 deletions shim/ast/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 h1:KaJSg7E
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 h1:i9XPvR7BvGGkaYZfb2Ah6YlcGMK85JaxgEBXHoejjB0=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a h1:CDBRuWqR59hrdJw7R6T+rIvlCzFvc8fZmt+h7BddimA=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
Expand Down
24 changes: 23 additions & 1 deletion shim/ast/shim.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion shim/bundled/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ module github.com/microsoft/typescript-go/shim/bundled

go 1.25

require github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459
require github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a

require (
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/text v0.28.0 // indirect
)
6 changes: 4 additions & 2 deletions shim/bundled/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 h1:KaJSg7E
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 h1:i9XPvR7BvGGkaYZfb2Ah6YlcGMK85JaxgEBXHoejjB0=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a h1:CDBRuWqR59hrdJw7R6T+rIvlCzFvc8fZmt+h7BddimA=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
Expand Down
3 changes: 2 additions & 1 deletion shim/checker/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ module github.com/microsoft/typescript-go/shim/checker

go 1.25

require github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459
require github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a

require (
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/text v0.28.0 // indirect
)
6 changes: 4 additions & 2 deletions shim/checker/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 h1:KaJSg7E
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 h1:i9XPvR7BvGGkaYZfb2Ah6YlcGMK85JaxgEBXHoejjB0=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a h1:CDBRuWqR59hrdJw7R6T+rIvlCzFvc8fZmt+h7BddimA=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
Expand Down
2 changes: 1 addition & 1 deletion shim/collections/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/microsoft/typescript-go/shim/collections

go 1.25

require github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459
require github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a

require github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 // indirect
4 changes: 2 additions & 2 deletions shim/collections/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1 h1:KaJSg7E
github.com/go-json-experiment/json v0.0.0-20250811204210-4789234c3ea1/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459 h1:i9XPvR7BvGGkaYZfb2Ah6YlcGMK85JaxgEBXHoejjB0=
github.com/microsoft/typescript-go v0.0.0-20250814234431-ae2bacc8a459/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a h1:CDBRuWqR59hrdJw7R6T+rIvlCzFvc8fZmt+h7BddimA=
github.com/microsoft/typescript-go v0.0.0-20250827194408-bcb8510f109a/go.mod h1:A7HQr1XidFhXZBSB1VVWqMjfrisXlWDPeNwMLxj6mDc=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
1 change: 0 additions & 1 deletion shim/collections/shim.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading