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

@courthive/i18n

v0.3.0

Published

Translation locales for the CourtHive ecosystem. Source-of-truth bundle served at runtime by competition-factory-server to TMX clients.

Downloads

388

Readme

@courthive/i18n

Translation locales for the CourtHive ecosystem. Source-of-truth bundle served at runtime by competition-factory-server to TMX clients; see Mentat/planning/I18N_DELIVERY.md for the full delivery architecture.

Layout

src/
  locale-labels.ts     # Per-locale label + RTL flag
  manifest.gen.ts      # Build-time CLI: SHA256, keyCount, completeness
  locales/
    en.json            # Source of truth for English (mirrored from TMX)
    fr.json
    es.json
    pt-BR.json
    de.json
    ar.json
    zh-CN.json
scripts/
  compare-keys.cjs     # CI gate: fails on key drift / duplicate keys
  install-husky-hooks.cjs   # Copies scripts/husky/* into .husky/ on prepare
  husky/
    pre-commit         # Hook body (lint + check-types + compare-keys)
    commit-msg         # Hook body (commitlint)

Build artifact (dist/)

pnpm build emits:

  • dist/locales/*.json — copies of every source locale.
  • dist/locale-labels.js + .d.ts — label/RTL metadata.
  • dist/manifest.json — runtime manifest (SHA256 per locale, key count, completeness, RTL flag) used by CFS to serve GET /i18n/manifest.
  • dist/index.js + .d.ts — re-exports the manifest type and labels.

completeness = 1 - (__TODO__ count / total keys). New keys land as __TODO__ placeholders in non-English locales; translators fill them in and merge a follow-up PR that brings completeness back to 1.0.

Scripts

pnpm build          # tsc → dist/, then node dist/manifest.gen.js
pnpm check-types    # tsc --noEmit
pnpm lint           # eslint . --fix --max-warnings 0
pnpm format         # prettier --write
pnpm test           # node scripts/compare-keys.cjs  (key parity gate)

Compare-keys gate

scripts/compare-keys.cjs is the canonical key-parity script — promoted from TMX/src/i18n/compare-keys.cjs. It exits with code 1 on:

  • duplicate keys within a single locale
  • any leaf key present in one locale but missing in another

CI runs it on every PR and push. Pre-commit (husky) runs it too.

Consumed by

| Repo | How | | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | competition-factory-server | pnpm dep (link:../courthive-i18n in dev); on bootstrap copies dist/locales/* + dist/manifest.json to a writable i18n/ directory and serves them via GET /i18n/* endpoints. | | TMX (eventually) | Reads from CFS at runtime — never depends on @courthive/i18n directly. |

License

MIT