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

@mergesignal/scan-prep

v0.1.6

Published

Scan job preparation: lockfile diff, GitHub source corpus, prepareScanContext

Readme

@mergesignal/scan-prep

Canonical public Scan Preparation package — lockfile ingress authority and public-safe scan job preparation before intelligence domains run.

Responsibilities

| Surface | Responsibility | | ------------------------------------------------ | -------------------------------------------------------------------------------------- | | Root (@mergesignal/scan-prep) | prepareScanContext(job) for the public worker ingress contract | | ./lockfile (@mergesignal/scan-prep/lockfile) | Lockfile transition context, changed-package discovery, pnpm importer collapse helpers |

Public-safe preparation includes:

  • deterministic lockfile diff and changed-package discovery;
  • optional GitHub source corpus fetch inside prepareScanContext (not exported);
  • explicit preparation warnings when inputs are missing or incomplete.

Explicit exclusions

The published package must not contain:

  • Worker Evidence Collection orchestration or tiered repository acquisition;
  • collection-plan execution, private tree/blob batching, or tier-three corpus collection;
  • Assessment Decision or merge-recommendation logic;
  • Package Intelligence registry or tarball behavior.

Permanent contract authority: docs/engineering/scan-prep-api.md.

Approved exports

Root: prepareScanContext, PrepareScanContextResult, ScanPreparationSummary

./lockfile: prepareLockfileContext, hasVerifiedLockfileIngress, hasVerifiedEmptyLockfileIngress, detectChangedPackages, detectLockfilePackageDelta, resolvePnpmPackageTransitionCollapse, and related lockfile types.

Low-level GitHub authentication, corpus cache controls, and raw fetch helpers are internal implementation details.

Workers must NOT

Reimplement lockfile diff or GitHub corpus preparation under apps/worker. Import prepareScanContext from this package only.

CI enforces duplication guards via scripts/ci/forbid-worker-prep-duplication.sh and export-surface checks.

mergesignal-engine maintains a separate workspace copy for private engine deployment until registry consumption graduates. Port lockfile authority changes here first; see scan-prep-migration.md.

Environment

| Variable | Purpose | | ---------------------------- | -------------------------------------------- | | GITHUB_APP_ID | GitHub App id for installation tokens | | GITHUB_PRIVATE_KEY | PEM for App auth | | CODE_ANALYSIS_TIMEOUT_MS | File fetch timeout (default 30000) | | CODE_ANALYSIS_CACHE_TTL_MS | In-memory corpus cache TTL (default 3600000) |

Publication

@mergesignal/[email protected] is published and registry-verified on npmjs (manual bootstrap). @mergesignal/[email protected] is the OIDC Trusted Publishing proof release — published and registry-verified via publish-scan-prep.yml with no stored npm write token. Tag scan-prep-v0.1.0 is immutable — do not republish 0.1.0 or move the tag. Private-engine registry consumption is a separate operation.

CI and pre-tag validation

These commands may independently pack candidates to validate repository readiness before the release tag:

  • pnpm run check:scan-prep-pack-artifact
  • pnpm run check:scan-prep-isolated-install
  • pnpm run check:scan-prep-export-surface
  • pnpm run check:scan-prep-authority

They do not produce the governed release candidate used for publication.

Governed release candidate

The only command that creates the tarball published to npmjs is:

pnpm run pack:scan-prep-release-candidate -- --output-dir=<fresh-external-directory>

This command packs once, validates that exact candidate, runs isolated external-consumer installation on those exact bytes, verifies digest stability, and writes the final report only on success.

Use a fresh external output directory. The command rejects an existing target candidate or report for the same version.

Always use the exact resolved candidate and report paths printed by pack:scan-prep-release-candidate. Filesystem canonicalization may normalize paths internally (for example /tmp/... to /private/tmp/... on macOS). Do not reconstruct, convert, or guess either path.

Before publication, compare the reported integrity digest with an independently calculated SHA-512 of the reported candidate file immediately before publication.

npm publish "<reported-resolved-candidate-path>" --access public

Do not rebuild, repack, or rerun a validator that creates another tarball.

Public registry verification (mandatory after publication): pnpm run check:scan-prep-published-registry or verify-scan-prep-registry.yml. If publication succeeds but verification fails, rerun the read-only workflow — never republish the same version.

Bootstrap public publication (0.1.0): completed manually with interactive npm login + 2FA on registry.npmjs.org. No GitHub secret. No npm write token.

Permanent publication (0.1.1+): GitHub Trusted Publishing / OIDC via .github/workflows/publish-scan-prep.yml — publishes the governed release candidate with no stored npm write token. OIDC proof completed at @mergesignal/[email protected] (scan-prep-v0.1.4).

Shared’s existing NPM_TOKEN is for @mergesignal/shared only — do not use it for Scan Preparation.

Public consumer installation requires no npm authentication. Maintainer procedures: releasing.md.

Permanent contract authority: docs/engineering/scan-prep-api.md.