{"id":25470,"library":"esdown","title":"esdown","description":"An ES6+ to ES5 compiler and runtime environment, written in ES6. Version 1.2.8 is the current stable release. Allows writing programs using next-generation JavaScript features (classes, modules, etc.) and compiling them to ES5 for legacy environments. Can also be used as a runtime to execute ES6+ modules on Node.js via a REPL or direct module execution. Provides a CLI for translation with bundling and global export options. Key differentiator: includes module loading and bundling, comparable to Babel but more limited in scope and features; largely superseded by Babel and TypeScript.","status":"deprecated","version":"1.2.8","language":"javascript","source_language":"en","source_url":"https://github.com/zenparsing/esdown","tags":["javascript"],"install":[{"cmd":"npm install esdown","lang":"bash","label":"npm"},{"cmd":"yarn add esdown","lang":"bash","label":"yarn"},{"cmd":"pnpm add esdown","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"esdown is primarily used with CommonJS require. No default ES module export exists.","wrong":"import esdown from 'esdown';","symbol":"esdown (default)","correct":"var esdown = require('esdown');"},{"note":"translate is a method on the exported object, not a named export.","wrong":"import { translate } from 'esdown';","symbol":"translate","correct":"var esdown = require('esdown');\nesdown.translate(input, options);"},{"note":"CLI flags must be preceded by hyphens. Use -i for input, -o for output, -b for bundle, -r for runtime.","wrong":"esdown --compile src/main.js build/output.js","symbol":"CLI usage","correct":"esdown -i src/main.js -o build/output.js -b -r"}],"quickstart":{"code":"// Install globally\n// npm install -g esdown\n\n// Create a file main.js with ES6 module syntax\n// main.js:\nimport { add } from './math.js';\nconsole.log(add(2, 3));\n\n// math.js:\nexport function add(a, b) { return a + b; }\n\n// Run directly with esdown runtime:\n// esdown main.js\n\n// Or compile to ES5 bundle:\n// esdown -i main.js -o bundle.js -b -r","lang":"javascript","description":"Demonstrates using esdown as a runtime to execute ES6 modules and as a compiler to produce a bundled ES5 output."},"warnings":[{"fix":"Migrate to Babel (https://babeljs.io) or TypeScript (https://typescriptlang.org).","message":"esdown is effectively deprecated; consider using Babel or TypeScript for ES6+ compilation.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Check the limitations document (docs/limitations.md) for unsupported features.","message":"esdown does not support the full ES6 specification; see documentation for limitations.","severity":"gotcha","affected_versions":"<=1.2.8"},{"fix":"Always test translation output after upgrading.","message":"The API may have changed between versions; no clear changelog provided.","severity":"breaking","affected_versions":"<=1.2.8"}],"env_vars":null,"search_vec":"'1.2.8':14 'allow':20 'also':41 'babel':80,91 'bundl':66,77 'class':29 'cli':62 'compar':78 'compil':6,33 'current':17 'differenti':72 'direct':57 'environ':9,39 'es5':5,36 'es6':3,12,49 'esdown':1 'etc':31 'execut':48,59 'export':69 'featur':28,87 'generat':26 'global':68 'includ':73 'javascript':27,94 'key':71 'larg':88 'legaci':38 'limit':83 'load':75 'modul':30,50,58,74 'next':25 'next-gener':24 'node.js':52 'option':70 'program':22 'provid':60 'releas':19 'repl':55 'runtim':8,46 'scope':85 'stabl':18 'supersed':89 'translat':64 'typescript':93 'use':23,43 'version':13 'via':53 'write':21 'written':10","created_at":"2026-05-01T13:44:55.607244+00:00","updated_at":"2026-05-01T13:44:55.607244+00:00","problems":[{"fix":"Use: var esdown = require('esdown'); esdown.translate(...);","cause":"Incorrect import: trying to import named export 'translate' directly.","error":"esdown.translate is not a function"},{"fix":"Run: npm install esdown (for local) or npm install -g esdown (for global CLI).","cause":"esdown not installed in the current project or globally.","error":"Cannot find module 'esdown'"},{"fix":"Use esdown main.js to run the file, or compile to ES5 first.","cause":"Attempting to run files with import statements directly via node without esdown runtime.","error":"Error: Unexpected token import"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"esdown","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esdown","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}