Skip to content

Releases: ZtaMDev/RoundJS

v0.2.3

11 Jan 15:09

Choose a tag to compare

Release Notes - v0.2.3

Fixed a bug where the round-core package was not adding @round-core/lint latest version to the devDependencies of a project when using round init.

v0.2.2

11 Jan 04:56

Choose a tag to compare

Release Notes - v0.2.2

round-core v0.2.2

New development ecosystem providing robust linting and formatting for .round files.

New Packages in @round-core

  • @round-core/shared: Core utilities including the SourceMapper and runPreprocess used by our tooling to ensure accurate source-to-generated mapping.
  • @round-core/lint: Official ESLint plugin for RoundJS.
    • Dynamic Global Injection: Automatically detects loop variables (like t in for (t in list)) and declares them as globals, eliminating false "undefined variable" errors.
    • 1:1 Line Mapping: Error highlights align perfectly with your source code, even after complex transformations.
    • Component Awareness: Prevents warnings for used JSX components within RoundJS blocks.
  • @round-core/prettier: Hybrid Prettier plugin that formats your code while preserving native RoundJS syntax.
    • Maintains the clean {for (...) { ... }} and {if (...) { ... }} structures.
    • Integrates seamlessly with standard Prettier workflows.

CLI Improvements

  • round init: Projects initialized with the CLI now come pre-configured with ESLint and Prettier out of the box.

Installation

Install the new developer tools:

npm install -D @round-core/lint @round-core/prettier

or with Bun:

bun add -d @round-core/lint @round-core/prettier

Configuration

eslint.config.js

import lintPlugin from "@round-core/lint";
import globals from "globals";
import * as espree from "espree";

export default [
  {
    files: ["**/*.round"],
    plugins: {
      "@round-core/lint": lintPlugin,
    },
    processor: lintPlugin.processors[".round"],
    rules: {
      "no-unused-vars": "warn",
      "no-undef": "error",
    },
    languageOptions: {
      parser: espree,
      ecmaVersion: "latest",
      sourceType: "module",
      globals: {
        ...globals.browser,
        ...globals.node,
      },
      parserOptions: {
        ecmaFeatures: {
          jsx: true,
        },
      },
    },
  },
];

.prettierrc

{
  "plugins": ["@round-core/prettier"],
  "overrides": [
    {
      "files": "*.round",
      "options": {
        "parser": "round"
      }
    }
  ]
}

VS Code Extension v0.1.9

Synchronized with the new linting and formatting ecosystem.

Improvements

  • Full ESLint Support: Diagnostics now use the official @round-core/lint processor for pixel-perfect error highlighting.
  • Stable Formatting: Prettier integration is now more robust, ensuring your code stays formatted without losing its RoundJS identity.
  • Auto-detection: The extension automatically leverages your local ESLint/Prettier configuration if present.

v0.2.1

10 Jan 21:38

Choose a tag to compare

Release Notes - v0.2.1

round-core v0.2.1

Persistence improvements for routing and critical 404 detection bugfix.

New Features

  • Routing Memoization (memo prop): You can now keep routes "alive" in the DOM even when they aren't active.
    • Adding memo={true} to a <Route> or <Page> prevents its destruction on navigation.
    • Elements are hidden with display: none, preserving Signals, DOM identity, and CSS animations.
    • Perfect for stateful views like video players, complex filters, or multi-step forms.
    • Includes a global persistence cache so memoized routes survive if the Route component itself is conditionally unmounted by a parent.

Bug Fixes

  • Atomic 404 Evaluation: Fixed a race condition where manual URL entry or initial load could trigger an incorrect 404 state.
    • Path evaluation is now batched and globalized.
    • isNotFound() now waits for the first render pass to complete before reporting a 404, preventing "false negatives" when routes are defined inside conditional blocks.
  • Identity Preservation: Fixed a bug where recovering nodes from cache would overwrite their _componentInstance, breaking reactive links.

v0.2.0

10 Jan 05:11

Choose a tag to compare

CLI round init {name} command outdated version fix.

image

v0.1.9

10 Jan 04:41

Choose a tag to compare

Release Notes - v0.1.9

round-core v0.1.9

Routing and DX improvements focused on 404 handling, scroll behavior, and better integration with the markdown companion package.

New Features

  • Per-route scroll restoration: The router now stores scroll positions per pathname.
    • When you navigate away from a page, its scroll offset is saved.
    • When you come back (via links or browser back/forward), the scroll is restored to where you left it.
    • Different routes no longer "share" or drag scroll position between each other.
  • Faster 404 detection: getIsNotFound() and useIsNotFound() now react immediately to the latest match flag.
    • Eliminates the visible flicker where a large 404 component lagged one frame behind navigation.
    • Custom NotFound UIs feel snappier in large apps.

Vite note: After upgrading to round-core@0.1.9 (and the markdown companion), clear Vite's prebundle cache by deleting node_modules/.vite in your app before restarting the dev server. This avoids stale code from previous versions.

Ecosystem: @round-core/markdown v0.1.1

This release syncs the core with the new markdown companion package and documents how it fits into the RoundJS stack.

  • New package: @round-core/markdown
    • A small, focused markdown renderer built on top of round-core.
    • Uses marked@17 for parsing and shiki for syntax highlighting.
    • Ships rich code blocks with language header, copy button and theming support.
  • Correct inline markdown rendering:
    • Relies on the default marked renderers for headings, paragraphs, lists, blockquotes and links.
    • Avoids [object Object] issues caused by feeding raw token objects into custom renderers.
  • Code block UI:
    • Custom renderer only for fenced code blocks to add a header, language label and an optional copy-to-clipboard button.
    • Highlighting is applied asynchronously so the first paint is fast and the UI stays responsive.
  • Shiki language support:
    • Loads an explicit set of common languages by default: javascript, typescript, jsx, tsx, json, css, html, bash, markdown, yaml, toml, python, rust, go, java, c, cpp, csharp, php, ruby, swift, kotlin, dart, lua, sql, and more.
  • Theming and styling:
    • The <Markdown /> component exposes an options.theme object to control background, text, and accent colors.
    • Colors are applied via CSS variables on the root .round-md container so they can be overridden per-page or globally.
    • Exported defaultMarkdownStyles gives you stable class names for headings, paragraphs, lists, links, inline code and code blocks.

Installation & Usage

Install the markdown package alongside round-core:

npm install round-core @round-core/markdown

or with Bun:

bun add round-core @round-core/markdown

Basic usage in a Round app:

import { Markdown, defaultMarkdownStyles } from '@round-core/markdown';

export default function DocsPage() {
  const content = `# Hello RoundJS\n\nHere is some **markdown** with \\`code\\` and a list:`;

  return (
    <div className={defaultMarkdownStyles.rootClass}>
      <Markdown content={content} />
    </div>
  );
}

You can also enable faster first highlight by preloading Shiki:

<Markdown
  src="./docs/getting-started.md"
  options={{
    preloadHighlighter: true,
    theme: {
      markdownBackground: '#050816',
      markdownText: '#E5E7EB',
      primaryColor: '#38BDF8',
      secondaryColor: '#A855F7'
    }
  }}
/>;

v0.1.8

08 Jan 23:00

Choose a tag to compare

Release Notes - v0.1.8

round-core v0.1.8

Fixes and robustness improvements to the .round transformer, focusing on correct parsing in real-world codebases and restoring fine-grained reactive control-flow rendering.

Bug Fixes

  • Fixed transformer corruption when user code contains JavaScript RegExp literals (e.g. tokenizers/highlighters with /.../ patterns).
  • Prevented < and // inside regex from being misinterpreted as JSX tags / comments, which could break jsxDepth tracking.
  • Fixed a regression where JSX control-flow blocks could become non-reactive due to thunks being invoked immediately instead of being passed as reactive children.
  • Improved correctness of JSX-context detection so control-flow transforms only happen in JSX children context (not inside tag attributes / not in plain JS).

v0.1.7

08 Jan 22:15

Choose a tag to compare

Release Notes - v0.1.7

round-core v0.1.7

Robustness improvements to the .round transformer to prevent false JSX parsing and accidental control-flow transforms in userland JS.

Bug Fixes

  • Fixed transformer corruption when user code contains JavaScript RegExp literals (e.g. tokenizers/highlighters with /.../ patterns).
  • Prevented < and // inside regex from being misinterpreted as JSX tags / comments, which could break jsxDepth tracking.
  • Fixed invalid output edge-cases where control-flow wrappers could generate syntax that confuses downstream transforms.

VS Code Extension v0.1.8

Improved editor experience and accuracy of diagnostics for .round projects.

Improvements

  • LSP Transformer Sync: The language server now mirrors the core transformer's regex-literal handling, preventing false diagnostics in files that contain regex-heavy code.
  • Auto Close JSX Tags: Automatically inserts the matching closing tag when you type > on an opening JSX tag.
    • Only triggers for real JSX opening tags (not </tag>, not <Tag />, not inside strings/comments/regex).
  • Better Tag Pairing: Improved tag auto-closing pairs for JSX-like typing.

v0.1.6

30 Dec 19:57

Choose a tag to compare

Release Notes - v0.1.6

round-core v0.1.6

Significant improvements to the compiler's robustness and control flow handling.

New Features

  • Sequential Control Flow: You can now chain multiple control statements within a single JSX expression block without syntax errors.
    {
        if(show()) { <div>Visible</div> }
        if(!show()) { <div>Hidden</div> }
    }
  • Recursive Parsing: The transformer now uses a recursive walker to accurately handle deeply nested control structures (e.g., if inside for inside switch).

Bug Fixes

  • Fixed "Unexpected token" errors when using multiple if statements in sequence.
  • Improved handling of apostrophes in JSX text within control blocks.

VS Code Extension v0.1.7

Synced with the new recursive compiler logic for accurate diagnostics.

Improvements

  • Recursive Walker: The LSP now mirrors the core compiler's parsing logic, eliminating false positives for "Expected identifier".
  • Robust Sequence Support: Fixed issues where sequential if statements were incorrectly flagged as syntax errors.
  • Accurate Offsets: maintain precise source positions for diagnostics even in complex nested structures.

v0.1.5

25 Dec 22:06

Choose a tag to compare

Release Notes - v0.1.5

round-core v0.1.5

Improved keyed list reconciliation for better performance and state preservation.

New Features

  • Keyed for loops: Use key=expr to enable efficient DOM reconciliation:
    {for(todo in todos()) key=todo.id {
        <TodoItem todo={todo} />
    }}
    • Preserves input focus and cursor position during list reordering
    • Minimizes DOM mutations by reusing existing nodes
  • ForKeyed component: New runtime component for keyed iteration with a "minimal-move" algorithm.

VS Code Extension v0.1.5

Major fixes to hover, diagnostics, and JSX superset parsing.

Bug Fixes

  • catch(e) hover now works correctly: Fixed a bug where hovering over catch showed "Fragment" instead of TypeScript info.
  • FOR loops now transform properly: Fixed a parsing bug where for(item in list) loops would show "Expression expected" errors.
  • Accurate offset mapping: Improved surgical gap preservation for try, catch, for, if, and switch transformations.
  • NaN guard in edits: Added protection against invalid edit ranges that caused offset drift.

Improvements

  • extractCondition now returns start: Fixes offset calculations for all control-flow handlers.
  • Keyed FOR loop support: The LSP now correctly parses key=expr syntax and maps it to ForKeyed.

v0.1.4

25 Dec 17:36

Choose a tag to compare

Release Notes - v0.1.4

round-core v0.1.4

This release focuses on simplifying the core framework and introducing powerful new reactive primitives for asynchronous data.

New Features

  • asyncSignal(fetcher): A new way to handle asynchronous data with built-in reactive states:
    • .pending(): Indicates if the fetch is in progress.
    • .error(): Contains any error that occurred.
    • .refetch(): Manually trigger a re-fetch.
  • Reactive try(signal): JSX try/catch blocks can now be reactive. By passing a signal to try(), the block will automatically re-run and attempt recovery when the signal updates.

Breaking Changes & Improvements

  • Global Error Handling Overhaul:
    • Removed internal global error boundaries and the red "Error in Provider" overlay.
    • The runtime now re-throws errors after logging them to the console, allowing standard JSX try/catch to take precedence.
    • Removed: ErrorBoundary component.
  • Descriptive Console Logs: Runtime errors now provide clear context, including the render phase and the component name where the error occurred.

VS Code Extension v0.1.4

Better developer experience and smarter code assistance.

Improvements

  • Smart Completion Icons: Fixed a bug where all completions appeared as generic text ("abc"). Variables, functions, methods, and keywords now show their correct VS Code icons.
  • Enhanced Syntax Mapping: Precision mapping refined for reactive try/catch blocks, ensuring squiggles and hovers align perfectly.
  • New Snippets:
    • round:try: Quickly scaffold a reactive try/catch block.
    • round:asyncSignal: Scaffold an asynchronous signal.

Bug Fixes

  • Fixed an issue where generic "abc" suggestions were shown instead of typed symbols.
  • Synced the compiler logic with round-core v0.1.4.