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

jsc-compile

v1.0.0

Published

Compile JavaScript to V8 bytecode archives via Docker multi-stage builds

Readme

jsc-compile

Compile JavaScript to V8 bytecode — protect your source code and improve startup time.

Takes a bundled .js file and produces a zstd-compressed .jsc archive with pre-compiled V8 bytecode for 20+ Node.js LTS versions and 20+ Electron/VS Code versions, on linux-x64, win32-x64, and linux-arm64. No source code is shipped — only bytecode.

Install

npm install -g jsc-compile

Quick start

# 1. Bundle your project (e.g. with esbuild)
esbuild src/index.js --bundle --platform=node --format=cjs --outfile=dist/mylib.bundle.js

# 2. Compile to bytecode
jsc-compile dist/mylib.bundle.js -o dist/mylib.jsc

# Output:
#   mylib.jsc     — compressed bytecode archive (all targets)
#   index.js      — self-contained runtime loader

The generated loader has zero dependencies. Point your package.json at it and ship:

{
  "main": "index.js"
}

How it works

mylib.bundle.js
    │
    ▼  Generates a multi-stage Dockerfile
    │
    ▼  Docker BuildKit compiles in parallel:
    │    ├─ Node 24.x, 22.x, 20.x  ×  linux-x64
    │    ├─ Node 24.x, 22.x, 20.x  ×  win32-x64 (via Wine)
    │    ├─ Node 24.x, 22.x, 20.x  ×  linux-arm64 (via QEMU)
    │    ├─ Electron 33.x, 32.x …  ×  linux-x64
    │    ├─ Electron 33.x, 32.x …  ×  win32-x64 (via Wine)
    │    └─ Electron 33.x, 32.x …  ×  linux-arm64 (via QEMU)
    │
    ▼  Packs all .jsc into a single zstd-compressed archive
    │
    ├─ mylib.jsc      (~5% of raw size)
    └─ index.js       (~2 KB, self-contained)

At runtime the loader decompresses the archive, selects the bytecode matching the current Node/Electron version and platform, patches the V8 header, and loads it via vm.Script. No temp files, no native addons, no dependencies.

CLI options

jsc-compile <input>.js [options]

| Option | Default | Description | |---|---|---| | -o, --output <file> | <input>.jsc | Output archive path | | --no-electron | — | Skip Electron/VS Code targets | | --no-node | — | Skip Node.js LTS targets | | --no-local | — | Skip local Node.js version | | --no-wsl | — | Run Docker directly instead of via WSL (Windows) | | --docker-context <name> | — | Use a specific Docker context |

Prerequisites

  • Node.js >= 22
  • Docker with BuildKit support
  • WSL on Windows (Docker commands are forwarded through WSL)
  • Optionally, a named Docker context for remote builds (--docker-context my-builder)

Archive format

[4 bytes: index length (LE uint32)]
[N bytes: JSON index]
[remaining: concatenated .jsc blobs]
  └─ all zstd compressed

The JSON index maps keys like node_22.14.0_linux-x64 or electron_33.4.0_win32-x64 to { offset, size } entries.

License

ISC