npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lvce-editor/editor-worker

v19.70.7

Published

Editor Worker contains the core editing logic for [Lvce Editor](https://github.com/lvce-editor/lvce-editor). It runs as a web worker and keeps the editor's document state, command handling, widget state, and virtual DOM rendering work off the renderer pro

Readme

Editor Worker

Editor Worker contains the core editing logic for Lvce Editor. It runs as a web worker and keeps the editor's document state, command handling, widget state, and virtual DOM rendering work off the renderer process.

Features

  • Text document editing, selections, cursor movement, clipboard commands, indentation, line movement, sorting, commenting, undo, and redo.
  • Virtual DOM generation for editor rows, cursors, selections, gutters, diagnostics, scroll bars, messages, and inline widgets.
  • Editor widgets for completions, completion details, hover, find, rename, source actions, color picker, and code generation.
  • Extension-host integration for diagnostics, hover, definitions, type definitions, tab completion, source actions, formatting, and tokenizers.
  • Incremental rendering, diffing, text measurement, syntax highlighting, link detection, and editor preference handling.
  • Unit and end-to-end coverage for editing behavior, widget rendering, extension fixtures, and browser-facing editor flows.

Repository Layout

.
├── packages/editor-worker   # Worker source, RPC API types, editor modules, and unit tests
├── packages/build           # Build, static export, dependency cache, and memory measurement scripts
├── packages/e2e             # Playwright-based end-to-end tests and fixture extensions
└── packages/server          # Local test server wrapper for development and e2e runs

Requirements

  • Node.js 24.16.0 or newer compatible with the version in .nvmrc
  • npm
  • Chromium for Playwright e2e tests

If you use nvm, run:

nvm use

Getting Started

Install dependencies from the repository root:

npm ci

Installation does not modify the installed server assets.

Start a development build and local test server:

npm run dev

This builds the local package, then starts the watch build and the Lvce Editor test server with packages/e2e as the test path. The server uses --link to load the generated .tmp/dist editor-worker package.

Common Commands

Run these commands from the repository root unless noted otherwise.

| Command | Description | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | | npm run build | Bundles the editor worker into .tmp/dist/dist/editorWorkerMain.js and prepares a publishable package in .tmp/dist. | | npm run build:watch | Watches packages/editor-worker/src/editorWorkerMain.ts and rebuilds the worker with esbuild. | | npm run build:static | Exports a static test build into .tmp/static. Run npm run build first. | | npm run dev | Runs the watch build and local test server together. | | npm test | Runs package test scripts through npm workspaces. | | npm run type-check | Runs TypeScript project references for all packages. | | npm run lint | Runs ESLint, Prettier checks, and Knip. | | npm run format | Formats the repository with Prettier. |

Package-specific commands:

cd packages/e2e
npm run e2e:headless
npm run e2e
cd packages/build
npm run measure
npm run measure:visible

Build Output

npm run build creates .tmp/dist, including:

  • dist/editorWorkerMain.js, the bundled worker entry point.
  • dist/api/api.d.ts, copied from the worker RPC API type definition.
  • package.json, README.md, and LICENSE for publishing @lvce-editor/editor-worker.

Version resolution for release builds comes from, in order:

  1. RG_VERSION
  2. GIT_TAG
  3. The current exact git tag
  4. 0.0.0-dev

Worker Entry Points

  • Runtime entry: packages/editor-worker/src/editorWorkerMain.ts
  • Main worker bootstrap: packages/editor-worker/src/parts/Main/Main.ts
  • Typed RPC surface: packages/editor-worker/src/parts/Api/Api.ts

The worker listens for RPC messages, registers widget modules, initializes unhandled error handling, and delegates editor commands through the module structure in packages/editor-worker/src/parts.

Testing

Unit tests live in packages/editor-worker/test and are run by the editor-worker package's Jest setup.

End-to-end tests live in packages/e2e/src and use fixture extensions from packages/e2e/fixtures. Run npm run build from the repository root before launching either e2e suite: both server launchers link the local .tmp/dist package. Install Chromium if needed:

cd packages/e2e
npx playwright install chromium
npm run e2e:headless

The memory benchmark pins its Playwright version in packages/build to keep the browser runtime consistent with the memory limit. E2e tests use the browser version required by the test harness.

CI and Releases

Pull requests and pushes to main run on Ubuntu, macOS, and Windows. CI builds the worker, exports the static test build, runs unit tests, type checks, linting, e2e tests, and memory measurement.

Tagged releases matching v*.*.* create a draft GitHub release, build the publishable .tmp/dist package, publish it to npm, and then publish the GitHub release.

Contributing

Keep changes focused on the relevant worker module and add or update tests near the behavior being changed. For user-facing editor behavior, prefer an e2e scenario in packages/e2e/src; for focused document, rendering, or command behavior, prefer a unit test in packages/editor-worker/test.

Before opening a pull request, run:

npm run build
npm test
npm run type-check
npm run lint

For changes that affect browser behavior, also run:

cd packages/e2e
npm run e2e:headless

License

MIT