{"id":25916,"library":"mahalo-transpiler","title":"Mahalo Transpiler","description":"A TypeScript-based transpiler for Mahalo applications (v0.6.1). Provides module transpilation with source map generation. Primarily used in development workflows for compiling Mahalo-specific syntax. Alternative to custom build tooling for Mahalo projects. Low release cadence (last update >2 years ago). Requires TypeScript and Node.js.","status":"maintenance","version":"0.6.1","language":"javascript","source_language":"en","source_url":"https://github.com/mahalo/mahalo-transpiler","tags":["javascript","mahalo","typescript"],"install":[{"cmd":"npm install mahalo-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add mahalo-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add mahalo-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require may not work without bundler.","wrong":"const mahaloTranspiler = require('mahalo-transpiler')","symbol":"default","correct":"import mahaloTranspiler from 'mahalo-transpiler'"},{"note":"The ReadMe uses namespace import; default import may also work depending on TypeScript version.","wrong":"import mahaloTranspiler from 'mahalo-transpiler'","symbol":"namespace import","correct":"import * as mahaloTranspiler from 'mahalo-transpiler'"},{"note":"Named export transpile available since v0.5.","wrong":"const transpile = require('mahalo-transpiler').transpile","symbol":"function transpile","correct":"import { transpile } from 'mahalo-transpiler'"}],"quickstart":{"code":"import * as mahaloTranspiler from 'mahalo-transpiler';\n\nconst result: { text: string; map: string } = mahaloTranspiler('./module-name');\nconsole.log(result.text);","lang":"typescript","description":"Transpile a Mahalo module and log the output text."},"warnings":[{"fix":"Use ES module import syntax or upgrade to a bundler that can handle ESM.","message":"Package no longer supports CommonJS require() starting from v0.6.0.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Update code to access result.text and result.map.","message":"The function signature changed in v0.5.0: now returns an object with 'text' and 'map' fields instead of a string.","severity":"deprecated","affected_versions":"<0.5.0"},{"fix":"Run npm install --save-dev @types/mahalo-transpiler.","message":"TypeScript declaration files not bundled; may need to install @types/mahalo-transpiler separately.","severity":"gotcha","affected_versions":">=0.6.0"},{"fix":"Use relative paths or path.resolve with process.cwd().","message":"Transpiler expects input file paths relative to current working directory; absolute paths may fail.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev mahalo-transpiler.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'mahalo-transpiler'"},{"fix":"Use import * as mahaloTranspiler from 'mahalo-transpiler'.","cause":"Using default import instead of namespace import (see ReadMe).","error":"TypeError: mahaloTranspiler is not a function"},{"fix":"Switch to import syntax or configure bundler to handle ESM.","cause":"Using require() on an ESM-only package.","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}