Skip to content

v0.6.182

Latest

Choose a tag to compare

@NoahBPeterson NoahBPeterson released this 08 Jun 19:20

Changelog

0.6.179 – 0.6.182 (2026-06-08)

A batch focused on real ucode/OpenWrt code: the fs standard streams, smarter
length()/filter() typing, and first-class support for extensionless shebang scripts.

New

  • fs stdin / stdout / stderr support (0.6.180). import { stdin } from "fs"
    is now valid (it was wrongly flagged UC3005). These are real fs.file handles, so
    stdin.read("line"), stdout.write(...), stderr, .fileno(), .close(), etc.
    get full diagnostics, hover, signature help, and completion — via named import,
    alias (stdin as si), or namespace (fs.stdin). They also appear in the fs. and
    import { … } completion lists.
  • Extensionless ucode shebang scripts (firstLine + 0.6.182). Files like OpenWrt's
    /usr/sbin/unetacld that begin with #!/usr/bin/env ucode are now recognised as
    ucode: VS Code assigns the language automatically, and the workspace scan analyzes
    them (Problems panel for unopened files) and includes them in cross-file features.

Improvements

  • filter() is now a type-narrowing construct (0.6.179). filter(arr, (x) => type(x) == "string") narrows the result to array<string>, reusing the same guard
    engine as if blocks (type()/truthy/!= null/numeric-comparison guards).
  • fs.stdin. completes fs.file methods (0.6.181) instead of the fs module list.

Fixes

  • length() in a test position is no longer flagged (0.6.179). length(x) > 0,
    if (!length(x)), and filter(a, x => length(x) > 0) are sound type-checks
    (length is total), so they aren't reported as "unknown argument" — even under
    'use strict'. A bare value use (let n = length(x)) is still flagged.

Test suite: 186 curated suites + 1143 native tests passing.