json-pipeline (v3.12.3) is a structure specification for designing flexible compilers with support for third-party optimization phases. It provides abstractions for sea-of-nodes (SoN), control flow graphs (CFG), static single assignment (SSA), dominator trees, and global code motion (GCM). The package is designed for Node.js and focuses on JSON-representable intermediate representations, making it suitable for compiler backends and JIT compilers. Release cadence is irregular; last major update was v3.0.0 with breaking changes in API. Key differentiators: modular architecture, JSON serialization, and emphasis on custom optimization phases.
npm install json-pipelineNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a pipeline, build a graph with two constant nodes feeding into an add node, serialize to JSON, and deserialize.
Update to `new Pipeline({ /* options */ })`.If you need immutability, clone the graph before modification.
Use `pipeline.createGraph({ name: 'myGraph' })` instead.Ensure node types match expected schema from documentation.
Upgrade to v3.2.1 or later.
Use `import Pipeline from 'json-pipeline'` (default import).
Ensure nodes are created via `graph.createNode()` and added before using them as inputs.
Create nodes first, then set start/end.
Set the graph's start node using `graph.setStart(node)`.
No dependency data recorded yet.