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

@a11yst/source-index

v1.0.2

Published

Safe deterministic repository source file indexing for a11yst

Readme

@a11yst/source-index NPM version License: MPL-2.0 NPM total downloads

Safe, deterministic repository source file discovery for a11yst.

Phase 10b builds a filesystem index only. It does not read source file contents, parse code, or produce source mappings.

Separation from @a11yst/source-mapping

| Package | Responsibility | | --- | --- | | @a11yst/source-mapping | Pure domain model: locations, confidence, candidates, results | | @a11yst/source-index | Filesystem boundary: traversal, ignores, limits, classification |

Repository root

indexRepositorySources() always receives an explicit absolute repositoryRoot. It never uses process.cwd(), process.env, or implicit roots.

The canonical root may be resolved internally with realpath, but absolute paths never appear in serialized results or diagnostics.

Scopes

Scopes are repository-relative roots inside the monorepo:

await indexRepositorySources({
  repositoryRoot: "/abs/path/to/repo",
  scopes: [
    { id: "storefront", rootUri: "apps/storefront", projectName: "storefront", framework: "next" },
  ],
});

When no scopes are provided, a default { id: "repository", rootUri: "." } scope is used. Overlapping scopes deduplicate files and merge scopeIds, projectNames, and frameworks.

Indexed file kinds

Supported kinds (by extension/name):

  • html, htm
  • *.component.htmlangular-template
  • JavaScript (.js, .mjs, .cjs)
  • TypeScript (.ts, .mts, .cts)
  • JSX / TSX
  • Vue (.vue)
  • Preview: Svelte (.svelte), Astro (.astro)

Generated declarations, bundles, minified files, and source maps are excluded.

Ignored directories

Built-in excluded directory names include node_modules, dist, .next, .nuxt, coverage, and .a11yst/results (prefix). Security excludes cannot be overridden by user patterns.

.gitignore

Only the repository root .gitignore is read. Missing .gitignore is allowed. Unreadable .gitignore yields partial status with gitignore-read-failed.

Limitation (10b): nested .gitignore files are not interpreted.

Explicit ignore patterns

options.ignorePatterns accepts repository-relative patterns interpreted with the same matcher used for .gitignore. Absolute patterns are rejected.

Symlinks

Symlinks are never followed. Each skipped symlink increments symlinksSkipped and may emit a single symlink-skipped diagnostic containing only the symlink URI — never the target path.

Limits

Defaults:

{
  maxFiles: 50_000,
  maxDepth: 64,
  maxFileSizeBytes: 2 * 1024 * 1024,
}

Reaching file or depth limits yields partial status. Oversized files are skipped without failing the entire index.

Status

| Status | Meaning | | --- | --- | | complete | All valid scopes traversed without recoverable limits/errors | | partial | Permission errors, unreadable .gitignore, limits reached, etc. | | invalid | Invalid root, unsafe scope, invalid options — indexing did not proceed |

Determinism

Directory entries, scopes, files, scope metadata arrays, and diagnostics are sorted deterministically. readdir order does not affect output.

Privacy

Results never include absolute repository paths, source code, secrets, timestamps, or symlink targets.

Next steps

Phase 10c will begin HTML/Vanilla source mapping using this index. Phase 10b does not integrate with audit, CLI, or reports.