update-trace-engine

Installation
SKILL.md

Update @paulirish/trace_engine

Lighthouse consumes Chrome DevTools' trace processor (front_end/models/trace) via the standalone @paulirish/trace_engine npm package, built from the trace-engine-lib branch of paulirish/devtools-frontend.

What lives where

Location Purpose Notes
devtools-frontend checkout (branch trace-engine-lib) Source & packaging scripts Tracks origin/main (https://chromium.googlesource.com/devtools/devtools-frontend) + packaging scripts in scripts/trace/. Common local path: ~/devtools/devtools-frontend (ask user if not found).
scripts/trace/prep-trace-engine-package.sh (in devtools-frontend) Builds out/TraceEngine and prepares standalone package Converts export const enum → export enum in front_end/models/trace/**/*.ts, builds with gn + autoninja, applies shims from scripts/trace/replacements/, extracts insight locale strings, and invokes copy-build-trace-engine-for-publish.sh.
scripts/trace/copy-build-trace-engine-for-publish.sh (in devtools-frontend) Copies dist to $HOME/code/trace_engine and tests Copies out/TraceEngine/dist to $HOME/code/trace_engine, runs npm install and npm test (Mocha tests in test/test-trace-engine.mjs + tsc --build ./tsconfig.json).
$HOME/code/trace_engine Standalone npm package staging directory Where npm version and npm publish are run.
core/lib/trace-engine.js (in Lighthouse) Lighthouse entry point for @paulirish/trace_engine Re-exports TraceProcessor, TraceHandlers, Insights, Helpers, and Types.

Procedure

1. Merge origin/main into trace-engine-lib in devtools-frontend

Installs
7
GitHub Stars
31.2K
First Seen
Oct 23, 2026