Skip to content

Tiny v0.2.1 - Strong Typing and Networking Update

Choose a tag to compare

@confh confh released this 10 Jun 11:31

Tiny v0.2.1 - Strong Typing and Networking Update

This version introduces a revolutionary strong typing system for arrays, recursive dependency management, and a significantly enhanced HTTP standard library. Multilevel caching has also been implemented to drastically improve development performance for large projects.

Language and Type System

  • Typed Arrays (array:T): New syntax for specifying array element types. The compiler now provides deep type checking, supports nested structures (e.g., array:array:string), and automatically infers return types for array operations like push, pop, and get.
  • Deeply Nested Namespaces: Removed restrictions on namespace depth, allowing for more sophisticated module organization.
  • Enhanced Default Parameters: Function default arguments now support array and object literals with support for deep nesting.
  • ANSI Escape Support: The lexer now supports the \e escape sequence for building rich CLI applications.

Dependency and Tooling

  • Recursive Dependency Installation: tiny install now automatically resolves and installs the entire dependency tree, ensuring environment consistency.
  • Lockfile Optimization: Improved tiny.lock generation with precise dependency resolution based on the project root.
  • Target-Aware Packaging: The packager now automatically filters native plugins based on the target platform (Windows, Linux, macOS), significantly reducing distribution sizes.
  • Dependency Caching: Optimized local caching logic for faster secondary installations and cross-project development.

LSP and Developer Experience

  • Multilevel Performance Caching: Introduced scope and document block caching, greatly improving completion and diagnostic response times in large source files.
  • Library Auto-Imports: The LSP now discovers and suggests classes, functions, and constants from local libraries and installed dependencies, automatically inserting the required import statements.
  • Loop Variable Intelligence: Improved scope recognition and type inference for iteration variables in both standard for and for-in loops.
  • Improved Hover Resolution: Optimized hover logic for declaration members, resolving conflicts between interface fields and global functions with the same name.

Runtime and Standard Library

  • HTTP Module Overhaul:
    • Added native support for PUT, PATCH, and DELETE methods.
    • Introduced static routing for serving entire directories.
    • Added helper functions for HTML, Redirect, File, and Download responses.
    • New security configurations including readTimeoutMs, writeTimeoutMs, and maxBodySize.