You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm rejects the unscoped name `tskm` as too similar to existing packages
(tsm/tsx/tsc/...), so rename the runtime library to @tskm/core, matching
the @tskm/compiler and @tskm/vite family.
The compiler discovers schemas imported from the runtime module and emits
imports for it, so update its RUNTIME_MODULE constant and generated import
to @tskm/core, and bump @tskm/compiler to 0.0.2 (the already-published
0.0.1 still targets the old name). README, examples, compiler test
fixtures, and the publish/smoke scripts are updated to match. The `tskm`
CLI command (the @tskm/compiler bin) and the Standard Schema vendor string
are intentionally left unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ tskm is two things that fit together:
12
12
13
13
-**An AOT (ahead-of-time) type compiler** — instead of deriving a type from a schema with `z.infer<typeof schema>` at every use site, tskm pre-computes it once and writes the fully-expanded, concrete type to a real file. The answer comes from the actual TypeScript type checker, queried out of process.
14
14
15
-
It is a bun-workspaces monorepo: `tskm` (runtime), `@tskm/compiler` (AOT codegen + CLI), `@tskm/vite` (Vite plugin).
15
+
It is a bun-workspaces monorepo: `@tskm/core` (runtime), `@tskm/compiler` (AOT codegen + CLI), `@tskm/vite` (Vite plugin).
16
16
17
17
## Why tskm?
18
18
@@ -35,7 +35,7 @@ tskm goes the **opposite direction — schema → type, not type → validator
35
35
**Validate at runtime** — schemas are values; `parse` / `safeParse` are standalone functions:
@@ -102,12 +102,12 @@ it runs the compiler on `buildStart` and watches during `vite dev`.
102
102
103
103
The compiler never reads your schema at runtime — the inferred type only exists in the type system, so it asks the type checker directly:
104
104
105
-
1.**Discover** — [`oxc-parser`](https://oxc.rs) scans each source file (syntactically) for exported `const`s whose factory is imported from `tskm`, and for explicit `type T = Infer<typeof X>` markers.
105
+
1.**Discover** — [`oxc-parser`](https://oxc.rs) scans each source file (syntactically) for exported `const`s whose factory is imported from `@tskm/core`, and for explicit `type T = Infer<typeof X>` markers.
106
106
2.**Query** — for each schema, the compiler writes a tiny sibling file (`<base>.tskm-query.ts`, deleted afterward) next to the source that declares a marker against the schema's output type:
0 commit comments