{"id":25548,"library":"esprima-six-jpike","title":"Esprima (harmony fork)","description":"Esprima (version 1.1.1-dev-harmony) is a high-performance, standard-compliant ECMAScript parser written in JavaScript. It supports full ES5.1 and experimental ES6/Harmony features (modules, classes, destructuring). Runs in browsers (IE6+) and Node.js (>=0.4.0). Known for being up to 3x faster than UglifyJS v1. This is an unofficial fork with the '-harmony' suffix, indicating pre-release support for ES6. Note: this package may be considered obsolete compared to mainline esprima releases.","status":"deprecated","version":"1.1.1-dev-harmony","language":"javascript","source_language":"en","source_url":"http://github.com/ariya/esprima","tags":["javascript"],"install":[{"cmd":"npm install esprima-six-jpike","lang":"bash","label":"npm"},{"cmd":"yarn add esprima-six-jpike","lang":"bash","label":"yarn"},{"cmd":"pnpm add esprima-six-jpike","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-style import works in supported Node versions; CommonJS require is also possible but the package uses global scope.","wrong":"const parse = require('esprima-six-jpike').parse","symbol":"parse","correct":"import { parse } from 'esprima-six-jpike'"},{"note":"tokenize is available as a named export from the main module.","wrong":"import tokenize from 'esprima-six-jpike/tokenize'","symbol":"tokenize","correct":"import { tokenize } from 'esprima-six-jpike'"},{"note":"Syntax is a named export containing node type constants. ESM is preferred in modern Node.","wrong":"const Syntax = require('esprima-six-jpike').Syntax","symbol":"Syntax (type object)","correct":"import { Syntax } from 'esprima-six-jpike'"}],"quickstart":{"code":"import { parse, tokenize } from 'esprima-six-jpike';\n\nconst code = 'const answer = 42;';\n\n// Parse to AST (supports ES5.1, experimental harmony)\nconst ast = parse(code, { tolerant: true, loc: true });\nconsole.log(JSON.stringify(ast, null, 2));\n\n// Tokenize\nconst tokens = tokenize(code, { range: true });\nconsole.log(tokens);\n\n// Example with harmony syntax\nconst harmonyCode = 'class Person { constructor(name) { this.name = name; } }';\nconst harmonyAst = parse(harmonyCode, { jsx: false, type: 'module' });\nconsole.log(harmonyAst);","lang":"typescript","description":"Shows parsing and tokenizing JavaScript code, including experimental ES6/Harmony syntax using the fork."},"warnings":[{"fix":"Switch to 'esprima' latest stable version (e.g., 4.0.1).","message":"This package is an unofficial fork (esprima-six-jpike) and may not be maintained. Use official 'esprima' package instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"For production ES6 parsing, use a dedicated ES6 parser like 'acorn' with the 'ecmaVersion' option.","message":"The '-harmony' suffix indicates pre-release ES6 support; features may be incomplete or unstable.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a recent Node LTS version (e.g., 14.x or later) and test thoroughly, or migrate to a maintained parser.","message":"Node engine requirement '>=0.4.0' is extremely old; newer Node versions may have compatibility issues or missing globals.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'0.4.0':40 '1.1.1':6 '3x':46 'browser':36 'class':32 'compar':74 'compliant':17 'consid':72 'destructur':33 'dev':8 'dev-harmoni':7 'ecmascript':18 'es5.1':26 'es6':66 'es6/harmony':29 'esprima':1,4,77 'experiment':28 'faster':47 'featur':30 'fork':3,55 'full':25 'harmoni':2,9,58 'high':13 'high-perform':12 'ie6':37 'indic':60 'javascript':22,79 'known':41 'mainlin':76 'may':70 'modul':31 'node.js':39 'note':67 'obsolet':73 'packag':69 'parser':19 'perform':14 'pre':62 'pre-releas':61 'releas':63,78 'run':34 'standard':16 'standard-compli':15 'suffix':59 'support':24,64 'uglifyj':49 'unoffici':54 'v1':50 'version':5 'written':20","created_at":"2026-05-01T13:45:20.024270+00:00","updated_at":"2026-05-01T13:45:20.024270+00:00","problems":[{"fix":"Run in a browser or use a shim like 'global.window = global;' in Node.js.","cause":"The package assumes a browser environment with 'window' global.","error":"ReferenceError: window is not defined"},{"fix":"Use named import: import { parse } from 'esprima-six-jpike'.","cause":"Incorrect import syntax (e.g., using default import instead of named import).","error":"TypeError: esprima is not a function"},{"fix":"Use the 'ecmaVersion' option in a modern parser like 'acorn', or rewrite to ES5.1.","cause":"The code contains ES6+ syntax that the harmony fork does not support fully.","error":"SyntaxError: Unexpected token ILLEGAL"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"http://esprima.org","github":"https://github.com/ariya/esprima","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esprima-six-jpike","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"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}}