{"id":26130,"library":"puppy-transpiler","title":"Puppy Transpiler","description":"Puppy Transpiler is a lightweight JavaScript/TypeScript transpiler that translates modern ES2020+ code to ES2015 for broader browser compatibility. Version 1.0.5 is the latest stable release, with monthly updates. It differentiates by supporting inline TypeScript without configuration and producing minimal output. Ships TypeScript types.","status":"active","version":"1.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/playpuppy/transpiler","tags":["javascript","Puppy","Transpiler","typescript"],"install":[{"cmd":"npm install puppy-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add puppy-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add puppy-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; CommonJS require() will return an empty object.","wrong":"const transpile = require('puppy-transpiler')","symbol":"transpile","correct":"import { transpile } from 'puppy-transpiler'"},{"note":"Default export is the transpiler function itself.","wrong":"const { transpile } = require('puppy-transpiler')","symbol":"default","correct":"import transpile from 'puppy-transpiler'"},{"note":"Type is exported from the main entry, not a subpath.","wrong":"import { TranspileOptions } from 'puppy-transpiler/types'","symbol":"TranspileOptions","correct":"import { TranspileOptions } from 'puppy-transpiler'"}],"quickstart":{"code":"import { transpile } from 'puppy-transpiler';\n\nconst es2020 = `const add = (a, b) => a + b;`;\nconst result = transpile(es2020, { target: 'es2015' });\nconsole.log(result.code);\n// Output: var add = function(a, b) { return a + b; };","lang":"typescript","description":"Transpiles an ES2020 arrow function to ES2015 using puppy-transpiler."},"warnings":[{"fix":"Explicitly set 'target' option if you need a different target.","message":"Version 1.0.0 changed default target from 'es2016' to 'es2015'.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use a bundler or another transpiler for dynamic imports.","message":"Transpiler cannot handle dynamic imports; will throw a syntax error.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Replace 'module: 'cjs'' with 'target: 'es2015''.","message":"Option 'module' is deprecated; use 'target' to control module output.","severity":"deprecated","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 puppy-transpiler' and ensure import is from 'puppy-transpiler'.","cause":"Package not installed or wrong import path.","error":"Error: Cannot find module 'puppy-transpiler'"},{"fix":"Use 'import transpile from 'puppy-transpiler'' or 'import { transpile } from 'puppy-transpiler''.","cause":"Using default import incorrectly or wrong import style.","error":"TypeError: transpile is not a function"},{"fix":"Set 'target' to 'es2015' or higher to allow export statements.","cause":"Input contains ES modules syntax but target is set to a version that doesn't support it.","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}