• v.0.3.0-alpha 94a58d826f

    v.0.3.0-alpha Pre-release

    Ghost released this 2026-01-02 20:53:57 +01:00 | 581 commits to main since this release

    Architecture Refactor

    The project has been restructured to improve scalability, maintainability, and developer experience.

    Key Changes

    Major Restructuring

    • The project structure has been completely reorganized. All code modules are now located in a centralized packages/ directory.
      • packages/parser: Core parsing logic (formerly gram-parser).
      • packages/compiler: Compiler and graph logic (formerly gram-compiler).
      • packages/playground: The web-based IDE.
      • packages/vscode-extension: Visual Studio Code language support.
    • Workspace Management: The root package.json now acts as a workspace manager, allowing installation of all dependencies with a single npm install command.
    • Centralized Config: Introduced a shared tsconfig.base.json to ensure consistent TypeScript configuration across all packages.

    Separation of Parser & Compiler

    • Decoupled Architecture: The Compiler logic has been extracted from the Parser.
      • Parser (packages/parser): Strictly responsible for grammar definition (OhmJS) and generating the raw AST.
      • Compiler (packages/compiler): Responsible for semantic analysis, graph generation, and transforming the AST into usable artifacts (Shopping Lists, Instructions...).

    This separation allows tools (like linters or syntax highlighters) to use the lightweight parser without pulling in the heavy compiler logic.

    Developer Experience

    • Global Scripts: Added unified commands at the project root for easier workflow:
      • npm run build: Builds the core (parser & compiler).
      • npm run dev: Launches the Playground instantly.
    • Clean Output: Build scripts now feature friendly emojis and concise logging 🏗️ .
    • Examples Library: Created a dedicated examples/ folder at the project root.
      • These examples are automatically synced with the Playground during build.
      • The Playground now dynamically lists these examples in its dropdown menu.

    Fixes & Polish

    • Separated Parser and Compiler logic into distinct, clean packages with proper dependencies.
    • Updated README.md and CONTRIBUTING.md to reflect the new architecture.

    Changes Breakdown

    • Moved gram-parserpackages/parser
    • Moved gram-compilerpackages/compiler
    • Moved playgroundpackages/playground
    • Moved gram-vscode-extensionpackages/vscode-extension
    • Added tsconfig.base.json
    • Refactored root package.json scripts.

    How to test this release

    1. Clone the repo (or pull changes).
    2. Run npm install at the root.
    3. Run npm run build.
    4. Run npm run dev.
    5. Open http://localhost:3000 and try the playground.
    Downloads