Registry / serialization / yeoldescript

yeoldescript

JSON →
library2.3.0jsnpmunverified

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.

npm install yeoldescript
INSTALL
IMPORT
SIG · YEOLDESCRIPT
Y
yeoldescript
serializationjavascriptv2.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

yeoldescript
import { compile } from 'yeoldescript'
const yeoldescript = require('yeoldescript')
Package is ESM-only since v2.0. No default export; use named `compile` function.
compile
import { compile } from 'yeoldescript'
import compile from 'yeoldescript'
Named export, not default.
run
import { run } from 'yeoldescript'
import { run } from 'yeoldescript'
Also a named export. Use `run` to compile and execute in one step.

Compiles Ye Olde Script code to modern JavaScript using the `compile` function.

import { compile } from 'yeoldescript'; const code = `Decree greeting = "Huzzah!"; TownCrier.bellow(greeting);`; const out = compile(code, { sourceType: 'script' }); console.log(out); // "const greeting = \"Huzzah!\"; console.log(greeting);"
yeolde --version
Debug
Known issues
breakingv2.0 changed to ESM-only. require() will throw.
fix
Use import syntax or downgrade to v1.x if CommonJS required.
affects: >=2.0
deprecatedDefault import deprecated in v2.0; use named imports.
fix
Use `import { compile } from 'yeoldescript'` instead of `import yeo from 'yeoldescript'`.
affects: >=2.0
gotchaVS Code extension requires VS Code >=1.60.0.
fix
Update VS Code to v1.60.0 or later.
affects: *
gotchaFile extension .yeolde compiles to .js, .parchment to .ts, .scrollx/.illuminated to .tsx. Misusing extensions may produce incorrect output type.
fix
Match extension to intended output language.
affects: *
gotchaNode.js >=18 required due to use of modern JavaScript features.
fix
Upgrade Node.js to v18 or later.
affects: *
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Package is ESM-only since v2.0, but project is configured for CommonJS.
fix
Add "type": "module" to package.json, or use dynamic import().
Error: Unknown file extension .yeold
Misspelled file extension; valid extensions are .yeolde, .ye, .parchment, .scrollx, .illuminated.
fix
Use correct extension: `.yeolde` not `.yeold`.
TypeError: yeoldescript is not a function
Default import was used but v2.0 removed default export.
fix
Use `import { compile } from 'yeoldescript'` instead of `import yeo from 'yeoldescript'`.
Error: Requires VS Code ^1.60.0
Installing VS Code extension on an older version.
fix
Update VS Code to v1.60.0 or later.
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
typescriptoptionalUsed internally for TypeScript compilation when input includes `.parchment` or `.scrollx` files.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
yeoldescript — npm install yeoldescript · libregistry