{"id":25723,"library":"hedgehog-transpiler","title":"Hedgehog Transpiler","description":"Hedgehog-transpiler is a JavaScript transpiler (version 1.0.1) that converts modern JavaScript/JSX into backward-compatible code for older environments. It is designed as a fast, minimal alternative to Babel, with a focus on simplicity and zero configuration. The package is early-stage with no breaking changes reported yet. Key differentiators include a small footprint and easy setup, though it lacks the plugin ecosystem and browser support of Babel.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/lidangzzz/hedgehog-transpiler","tags":["javascript"],"install":[{"cmd":"npm install hedgehog-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add hedgehog-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add hedgehog-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is ESM-only. CommonJS require is not supported.","wrong":"const { transform } = require('hedgehog-transpiler')","symbol":"transform","correct":"import { transform } from 'hedgehog-transpiler'"},{"note":"Synchronous version of transform, useful for scripts.","wrong":"","symbol":"transformSync","correct":"import { transformSync } from 'hedgehog-transpiler'"},{"note":"Default export is the transform function itself.","wrong":"import { default as hedgehog } from 'hedgehog-transpiler'","symbol":"default","correct":"import hedgehog from 'hedgehog-transpiler'"}],"quickstart":{"code":"import { transform } from 'hedgehog-transpiler';\n\nconst code = `const greet = (name) => {\n  return \\`Hello, \\${name}!\\`;\n};\nconsole.log(greet('World'));`;\n\nconst result = transform(code, { target: 'es5' });\nconsole.log(result.code);\n// Output: var greet = function(name) { return 'Hello, ' + name + '!'; }; console.log(greet('World'));","lang":"typescript","description":"Transpiles an arrow function with template literals to ES5 compatible code."},"warnings":[{"fix":"Use import syntax instead of require. If using Node.js, ensure type: 'module' in package.json or use .mjs extension.","message":"Version 1.0.0 introduced ESM-only exports. CommonJS require() will throw an error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Import the transform function directly: import hedgehog from 'hedgehog-transpiler' instead of import { transform } from 'hedgehog-transpiler'.","message":"The default export is the transform function, not a bundled object. This differs from many other transpiler libraries.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need advanced features (e.g., decorators, TypeScript), consider using Babel instead.","message":"The package does not include any built-in presets or plugins. It only supports basic JSX and modern syntax transformations.","severity":"gotcha","affected_versions":">=1.0.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 hedgehog-transpiler and ensure your import uses the correct path: import { transform } from 'hedgehog-transpiler'.","cause":"The package is not installed or the import path is incorrect.","error":"Cannot find module 'hedgehog-transpiler'"},{"fix":"Use import hedgehog from 'hedgehog-transpiler' or import { transform } from 'hedgehog-transpiler' if you want the named export.","cause":"Using named import instead of default import incorrectly.","error":"transform is not a function"},{"fix":"Switch to ESM by adding 'type': 'module' to package.json or use .mjs file extension.","cause":"Running in an environment that doesn't support ESM (e.g., Node.js without type: 'module' or using .cjs extension).","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}