{"id":26678,"library":"yox-expression-compiler","title":"Yox Expression Compiler","description":"An expression compiler for Yox.js, version 0.18.0. It compiles template expressions into executable code for reactive rendering. Part of the Yox.js ecosystem, this package is designed to work with yox-common and is maintained as part of the broader Yox framework. It offers a lightweight, performant alternative to larger template compilers by focusing specifically on expression compilation.","status":"active","version":"0.18.0","language":"javascript","source_language":"en","source_url":"https://github.com/yoxjs/yox-expression-compiler","tags":["javascript"],"install":[{"cmd":"npm install yox-expression-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add yox-expression-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add yox-expression-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for shared utilities and runtime features.","package":"yox-common","optional":false}],"imports":[{"note":"Package is ESM-only since v0.18.0; CommonJS require is not supported.","wrong":"const compileExpression = require('yox-expression-compiler');","symbol":"compileExpression","correct":"import { compileExpression } from 'yox-expression-compiler'"},{"note":"Expression is a TypeScript type, not a runtime value. Use type import.","wrong":"import { Expression } from 'yox-expression-compiler'","symbol":"Expression","correct":"import type { Expression } from 'yox-expression-compiler'"},{"note":"This is a named export, not a default export.","wrong":"import createExpression from 'yox-expression-compiler'","symbol":"createExpression","correct":"import { createExpression } from 'yox-expression-compiler'"}],"quickstart":{"code":"import { compileExpression } from 'yox-expression-compiler';\n\nconst expr = \"a + b\";\nconst compiled = compileExpression(expr);\nconsole.log(compiled); // { code: 'var _f = function(a,b) { return a + b; };', ... }","lang":"typescript","description":"Demonstrates basic usage of compileExpression to compile a simple arithmetic expression."},"warnings":[{"fix":"Use named imports like `import { compileExpression } from 'yox-expression-compiler'` instead of default import.","message":"Removed default export in version 0.18.0; all exports are now named.","severity":"breaking","affected_versions":">=0.18.0"},{"fix":"Ensure yox-common version 0.20.0 or compatible is installed in your project.","message":"yox-common peer dependency updated to ^0.20.0; incompatible with older versions.","severity":"breaking","affected_versions":">=0.18.0"},{"fix":"If using JavaScript, avoid importing type-only symbols.","message":"Expression types are only available in TypeScript projects; plain JavaScript users cannot import them.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure yox-common is installed and correct version: npm install yox-common@^0.20.0","cause":"Missing or mismatched peer dependency or incorrect import path.","error":"Cannot find module 'yox-expression-compiler' or its corresponding type declarations."},{"fix":"Upgrade to version 0.18.0 and use named import as documented.","cause":"Using a version prior to 0.18.0 where the function may have different name or not exported.","error":"Attempted import error: 'compileExpression' is not exported from 'yox-expression-compiler'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}