Bearr
raw JSON → 2.0.0 verified Fri May 01 auth: no javascript
Bearr (v2.0.0) is a transpiler that converts a custom Indonesian-based language (Bear language) into JavaScript, along with a CLI for compilation. It targets Indonesian-speaking developers who want to write code in Bahasa Indonesia. The transpiler outputs standard JS, enabling use in any JS environment. Differentiators include full Indonesian syntax support and CLI-first design. No release cadence is known; this is a niche tool with limited ecosystem adoption.
Common errors
error ERR_MODULE_NOT_FOUND: require() of ES Module ↓
cause Using CommonJS require() to load ESM-only package in version 2+.
fix
Switch to import syntax or use dynamic import().
error SyntaxError: Unexpected identifier 'cetak' ↓
cause Compiled JavaScript is run but bearr compile is not used.
fix
Use compile() to transpile Bear code before execution.
Warnings
breaking Version 2.0.0 removed CommonJS support; requires ESM environments. ↓
fix Use ES module imports (import/export) instead of require.
gotcha Bear language syntax is not stable; may change between minor versions. ↓
fix Check changelog before upgrading; lock version in production.
gotcha No TypeScript types included; use with TypeScript may require custom declarations. ↓
fix Create a .d.ts file or use // @ts-ignore.
Install
npm install bearr yarn add bearr pnpm add bearr Imports
- bearr wrong
const bearr = require('bearr')correctimport bearr from 'bearr' - compile wrong
import compile from 'bearr/compile'correctimport { compile } from 'bearr' - run wrong
const run = require('bearr').runcorrectimport { run } from 'bearr'
Quickstart
import { compile } from 'bearr';
import { promises as fs } from 'fs';
async function main() {
const bearCode = `cetak("Halo Dunia")`; // Indonesian code
const jsCode = compile(bearCode);
await fs.writeFile('output.js', jsCode);
}
main().catch(console.error);