Skip to content

Changelog

v0.1.0 — 2026

The first published release of SuperJS, shipped as two self-contained npm packages with zero runtime dependencies:

npm install -g @superjsorg/cli

Compiler

A hand-written compiler — no Babel, no TypeScript at runtime. The pipeline is lexer → recursive-descent + Pratt parser (with error recovery) → bidirectional type checker → SJS-IR lowering → JavaScript codegen, with deterministic output and Source Map v3 generation.

CLI

  • superjs build <files...> — compile .sjs to JavaScript
    • --out-dir <dir> — output directory (default dist)
    • --source-map none|inline|external
    • --watch — recompile on file change
    • --no-cache — disable the incremental build cache
  • superjs check <files...> — type-check only (--format pretty|json)
  • superjs translate <files.d.ts...> — translate TypeScript .d.ts declarations to .d.sjs
  • superjs explain <code> — print the full spec write-up for a diagnostic
  • superjs init — write a default superjs.config.json
  • superjs doctor — report environment health

Type system

  • Sound null safety (SJS-E001 / SJS-E003): types are non-nullable by default; T? is the nullable form, with control-flow narrowing
  • Type mismatch detection (SJS-E002): assignment and return-type checking
  • Sum types + exhaustive match (SJS-E007): type Result<T,E> = Ok(T) | Err(E), lowered to tagged objects; non-exhaustive matches are a compile error
  • Structural object types (Go-style), generics with inference, and a dynamic escape hatch instead of any
  • Strict mode (SJS-W001): promotes implicit-dynamic warnings to errors

Configuration & JSX

  • superjs.config.json with nested compilerOptions (target ES2020–ESNext, outDir, sourceMap, strict, noEmitOnError)
  • JSX on by default — automatic or classic runtime via the jsx config block

Incremental builds

  • Persistent on-disk cache keyed by (file hash, compiler version, config hash); warm rebuilds are served from cache and are byte-identical.

What's Next

Stage 2 (interop) adds .d.ts.sjs translation and tsconfig.json paths; Stage 3 brings the formatter, linter, and a marketplace VS Code extension. See the Roadmap for the full plan.