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

@i18nprune/core

v1.0.2

Published

Pure domain engine package for i18nprune.

Readme

License: MIT Node.js >= 18 npm


Pure TypeScript engine for locale validation, sync, translation, diagnostics, and hosted share/report workflows. No console.* and no direct process.* in core — your host passes runtime adapters and an env object so the same logic runs in Node scripts, CI, browsers, and edge workers.

Install

Requires Node.js >= 18.

npm install @i18nprune/core
# or: pnpm add @i18nprune/core
# or: yarn add @i18nprune/core

Quick start

import { resolveContext, runSync } from '@i18nprune/core';
import { createNodeRuntimeAdapters } from '@i18nprune/core/runtime/node';

const ctx = await resolveContext({
  projectRoot: process.cwd(),
  adapters: createNodeRuntimeAdapters(),
});

const result = await runSync(
  ctx,
  { dryRun: true },
  { onProgress: () => {} },
);

console.log(result.summary);

Use defineConfig / loadConfig from @i18nprune/core/config when you want the same i18nprune.config.ts contract as the CLI.

Why embed the SDK

| Benefit | What you get | |--------|----------------| | Same engine as CLI | runValidate, runSync, runGenerate, … share issue codes and cache rules with i18nprune --json. | | Host-owned UX | Progress, logging, and exit policy stay in your app; core returns structured results. | | Runtime choice | Node, browser (runtime/web), or edge (runtime/edge) adapter factories — one implementation graph per surface. | | Granular imports | Subpath exports keep bundles small (/validate, /sync, /generate, …). | | Advanced integrations | Cache, share upload prep, report ingest validation, and translation providers without subprocess overhead. |

Cross-platform behavior matches the CLI: Linux, macOS, and Windows path and cache semantics are parity-tested in the monorepo.

Subpath exports

Published exports (see package.json):

| Subpath | Typical use | |---------|----------------| | @i18nprune/core | Root barrel: runXxx, resolveContext, namespaces (validate, sync, translator, …). | | @i18nprune/core/config | defineConfig, schema, path resolution. | | @i18nprune/core/validate | Validation-only graph. | | @i18nprune/core/sync | Locale shape sync / prune. | | @i18nprune/core/generate | Provider translation runs. | | @i18nprune/core/missing | Missing-key workflows. | | @i18nprune/core/quality | Quality checks. | | @i18nprune/core/cleanup | Cleanup operations. | | @i18nprune/core/init | Project bootstrap helpers. | | @i18nprune/core/locales | Locale layout and listing helpers. | | @i18nprune/core/shared | Shared primitives (JSON, scanner, constants, run helpers) — namespaced + flat re-exports. | | @i18nprune/core/types | Public type barrels. | | @i18nprune/core/report-schema | ProjectReportDocument Zod schema and ingest validation. | | @i18nprune/core/runtime/node | Node fs / path adapters. | | @i18nprune/core/runtime/web | Browser-safe adapter surface. | | @i18nprune/core/runtime/edge | Worker / edge adapter surface. | | @i18nprune/core/runtime/helpers/sync | Sync FS helpers shared across runtimes. |

Prefer the smallest subpath that fits your bundle; fall back to the root entry when you need several domains in one script.

Operation entry points

Command-equivalent runXxx functions (non-exhaustive):

| Operation | Entry | CLI twin | |-----------|--------|----------| | Validate | runValidate | i18nprune validate | | Sync | runSync | i18nprune sync | | Generate | runGenerate | i18nprune generate | | Translate | runTranslate | provider pipeline | | Missing | runMissing | i18nprune missing | | Quality | runQuality | i18nprune quality | | Review | runReview | i18nprune review | | Cleanup | runCleanup | i18nprune cleanup | | Doctor | runDoctor | i18nprune doctor | | Report | runReport | i18nprune report | | Share | runShare | i18nprune share | | Init | runInit | i18nprune init |

Deep wiring table (maintainer clone): maintainer/systems/operations/entrypoints.md.

Runtime adapters

| Host | Import | |------|--------| | Node / scripts / CI | @i18nprune/core/runtime/node | | Browser tooling | @i18nprune/core/runtime/web | | Workers / edge | @i18nprune/core/runtime/edge |

Docs: Runtime overview

Config, cache, and contracts

  • Config: locales.structure, cache profiles (safe | balanced | fast), translation providers — see Config hub
  • Cache: per-project analysis + persisted translation cache; hosts must not fork rebuild policy — see CLI cache
  • CLI JSON parity: stable issue codes and --json envelope helpers via result exports — see CLI JSON and Issues
  • Reports: build payloads with runReport; validate ingest with @i18nprune/core/report-schema before upload

Examples (monorepo)

Runnable SDK samples live under examples/sdk/ in the i18nprune repository:

  • examples/sdk/sync/runSync.ts
  • examples/sdk/generate/runGenerate.ts
  • examples/sdk/missing/runMissing.ts
  • examples/sdk/quality/runQuality.ts
  • examples/sdk/review/runReview.ts
  • examples/sdk/doctor/runDoctor.ts
  • examples/sdk/share/runShareList.ts
  • examples/sdk/translate/runTranslate.ts

CLI-only users

If you only need the terminal tool, install the root package instead:

npm install -g i18nprune

Bundled programmatic surface: import … from 'i18nprune/core' (rolled build, not granular subpaths).

Documentation

License

MIT — see LICENSE in the monorepo root.