Jac-Client Release Notes#
This document provides a summary of new features, improvements, and bug fixes in each version of Jac-Client. For details on changes that might require updates to your existing code, please refer to the Breaking Changes page.
jac-client 0.2.13 (Unreleased)#
jac-client 0.2.12 (Latest Release)#
- Configurable API Base URL: Added
[plugins.client.api]config section withbase_urloption. By default (empty), API calls use same-origin relative URLs. Setbase_url = "http://localhost:8000"for cross-origin setups. - Improved client bundling error handling and reliability: Captures Vite/Bun output and displays concise, formatted errors after the API endpoint list; fixed the Bun install invocation to improve build reliability.
- Auto-Prompt for Missing Client Dependencies: When running
jac starton a project without npm dependencies configured (nojac.tomlor empty[dependencies.npm]), the CLI now detects the missing dependencies and interactively prompts the user to install the default jac-client packages (react, vite, etc.). Accepting writes the defaults tojac.tomland proceeds with the build. This follows the same pattern as the existing Bun auto-install prompt and eliminates the cryptic "Cannot find package 'vite'" error that previously occurred. Additionally, stalenode_modulesdirectories from prior failed installs are now automatically detected and cleaned up before reinstalling.
jac-client 0.2.11#
-
Bun Runtime Migration: Replaced npm/npx with Bun for package management and JavaScript bundling. Bun provides significantly faster dependency installation and build times. When Bun is not installed, the CLI prompts users to install it automatically via the official installer script.
-
Reactive Effects with
can with entry/exit: Similar to howhasvariables automatically generateuseState, thecan with entryandcan with exitsyntax now automatically generates ReactuseEffecthooks. Useasync can with entry { }for mount effects (async bodies are automatically wrapped in IIFE),can with exit { }for cleanup on unmount, andcan with [dep] entry { }orcan with (dep1, dep2) entry { }for effects with dependency arrays. This provides a cleaner, more declarative syntax for React lifecycle management without manualuseEffectboilerplate. - Source Mapping for Vite Errors: Added source mapping to trace Vite build errors back to original
.jacfiles. Compiled JavaScript files now include source file header comments, and a customjacSourceMapperVite plugin maps error locations to the original Jac source. Source maps are enabled by default for both development and production builds, improving the debugging experience when build errors occur. @jac/runtimeCanonical Import Path: Migrated the client runtime import path from@jac-client/utilsto@jac/runtime, aligning with the new@jac/scoped package syntax in Jac source code. The jac-client Vite plugin now maps@jac/runtimeto its own compiled runtime via a resolve alias. Compiled modules include ES moduleexportstatements so Vite can resolve named imports between modules. All examples, docs, and templates have been updated.- Various Refactors: Including supporting new useEffect primitives, example updates, etc
jac-client 0.2.10#
jac-client 0.2.9#
- Generic Config File Generation from jac.toml: Added support for generating JavaScript config files (e.g.,
postcss.config.js,tailwind.config.js) directly fromjac.tomlconfiguration. Define configs under[plugins.client.configs.<name>]and they are automatically converted to<name>.config.jsfiles in.jac/client/configs/. This eliminates the need for standalone JavaScript config files in the project root for tools like PostCSS, Tailwind (v3), ESLint, and other npm packages that use the*.config.jsconvention. - Error Handling with JacClientErrorBoundary: Introduced error boundary handling in Jac Client apps. The new
JacClientErrorBoundarycomponent allows you to wrap specific parts of your component tree to catch and display errors gracefully, without affecting the entire application.
jac-client 0.2.8#
- Vite Dev Server Integration for HMR: Added support for Hot Module Replacement during development. When using
jac start --dev, the Vite dev server runs alongside the Jac API server with automatic proxy configuration for/walker,/function,/user, and/introspectroutes. This enables instant frontend updates without full page reloads while maintaining seamless backend communication.
jac-client 0.2.7#
- Reactive State Variables: The
jac create --use clienttemplate now uses the newhaskeyword for React state management. Instead of[count, setCount] = useState(0);, you can writehas count: int = 0;and use direct assignmentcount = count + 1;. The compiler automatically generates theuseStatedestructuring and transforms assignments to setter calls, providing cleaner and more intuitive state management syntax. -
Simplified Project Structure: Reorganized the default project structure created by
jac create --use client. The entry point is nowmain.jacat the project root instead ofsrc/app.jac, and thecomponents/directory is now at the project root instead ofsrc/components/. This flatter structure reduces nesting and aligns with modern frontend project conventions. Existing projects using thesrc/structure continue to work but new projects use the simplified layout. -
Configurable Client Route Prefix: Changed the default URL path for client-side apps from
/page/<app>to/cl/<app>. The route prefix is now configurable viacl_route_prefixin the[serve]section ofjac.toml. This allows customizing the URL structure for client apps (e.g.,/pages/MyAppinstead of/cl/MyApp). Documentation -
Base Route App Configuration: Added
base_route_appoption injac.toml[serve]section to serve a client app directly at the root/path. When configured, visiting/renders the specified client app instead of the API info page, making it easy to create single-page applications with clean URLs. Projects created withjac create --use clientnow default tobase_route_app = "app", so the app is served at/out of the box. Documentation
jac-client 0.2.4#
-
jac-client-nodeand@jac-client/dev-depsnpm packages: Introduced the new npm libraries to centralize and abstract default dependencies for Jac client applications. These two package includes React, Vite, Babel, TypeScript, and other essential dependencies. -
Explicit Export Requirement: Functions and variables must now be explicitly exported using the
:pubmodifier to be available for import. In previous versions (< 0.2.4), alldeffunctions were automatically exported and variables (globals) could not be exported. Starting with 0.2.4, functions and variables are private by default and must be marked with:pubto be importable. This provides better control over module APIs and prevents accidental exports. Theapp()function in your entry file must be exported asdef:pub app(). [Breaking Change - See Migration Guide] -
Authentication API Update: Updated authentication functions (
jacLoginandjacSignup) to useemailinstead ofusernamefor user identification. This change aligns with standard authentication practices and improves security. All authentication examples and documentation have been updated to reflect this change. The/user/registerand/user/loginendpoints now acceptemailin the request payload. End-to-end tests have been added to verify authentication endpoint functionality. [Breaking Change - See Migration Guide] -
Centralized Configuration Management: Introduced a unified configuration system through
config.jsonthat serves as the single source of truth for all project settings. The system automatically createsconfig.jsonwhen you runjac create_jac_app, eliminating the need for manual setup. All build configurations (Vite plugins, build options, server settings) and package dependencies are managed through this centralized file. The system automatically generatesvite.config.jsandpackage.jsonin.jac-client.configs/directory, keeping the project root clean while preserving all essential defaults. Documentation -
Package Management Through config.json: Implemented configuration-first package management where all npm dependencies are managed through
config.jsoninstead ofpackage.json. Usejac add --npm <package>to add packages andjac remove --npm <package>to remove them. Runningjac add --npmwithout a package name installs all packages listed inconfig.json. The system automatically regeneratespackage.jsonfromconfig.jsonand runs npm install, ensuring consistency between configuration and installed packages. Supports both regular and scoped packages with version specification. Documentation -
CLI Command for Config Generation: Added
jac generate_client_configcommand for legacy projects (pre-0.2.4) to create a defaultconfig.jsonfile with the proper structure. For new projects,config.jsonis automatically created withjac create_jac_app. The command prevents accidental overwrites of existing config files. -
Centralized Babel Configuration: Moved Babel configuration from separate
.babelrcfiles intopackage.json, centralizing project configuration and reducing file clutter in the project root. -
TypeScript Support (Enabled by Default): TypeScript is now automatically supported in all Jac projects by default. No configuration or prompts needed - TypeScript dependencies are automatically included in
package.jsonduring build time, andtsconfig.jsonis automatically generated during the first build. TypeScript files (.ts,.tsx) are automatically processed by Vite bundling, enabling seamless integration of TypeScript/TSX components alongside Jac code. Thecomponents/directory with a sampleButton.tsxcomponent is created automatically during project setup. Documentation
jac-client 0.2.3#
-
Nested Folder Structure Preservation: Implemented folder structure preservation during compilation, similar to TypeScript transpilation. Files in nested directories now maintain their relative paths in the compiled output, enabling proper relative imports across multiple directory levels and preventing file name conflicts. This allows developers to organize code in nested folders just like in modern JavaScript/TypeScript projects.
-
File System Organization Documentation: Added comprehensive documentation for organizing Jac client projects, including guides for the
app.jacentry point requirement, backend/frontend code separation patterns, and nested folder import syntax. Documentation
jac-client 0.2.1#
-
CSS File Support: Added full support for CSS in separate files, enabling cleaner styling structure. Expanded styling options with documented approaches for flexible UI customization. Documentation
-
Static Asset Serving: Introduced static asset serving, allowing images, fonts, and other files to be hosted easily. Updated documentation with step-by-step guides for implementation. Documentation
-
Architecture Documentation: Added comprehensive architecture documentation explaining jac-client's internal design and structure. View Architecture
-
.cl File Support: Added support for
.clfiles to separate client code from Jac code. Files with the.cl.jacextension can now be used to define client-side logic, improving organization and maintainability of Jac projects.
jac-client 0.2.0#
- Constructor Calls Supported: Constructor calls properly supported by automatically generating
newkeyword.
jac-client 0.1.0#
- Client Bundler Plugin Support: Extended the existing
pluggy-based plugin architecture to support custom client bundling implementations. Two static methods were added toJacMachineInterfaceto enable client bundler plugins: get_client_bundle_builder(): Returns the client bundle builder instance, allowing plugins to provide custom bundler implementations-
build_client_bundle(): Builds client bundles for modules, can be overridden by plugins to use custom bundling strategies -
ViteBundlerPlugin (jac-client): Official Vite-based bundler plugin providing production-ready JavaScript bundling with HMR, tree shaking, code splitting, TypeScript support, and asset optimization. Implements the
build_client_bundle()hook to replace default bundling with Vite's optimized build system. Installjac-clientlibrary from the source and use it for automatic Vite-powered client bundle generation. -
Import System Fix: Fixed relative imports in client bundles, added support for third-party npm modules, and implemented validation for pure JavaScript file imports.
-
PYPI Package Release: First stable release (v0.1.0) now available on PyPI. Install via
pip install jac-clientto get started with Vite-powered client bundling for your Jac projects.