{"id":26676,"library":"yeoldescript","title":"Ye Olde Script","description":"Ye Olde Script (v2.3.0) is a transpiler and VS Code extension that translates JavaScript/TypeScript/TSX into 17th-century English keywords and syntax. Intended for fun and novelty, it compiles `.yeolde`, `.parchment`, `.scrollx` files into standard JS/TS/TSX, preserving all semantics. Release cadence is irregular; last major update added TypeScript support. Differentiators: full keyword mapping (Incantation→function, useCrystalBall→useState), support for React/Next.js directives (`'this parchment doth run on the client'`), and built-in syntax highlighting in VS Code. Not recommended for production or serious projects.","status":"active","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/ShidoSetsuna/yeoldescript","tags":["javascript","typescript","tsx","react","nextjs","transpiler","compiler","cli"],"install":[{"cmd":"npm install yeoldescript","lang":"bash","label":"npm"},{"cmd":"yarn add yeoldescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add yeoldescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used internally for TypeScript compilation when input includes `.parchment` or `.scrollx` files.","package":"typescript","optional":true}],"imports":[{"note":"Package is ESM-only since v2.0. No default export; use named `compile` function.","wrong":"const yeoldescript = require('yeoldescript')","symbol":"yeoldescript","correct":"import { compile } from 'yeoldescript'"},{"note":"Named export, not default.","wrong":"import compile from 'yeoldescript'","symbol":"compile","correct":"import { compile } from 'yeoldescript'"},{"note":"Also a named export. Use `run` to compile and execute in one step.","wrong":"import { run } from 'yeoldescript'","symbol":"run","correct":"import { run } from 'yeoldescript'"}],"quickstart":{"code":"import { compile } from 'yeoldescript';\nconst code = `Decree greeting = \"Huzzah!\"; TownCrier.bellow(greeting);`;\nconst out = compile(code, { sourceType: 'script' });\nconsole.log(out); // \"const greeting = \\\"Huzzah!\\\"; console.log(greeting);\"","lang":"typescript","description":"Compiles Ye Olde Script code to modern JavaScript using the `compile` function."},"warnings":[{"fix":"Use import syntax or downgrade to v1.x if CommonJS required.","message":"v2.0 changed to ESM-only. require() will throw.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Use `import { compile } from 'yeoldescript'` instead of `import yeo from 'yeoldescript'`.","message":"Default import deprecated in v2.0; use named imports.","severity":"deprecated","affected_versions":">=2.0"},{"fix":"Update VS Code to v1.60.0 or later.","message":"VS Code extension requires VS Code >=1.60.0.","severity":"gotcha","affected_versions":"*"},{"fix":"Match extension to intended output language.","message":"File extension .yeolde compiles to .js, .parchment to .ts, .scrollx/.illuminated to .tsx. Misusing extensions may produce incorrect output type.","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade Node.js to v18 or later.","message":"Node.js >=18 required due to use of modern JavaScript features.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add \"type\": \"module\" to package.json, or use dynamic import().","cause":"Package is ESM-only since v2.0, but project is configured for CommonJS.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Use correct extension: `.yeolde` not `.yeold`.","cause":"Misspelled file extension; valid extensions are .yeolde, .ye, .parchment, .scrollx, .illuminated.","error":"Error: Unknown file extension .yeold"},{"fix":"Use `import { compile } from 'yeoldescript'` instead of `import yeo from 'yeoldescript'`.","cause":"Default import was used but v2.0 removed default export.","error":"TypeError: yeoldescript is not a function"},{"fix":"Update VS Code to v1.60.0 or later.","cause":"Installing VS Code extension on an older version.","error":"Error: Requires VS Code ^1.60.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}