Registry / web-framework / jsy-transpile

jsy-transpile

JSON →
library0.10.9jsnpmunverified

JSY is an offside-rule (indentation-based) syntax dialect for ECMAScript that transpiles to standard JavaScript via a scanner-pass transformation, without Babel, Acorn, or any runtime dependencies. Current stable version 0.10.9. It supports modern JavaScript up to ES2025, has zero dependencies, 6300+ unit tests, and works with Rollup, ESBuild, Parcel, Vite, and Node.js --loader. Unlike CoffeeScript or Python-inspired alternatives, JSY automatically keeps pace with new ECMAScript features because its transformation only handles indentation and comments, leaving the underlying JavaScript syntax untouched. The package was renamed from jsy-transpile to @jsy-lang/jsy.

npm install jsy-transpile
INSTALL
IMPORT
SIG · JSY-TRANSPILE
J
jsy-transpile
web-frameworkjavascriptv0.10.9
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.

default (transpile)
import jsy from '@jsy-lang/jsy'
import { transpile } from '@jsy-lang/jsy'
Default export is the transpile function. Named export 'transpile' does not exist.
transpile
import jsy from '@jsy-lang/jsy'; const result = jsy(code, options);
const jsy = require('jsy-transpile');
Package renamed from jsy-transpile to @jsy-lang/jsy starting from v0.10.0. Use the scoped package.
transpile (CommonJS)
const jsy = require('@jsy-lang/jsy');
const jsy = require('jsy-transpile');
If using CommonJS, require the new scoped package. The old package jsy-transpile is deprecated.

Transpiles a simple JSY function with indentation-based syntax into standard JavaScript.

import jsy from '@jsy-lang/jsy'; const jsyCode = ` add = (a, b) -> a + b console.log add(1, 2) `; const jsCode = jsy(jsyCode, { module: true, sourceType: 'module', }); console.log(jsCode); // Output: // const add = (a, b) => { // return a + b // } // console.log(add(1, 2))
jsy --version
Debug
Known issues
breakingPackage renamed from jsy-transpile to @jsy-lang/jsy. All imports using the old package name will break.
fix
Replace 'jsy-transpile' with '@jsy-lang/jsy' in package.json and all imports.
affects: >=0.10.0
deprecatedThe old package 'jsy-transpile' on npm is no longer maintained. Use '@jsy-lang/jsy' instead.
fix
Run 'npm install @jsy-lang/jsy' and update imports.
affects: <0.10.0
gotchaThe default export is the transpile function, not an object. Do not destructure { transpile }.
fix
Use 'import jsy from "@jsy-lang/jsy"' and call jsy(source, options).
affects: >=0.5.0
gotchaJSY transformation is syntactical only; it does not transform JavaScript semantics. Some constructs (e.g., async/await inside indented blocks) require correct indentation to work.
fix
Ensure indentation is consistent (tabs or spaces, not mixed). Use 2 or 4 spaces per level.
affects: all
breakingOptions for transpile function have changed between pre-0.10 and 0.10+. The 'module' option now defaults to false.
fix
Explicitly set 'module: true' if you want ES module output.
affects: >=0.10.0
Errors
Common errors & fixes
Error: Cannot find module 'jsy-transpile'
Package renamed from jsy-transpile to @jsy-lang/jsy.
fix
Install @jsy-lang/jsy and update imports: 'npm install @jsy-lang/jsy' then 'import jsy from "@jsy-lang/jsy"'.
TypeError: jsy(...) is not a function
Attempting to use a named import { transpile } instead of default import.
fix
Use default import: 'import jsy from "@jsy-lang/jsy"'.
Parsing error: Unexpected token (1:1) after transpiling
Incorrectly structured JSY code, e.g., missing indentation or wrong syntax.
fix
Verify that all blocks are properly indented. JSY uses indentation to denote blocks. Use spaces consistently.
ReferenceError: module is not defined
Using CommonJS require in an ES module context.
fix
Use ES imports instead: 'import jsy from "@jsy-lang/jsy"'.
Upgrade
Version history
0.10.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
jsy-transpile — npm install jsy-transpile · libregistry