ttsc 0.16.8 → 0.16.10

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.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/utility/serve.go +8 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttsc",
3
- "version": "0.16.8",
3
+ "version": "0.16.10",
4
4
  "description": "General-purpose TypeScript-Go compiler, runtime, plugin host, and LSP host.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -32,13 +32,13 @@
32
32
  "typescript": "7.0.1-rc"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@ttsc/linux-x64": "0.16.8",
36
- "@ttsc/linux-arm": "0.16.8",
37
- "@ttsc/linux-arm64": "0.16.8",
38
- "@ttsc/darwin-x64": "0.16.8",
39
- "@ttsc/win32-x64": "0.16.8",
40
- "@ttsc/win32-arm64": "0.16.8",
41
- "@ttsc/darwin-arm64": "0.16.8"
35
+ "@ttsc/linux-x64": "0.16.10",
36
+ "@ttsc/linux-arm": "0.16.10",
37
+ "@ttsc/linux-arm64": "0.16.10",
38
+ "@ttsc/darwin-x64": "0.16.10",
39
+ "@ttsc/darwin-arm64": "0.16.10",
40
+ "@ttsc/win32-x64": "0.16.10",
41
+ "@ttsc/win32-arm64": "0.16.10"
42
42
  },
43
43
  "sideEffects": false,
44
44
  "files": [
package/utility/serve.go CHANGED
@@ -6,10 +6,10 @@ import (
6
6
  "fmt"
7
7
  "io"
8
8
  "os"
9
- "path/filepath"
10
9
  "strings"
11
10
 
12
11
  shimprinter "github.com/microsoft/typescript-go/shim/printer"
12
+ shimtspath "github.com/microsoft/typescript-go/shim/tspath"
13
13
 
14
14
  "github.com/samchon/ttsc/packages/ttsc/driver"
15
15
  )
@@ -147,12 +147,12 @@ func buildServeCache(opts hostOptions) (map[string]string, bool) {
147
147
  return cache, true
148
148
  }
149
149
 
150
- // resolveServePath turns a request's file into an absolute path so apiOutputKey
151
- // computes the same key buildServeCache stored, and so overlay overrides are
152
- // keyed the way the program asks for them.
150
+ // resolveServePath turns a request's file into a normalized absolute path, the
151
+ // same form TypeScript-Go's own SourceFile.FileName() and the OverlayFS key
152
+ // already use, so apiOutputKey and overlay lookups match regardless of how the
153
+ // caller spelled the path. tspath.ResolvePath discards cwd and normalizes in
154
+ // place when file is already rooted, so one call covers both request cases
155
+ // (samchon/ttsc#319).
153
156
  func resolveServePath(cwd, file string) string {
154
- if filepath.IsAbs(file) {
155
- return file
156
- }
157
- return filepath.Join(cwd, file)
157
+ return shimtspath.ResolvePath(cwd, file)
158
158
  }