@ttsc/wasm 0.14.2 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/go.mod +3 -5
- package/dist/ttsc.wasm +0 -0
- package/go.mod +3 -5
- package/go.sum +0 -4
- package/package.json +1 -1
- package/shim-vendor/shim/ast/parent.go +31 -0
- package/shim-vendor/shim/compiler/emitassemble.go +30 -0
- package/shim-vendor/shim/compiler/emithook.go +22 -0
- package/shim-vendor/shim/compiler/go.mod +9 -0
- package/shim-vendor/shim/compiler/go.sum +22 -0
- package/shim-vendor/shim/core/modulekind.go +10 -0
- package/shim-vendor/shim/printer/emithost.go +24 -0
- package/shim-vendor/shim/printer/go.mod +9 -0
- package/shim-vendor/shim/printer/go.sum +22 -0
- package/shim-vendor/shim/transformers/go.mod +14 -0
- package/shim-vendor/shim/transformers/go.sum +20 -0
- package/shim-vendor/shim/transformers/shim.go +15 -0
package/dist/go.mod
CHANGED
|
@@ -25,23 +25,21 @@ replace (
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
require (
|
|
28
|
+
github.com/microsoft/typescript-go/shim/ast v0.0.0
|
|
28
29
|
github.com/microsoft/typescript-go/shim/compiler v0.0.0
|
|
30
|
+
github.com/microsoft/typescript-go/shim/scanner v0.0.0
|
|
29
31
|
github.com/samchon/ttsc/packages/ttsc v0.0.0
|
|
30
32
|
)
|
|
31
33
|
|
|
32
34
|
require (
|
|
33
|
-
github.com/Microsoft/go-winio v0.6.2 // indirect
|
|
34
35
|
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
35
36
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
36
|
-
github.com/mackerelio/go-osstat v0.2.7 // indirect
|
|
37
37
|
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 // indirect
|
|
38
|
-
github.com/microsoft/typescript-go/shim/ast v0.0.0 // indirect
|
|
39
38
|
github.com/microsoft/typescript-go/shim/bundled v0.0.0 // indirect
|
|
40
39
|
github.com/microsoft/typescript-go/shim/checker v0.0.0 // indirect
|
|
41
40
|
github.com/microsoft/typescript-go/shim/core v0.0.0 // indirect
|
|
42
41
|
github.com/microsoft/typescript-go/shim/diagnosticwriter v0.0.0 // indirect
|
|
43
|
-
github.com/microsoft/typescript-go/shim/
|
|
44
|
-
github.com/microsoft/typescript-go/shim/scanner v0.0.0 // indirect
|
|
42
|
+
github.com/microsoft/typescript-go/shim/printer v0.0.0 // indirect
|
|
45
43
|
github.com/microsoft/typescript-go/shim/tsoptions v0.0.0 // indirect
|
|
46
44
|
github.com/microsoft/typescript-go/shim/tspath v0.0.0 // indirect
|
|
47
45
|
github.com/microsoft/typescript-go/shim/vfs v0.0.0 // indirect
|
package/dist/ttsc.wasm
CHANGED
|
Binary file
|
package/go.mod
CHANGED
|
@@ -25,23 +25,21 @@ replace (
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
require (
|
|
28
|
+
github.com/microsoft/typescript-go/shim/ast v0.0.0
|
|
28
29
|
github.com/microsoft/typescript-go/shim/compiler v0.0.0
|
|
30
|
+
github.com/microsoft/typescript-go/shim/scanner v0.0.0
|
|
29
31
|
github.com/samchon/ttsc/packages/ttsc v0.0.0
|
|
30
32
|
)
|
|
31
33
|
|
|
32
34
|
require (
|
|
33
|
-
github.com/Microsoft/go-winio v0.6.2 // indirect
|
|
34
35
|
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
35
36
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
36
|
-
github.com/mackerelio/go-osstat v0.2.7 // indirect
|
|
37
37
|
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 // indirect
|
|
38
|
-
github.com/microsoft/typescript-go/shim/ast v0.0.0 // indirect
|
|
39
38
|
github.com/microsoft/typescript-go/shim/bundled v0.0.0 // indirect
|
|
40
39
|
github.com/microsoft/typescript-go/shim/checker v0.0.0 // indirect
|
|
41
40
|
github.com/microsoft/typescript-go/shim/core v0.0.0 // indirect
|
|
42
41
|
github.com/microsoft/typescript-go/shim/diagnosticwriter v0.0.0 // indirect
|
|
43
|
-
github.com/microsoft/typescript-go/shim/
|
|
44
|
-
github.com/microsoft/typescript-go/shim/scanner v0.0.0 // indirect
|
|
42
|
+
github.com/microsoft/typescript-go/shim/printer v0.0.0 // indirect
|
|
45
43
|
github.com/microsoft/typescript-go/shim/tsoptions v0.0.0 // indirect
|
|
46
44
|
github.com/microsoft/typescript-go/shim/tspath v0.0.0 // indirect
|
|
47
45
|
github.com/microsoft/typescript-go/shim/vfs v0.0.0 // indirect
|
package/go.sum
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
|
2
|
-
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
|
3
1
|
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
|
|
4
2
|
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
|
5
3
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
6
4
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
7
5
|
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
8
6
|
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
9
|
-
github.com/mackerelio/go-osstat v0.2.7 h1:TCavZi10wF49bT6iQZ9eT2keGZQpC69MTDfdJej5e94=
|
|
10
|
-
github.com/mackerelio/go-osstat v0.2.7/go.mod h1:dwpYh5pIPmvk+IEwBKNIWRFMB92mrC08CmXOhDC7nQk=
|
|
11
7
|
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
|
|
12
8
|
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
|
|
13
9
|
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package ast
|
|
2
|
+
|
|
3
|
+
import innerast "github.com/microsoft/typescript-go/internal/ast"
|
|
4
|
+
|
|
5
|
+
// SetParentInChildren recursively sets each descendant node's Parent pointer to
|
|
6
|
+
// its containing node.
|
|
7
|
+
//
|
|
8
|
+
// A transform that splices freshly built (synthetic) nodes onto a SourceFile
|
|
9
|
+
// must call this before emit: passes that walk parents — e.g. the emit
|
|
10
|
+
// resolver's reference marking (MarkLinkedReferencesRecursively) — dereference
|
|
11
|
+
// Parent and would hit nil on a synthetic node otherwise.
|
|
12
|
+
func SetParentInChildren(node *Node) {
|
|
13
|
+
innerast.SetParentInChildren(node)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// SetParentInChildrenUnset sets Parent only on nodes that don't already have
|
|
17
|
+
// one, recursing through the whole tree. Unlike SetParentInChildren it does NOT
|
|
18
|
+
// overwrite the parent of original parse-tree nodes that a transform reused
|
|
19
|
+
// inside a rebuilt SourceFile — overwriting those (e.g. an `export namespace`
|
|
20
|
+
// kept verbatim while sibling statements were rewritten) makes tsgo's
|
|
21
|
+
// runtime-syntax/printer mis-resolve the declaration and drop it from emit.
|
|
22
|
+
// Only freshly built (synthetic) nodes need a parent wired, and those start nil.
|
|
23
|
+
func SetParentInChildrenUnset(node *Node) {
|
|
24
|
+
node.ForEachChild(func(child *Node) bool {
|
|
25
|
+
if child.Parent == nil {
|
|
26
|
+
child.Parent = node
|
|
27
|
+
}
|
|
28
|
+
SetParentInChildrenUnset(child)
|
|
29
|
+
return false
|
|
30
|
+
})
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// gen_shims:hand-maintained
|
|
2
|
+
//
|
|
3
|
+
// Emit-pipeline assembly parts: pick the files tsgo would emit and resolve
|
|
4
|
+
// their output paths, so ttsc's driver can drive emit per file with a plugin
|
|
5
|
+
// transformer inserted ahead of the builtin chain.
|
|
6
|
+
package compiler
|
|
7
|
+
|
|
8
|
+
import (
|
|
9
|
+
_ "unsafe"
|
|
10
|
+
|
|
11
|
+
innerast "github.com/microsoft/typescript-go/internal/ast"
|
|
12
|
+
innercompiler "github.com/microsoft/typescript-go/internal/compiler"
|
|
13
|
+
innercore "github.com/microsoft/typescript-go/internal/core"
|
|
14
|
+
inneroutputpaths "github.com/microsoft/typescript-go/internal/outputpaths"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
// GetSourceFilesToEmit returns the source files tsgo would emit for the program
|
|
18
|
+
// (excludes .d.ts and external-library files), linked from the internal package.
|
|
19
|
+
//
|
|
20
|
+
//go:linkname GetSourceFilesToEmit github.com/microsoft/typescript-go/internal/compiler.getSourceFilesToEmit
|
|
21
|
+
func GetSourceFilesToEmit(host innercompiler.SourceFileMayBeEmittedHost, targetSourceFile *innerast.SourceFile, forceDtsEmit bool) []*innerast.SourceFile
|
|
22
|
+
|
|
23
|
+
// OutputPaths holds the resolved output file paths for one source file.
|
|
24
|
+
type OutputPaths = inneroutputpaths.OutputPaths
|
|
25
|
+
|
|
26
|
+
// GetOutputPathsFor resolves the .js / .d.ts / map output paths for a source
|
|
27
|
+
// file (honoring rootDir/outDir), the same call tsgo's emitter makes.
|
|
28
|
+
func GetOutputPathsFor(sourceFile *innerast.SourceFile, options *innercore.CompilerOptions, host inneroutputpaths.OutputPathsHost, forceDtsEmit bool) *inneroutputpaths.OutputPaths {
|
|
29
|
+
return inneroutputpaths.GetOutputPathsFor(sourceFile, options, host, forceDtsEmit)
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// gen_shims:hand-maintained
|
|
2
|
+
//
|
|
3
|
+
// Exposes tsgo's emit-stage internals so ttsc can assemble the emit pipeline
|
|
4
|
+
// from real tsgo parts (no tsgo source copy/edit): obtain the builtin
|
|
5
|
+
// transformer chain for a file and prepend a plugin transformer that shares the
|
|
6
|
+
// same EmitContext, so module-transform aliases plugin-generated imports.
|
|
7
|
+
package compiler
|
|
8
|
+
|
|
9
|
+
import (
|
|
10
|
+
_ "unsafe"
|
|
11
|
+
|
|
12
|
+
innerast "github.com/microsoft/typescript-go/internal/ast"
|
|
13
|
+
innerprinter "github.com/microsoft/typescript-go/internal/printer"
|
|
14
|
+
innertransformers "github.com/microsoft/typescript-go/internal/transformers"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
// GetScriptTransformers returns tsgo's builtin emit transformer chain
|
|
18
|
+
// (type-erase, import-elision, runtime-syntax, module-transform, ...) for one
|
|
19
|
+
// source file, linked from the internal package via go:linkname.
|
|
20
|
+
//
|
|
21
|
+
//go:linkname GetScriptTransformers github.com/microsoft/typescript-go/internal/compiler.getScriptTransformers
|
|
22
|
+
func GetScriptTransformers(emitContext *innerprinter.EmitContext, host innerprinter.EmitHost, sourceFile *innerast.SourceFile) []*innertransformers.Transformer
|
|
@@ -3,3 +3,12 @@ module github.com/microsoft/typescript-go/shim/compiler
|
|
|
3
3
|
go 1.26
|
|
4
4
|
|
|
5
5
|
require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
|
|
6
|
+
|
|
7
|
+
require (
|
|
8
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
9
|
+
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
10
|
+
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
11
|
+
golang.org/x/sync v0.20.0 // indirect
|
|
12
|
+
golang.org/x/sys v0.43.0 // indirect
|
|
13
|
+
golang.org/x/text v0.36.0 // indirect
|
|
14
|
+
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
|
|
2
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
|
3
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
4
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
5
|
+
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
6
|
+
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
7
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
|
|
8
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
|
|
9
|
+
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
|
|
10
|
+
github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
|
|
11
|
+
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
|
12
|
+
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
|
|
13
|
+
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
|
14
|
+
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
|
15
|
+
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
|
16
|
+
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
|
17
|
+
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
|
18
|
+
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
19
|
+
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
|
20
|
+
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
|
21
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
22
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// gen_shims:hand-maintained
|
|
2
|
+
//
|
|
3
|
+
// Re-exports the ModuleKind enum so plugins / ttsc can type emit-format values
|
|
4
|
+
// (e.g. an EmitHost.GetEmitModuleFormatOfFile result).
|
|
5
|
+
package core
|
|
6
|
+
|
|
7
|
+
import innercore "github.com/microsoft/typescript-go/internal/core"
|
|
8
|
+
|
|
9
|
+
// ModuleKind is tsgo's module-format enum (CommonJS, ESNext, NodeNext, ...).
|
|
10
|
+
type ModuleKind = innercore.ModuleKind
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// gen_shims:hand-maintained
|
|
2
|
+
//
|
|
3
|
+
// Re-exports the emit host/resolver interfaces so ttsc's driver can implement
|
|
4
|
+
// its own EmitHost (delegating to driver.Program) and hand it to
|
|
5
|
+
// compiler.GetScriptTransformers when assembling the emit pipeline.
|
|
6
|
+
package printer
|
|
7
|
+
|
|
8
|
+
import innerprinter "github.com/microsoft/typescript-go/internal/printer"
|
|
9
|
+
|
|
10
|
+
// EmitHost is the per-emit host interface tsgo's transformers query (Options,
|
|
11
|
+
// SourceFiles, GetEmitResolver, GetEmitModuleFormatOfFile, WriteFile, ...).
|
|
12
|
+
type EmitHost = innerprinter.EmitHost
|
|
13
|
+
|
|
14
|
+
// EmitResolver resolves emit-time facts about nodes (referenced imports,
|
|
15
|
+
// declaration flags, ...) under the checker mutex.
|
|
16
|
+
type EmitResolver = innerprinter.EmitResolver
|
|
17
|
+
|
|
18
|
+
// EmitTextWriter is the sink the printer emits into; String() yields the text.
|
|
19
|
+
type EmitTextWriter = innerprinter.EmitTextWriter
|
|
20
|
+
|
|
21
|
+
// NewTextWriter creates a fresh writer for one emit (newLine e.g. "\n").
|
|
22
|
+
func NewTextWriter(newLine string, indentSize int) EmitTextWriter {
|
|
23
|
+
return innerprinter.NewTextWriter(newLine, indentSize)
|
|
24
|
+
}
|
|
@@ -3,3 +3,12 @@ module github.com/microsoft/typescript-go/shim/printer
|
|
|
3
3
|
go 1.26
|
|
4
4
|
|
|
5
5
|
require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
|
|
6
|
+
|
|
7
|
+
require (
|
|
8
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
9
|
+
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
10
|
+
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
11
|
+
golang.org/x/sync v0.20.0 // indirect
|
|
12
|
+
golang.org/x/sys v0.43.0 // indirect
|
|
13
|
+
golang.org/x/text v0.36.0 // indirect
|
|
14
|
+
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
|
|
2
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
|
3
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
4
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
5
|
+
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
6
|
+
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
7
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
|
|
8
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
|
|
9
|
+
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
|
|
10
|
+
github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
|
|
11
|
+
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
|
12
|
+
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
|
|
13
|
+
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
|
14
|
+
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
|
15
|
+
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
|
16
|
+
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
|
17
|
+
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
|
18
|
+
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
19
|
+
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
|
20
|
+
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
|
21
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
22
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module github.com/microsoft/typescript-go/shim/transformers
|
|
2
|
+
|
|
3
|
+
go 1.26
|
|
4
|
+
|
|
5
|
+
require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
|
|
6
|
+
|
|
7
|
+
require (
|
|
8
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
9
|
+
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
10
|
+
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
11
|
+
golang.org/x/sync v0.20.0 // indirect
|
|
12
|
+
golang.org/x/sys v0.43.0 // indirect
|
|
13
|
+
golang.org/x/text v0.36.0 // indirect
|
|
14
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
|
|
2
|
+
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
|
3
|
+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
4
|
+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
5
|
+
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
6
|
+
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
7
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
|
|
8
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
|
|
9
|
+
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
|
10
|
+
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
|
|
11
|
+
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
|
12
|
+
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
|
13
|
+
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
|
14
|
+
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
|
15
|
+
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
|
16
|
+
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
17
|
+
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
|
18
|
+
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
|
19
|
+
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
20
|
+
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// gen_shims:hand-maintained
|
|
2
|
+
//
|
|
3
|
+
// Re-exports tsgo's emit transformer type so ttsc can build a plugin
|
|
4
|
+
// transformer and run it ahead of the builtin emit chain. Plugins (typia,
|
|
5
|
+
// nestia) return real AST nodes; ttsc inserts their transformer first in the
|
|
6
|
+
// same EmitContext as the builtins, so tsgo's module-transform aliases imports
|
|
7
|
+
// itself, no text-splice needed.
|
|
8
|
+
package transformers
|
|
9
|
+
|
|
10
|
+
import innertransformers "github.com/microsoft/typescript-go/internal/transformers"
|
|
11
|
+
|
|
12
|
+
// Transformer is one stage of tsgo's emit transformer chain
|
|
13
|
+
// (TransformSourceFile mutates the SourceFile AST in place within the emit
|
|
14
|
+
// EmitContext).
|
|
15
|
+
type Transformer = innertransformers.Transformer
|