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

@marginallyuseful/soll-jest

v0.0.1-05b9ce9b

Published

Jest integration for soll — scope test runs to affected files

Readme

@soll/jest

Jest integration for soll — scope test runs to only the files affected by a set of changed files.

Prerequisites: Install soll and run soll diagnose --write in your project first.

Quick start (preset)

The easiest way to use @soll/jest is via the preset. Install it and add a single line to your Jest config:

npm install --save-dev @soll/jest
// jest.config.json
{
  "preset": "@soll/jest"
}

That's it. Jest will automatically:

  • Read tsconfig.json to discover source files
  • Compute changed files via git merge-base diff against the default branch
  • Filter test runs to only affected tests
  • In watch mode, re-filter on each file change

Architecture

Sits in the packages/ layer of the soll workspace. Consumes the native addon produced by crates/napi/ (via require) and exposes a pure-TypeScript API that returns Jest-compatible filter patterns (--testPathPattern, --testNamePattern).

packages/jest/
  src/
    index.ts               # public API: SollConfig → AffectedTestResult
    file-granularity.ts    # file-level scoping (pattern building, result shaping)
    git.ts                 # git merge-base diff helpers
    discovery.ts           # tsconfig-based source file discovery
    sequencer.ts           # custom TestSequencer (filters to affected files)
    watch-plugin.ts        # watch mode plugin (shouldRunTestSuite hook)
    jest-preset.ts         # preset config wiring sequencer + watch plugin
    __tests__/             # unit tests for each module
  jest-preset.js           # root-level preset entry point

Preset components

| Component | What it does | | ------------------------------------ | -------------------------------------------------------------------------------- | | Sequencer (sequencer.ts) | Extends @jest/test-sequencer to filter sort() results to affected test files | | Watch plugin (watch-plugin.ts) | Implements shouldRunTestSuite hook; caches affected set per run | | Preset (jest-preset.ts) | Wires sequencer + watch plugin into Jest config |

Running all tests

To bypass soll filtering and run every test:

jest --all          # disables sequencer filtering
jest --watchAll     # disables watch plugin filtering

Programmatic API

For custom integrations that need more control than the preset provides:

import { getAffectedTests } from "@soll/jest";

const result = getAffectedTests({
  root: process.cwd(),
  include: await glob("**/*.ts"),
  changedFiles: ["src/logger.ts"],
});

// Pass to Jest:
// jest --testPathPattern <result.testPathPattern>

Exports

| Specifier | Description | | ------------------------- | ------------------------------------- | | @soll/jest | Programmatic API (getAffectedTests) | | @soll/jest/sequencer | Custom TestSequencer class | | @soll/jest/watch-plugin | Watch mode plugin | | @soll/jest/jest-preset | Preset configuration object |

Development

pnpm install         # install dependencies
pnpm build           # compile TypeScript
pnpm test            # run unit tests
pnpm typecheck       # type-check without emitting