typia 13.0.0-rc.2 → 13.0.0
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/README.md
CHANGED
|
@@ -58,15 +58,15 @@ export function random<T>(g?: Partial<IRandomGenerator>): T;
|
|
|
58
58
|
> - JSON serialization is **200x faster** than `class-transformer`
|
|
59
59
|
> - LLM function calling harness turns **6.75% → 100%** accuracy
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
## Setup
|
|
63
63
|
|
|
64
|
-
Install `typia
|
|
64
|
+
Install `typia` with the [`ttsc`](https://github.com/samchon/ttsc) toolchain.
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
# install
|
|
68
|
-
npm i typia
|
|
69
|
-
npm i -D ttsc typescript
|
|
68
|
+
npm i typia
|
|
69
|
+
npm i -D ttsc typescript
|
|
70
70
|
|
|
71
71
|
# build
|
|
72
72
|
npx ttsc
|
|
@@ -78,7 +78,7 @@ npx ttsx src/index.ts
|
|
|
78
78
|
You **must** use `ttsc` and `ttsx`. The stock `tsc`, `ts-node`, and `tsx` cannot apply the `typia` transform, so they will not work.
|
|
79
79
|
|
|
80
80
|
For bundler integration (Vite, Next.js, Webpack, Rollup, esbuild, ...), use [`@ttsc/unplugin`](https://github.com/samchon/ttsc/tree/master/packages/unplugin).
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
|
|
83
83
|
## Transformation
|
|
84
84
|
|
|
@@ -126,8 +126,6 @@ Check out the document in the [website](https://typia.io/docs/):
|
|
|
126
126
|
|
|
127
127
|
- [Introduction](https://typia.io/docs/)
|
|
128
128
|
- [Setup](https://typia.io/docs/setup/)
|
|
129
|
-
- [Legacy (TypeScript v6)](https://typia.io/docs/setup/legacy)
|
|
130
|
-
- [TSGO (TypeScript v7)](https://typia.io/docs/setup/tsgo)
|
|
131
129
|
- [Pure TypeScript](https://typia.io/docs/pure/)
|
|
132
130
|
|
|
133
131
|
### 📖 Features
|
|
@@ -98,6 +98,31 @@ func TestIntersectionNonsensibleBackstop(t *testing.T) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// Unlike the sibling suites sharing atomicIntersectionSchemaTSConfig, this
|
|
102
|
+
// test runs a full `--emit` build, and the fixture imports the real "typia"
|
|
103
|
+
// package whose exports ship TypeScript source — so packages/typia/src/**
|
|
104
|
+
// joins the program as emittable input. outDir keeps that emit inside the
|
|
105
|
+
// fixture directory (removed by t.Cleanup) instead of writing .js beside
|
|
106
|
+
// typia's own sources, and tsgo then demands rootDir name the program's
|
|
107
|
+
// common source directory explicitly (TS5011): "../../.." resolves to
|
|
108
|
+
// packages/typia from a fixture at native/.tmp-ttsc-typia-tests/<name>/.
|
|
109
|
+
const intersectionBackstopTSConfig = `{
|
|
110
|
+
"compilerOptions": {
|
|
111
|
+
"target": "ES2022",
|
|
112
|
+
"module": "commonjs",
|
|
113
|
+
"moduleResolution": "bundler",
|
|
114
|
+
"ignoreDeprecations": "6.0",
|
|
115
|
+
"types": ["*"],
|
|
116
|
+
"esModuleInterop": true,
|
|
117
|
+
"strict": true,
|
|
118
|
+
"skipLibCheck": true,
|
|
119
|
+
"outDir": "dist",
|
|
120
|
+
"rootDir": "../../.."
|
|
121
|
+
},
|
|
122
|
+
"include": ["src"]
|
|
123
|
+
}
|
|
124
|
+
`
|
|
125
|
+
|
|
101
126
|
func intersectionBackstopProject(t *testing.T, name string, decl string) string {
|
|
102
127
|
t.Helper()
|
|
103
128
|
root := ttscTypiaTestRepoRoot(t)
|
|
@@ -114,7 +139,7 @@ func intersectionBackstopProject(t *testing.T, name string, decl string) string
|
|
|
114
139
|
if err := os.MkdirAll(src, 0o755); err != nil {
|
|
115
140
|
t.Fatalf("mkdir fixture src: %v", err)
|
|
116
141
|
}
|
|
117
|
-
if err := os.WriteFile(filepath.Join(dir, "tsconfig.json"), []byte(
|
|
142
|
+
if err := os.WriteFile(filepath.Join(dir, "tsconfig.json"), []byte(intersectionBackstopTSConfig), 0o644); err != nil {
|
|
118
143
|
t.Fatalf("write tsconfig: %v", err)
|
|
119
144
|
}
|
|
120
145
|
source := fmt.Sprintf(`import typia, { tags } from "typia";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typia",
|
|
3
|
-
"version": "13.0.0
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Superfast runtime validators with only one line",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"inquirer": "^8.2.5",
|
|
51
51
|
"randexp": "^0.5.3",
|
|
52
52
|
"tinyglobby": "^0.2.12",
|
|
53
|
-
"@typia/interface": "^13.0.0
|
|
54
|
-
"@typia/utils": "^13.0.0
|
|
53
|
+
"@typia/interface": "^13.0.0",
|
|
54
|
+
"@typia/utils": "^13.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"rollup": "^4.56.0",
|
|
65
65
|
"rollup-plugin-node-externals": "^8.1.2",
|
|
66
66
|
"suppress-warnings": "^1.0.2",
|
|
67
|
-
"ttsc": "^0.17.
|
|
68
|
-
"typescript": "7.0.
|
|
67
|
+
"ttsc": "^0.17.3",
|
|
68
|
+
"typescript": "^7.0.2"
|
|
69
69
|
},
|
|
70
70
|
"sideEffects": [
|
|
71
71
|
"./lib/_virtual/*.mjs",
|