CodeVetter · Repo Unpack · System map
remeda/remeda
The repository separates the published library from documentation, consumer examples, and brand tooling through npm workspaces. The library runs inside its caller's process, while the website performs content extraction at build or development time and hydrates selected React islands in the browser. State ownership is correspondingly divided between utility invocation state, Astro content storage, generated files, and browser preferences. Distribution includes ESM and CJS library artifacts, a static Netlify site, and automated registry releases.
- The private root package defines four npm workspaces: remeda, docs, stackblitz-template, and brand; its docs:build script invokes workspace builds.
- The library's public barrel exports 163 utility modules, including purry, pipe, piped, funnel, collection transforms, object operations, predicates, and string utilities.
- Consumers import or require the package root through dist/index.js or dist/index.cjs; only dist files are packaged, and the manifest declares sideEffects: false.
- tsdown first bundles declarations from src/index.ts, then runs a separate runtime build with config loading disabled, cleaning disabled, per-utility entries, minification, source maps, attw, and publint.
- The docs site integrates Astro, React, MDX, sitemap generation, and Tailwind; Netlify builds the library and docs workspaces and publishes packages/docs/dist.
- Inspected state owners include per-pipe evaluator arrays, funnel closure timers and reduced data, Astro's content store, and the browser's theme localStorage entry.
- Library scripts expose source and distribution type checks, three Vitest projects, coverage collection, tsdown builds, JSR publishing, and pkg-pr-new previews using the StackBlitz template.
- Main-branch releases depend on type, runtime, property, lint, formatting, and slow-type jobs; semantic-release publishes artifacts, followed by conditional signing, provenance attestation, and JSR publishing.