* test: run each heavy unit test file in its own process `test:unit` and `test:unit:heavy` ran every file in one `bun test` process. A heavy fixture file alone takes 2-6 GB, and what one file keeps stays alive for the rest of the run. Quick files still share one process; heavy files now run one per process, so the peak is the heaviest single file. Coverage runs keep one process, since coverage is collected per process. stale-overrides parses material3.fig and joins the heavy list, and a guard fails when a quick test reads a large fixture corpus. * test(core): keep one material3 graph alive at a time in stale-overrides The edited-document test held the exported reader graph, the reopened graph, and the parsed node changes at once, and the first test's graph was still alive when the second started. Each step now runs in its own function and returns only what the next check needs, and the file collects garbage between steps and tests. The checks are unchanged; peak memory drops from 5.6 GB to 3.6 GB. |
||
|---|---|---|
| .. | ||
| assets | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.test.json | ||
| tsdown.config.ts | ||
@open-pencil/core
Editor engine for OpenPencil: the CanvasKit (Skia WASM) renderer, Yoga layout, the framework-agnostic editor with undo and selection, the Figma Plugin API compatibility layer, the AI/MCP tool definitions, clipboard and vector conversion, and format-neutral document I/O.
It depends on @open-pencil/scene-graph, @open-pencil/pen, @open-pencil/kiwi, and @open-pencil/fig, and keeps browser DOM out so it runs in the app, the CLI, the MCP server, and headless scripts alike.
Import the root barrel or the targeted subpaths listed in package.json exports, for example @open-pencil/core/io, @open-pencil/core/geometry, and @open-pencil/core/canvaskit.
- Programmable overview and SDK docs: https://openpencil.dev/programmable/
- Source and issues: https://github.com/open-pencil/open-pencil
MIT License.