Shipping data inside a code package is supposed to be an anti-pattern. Data goes in databases, or S3 buckets, or API responses; packages ship logic . We spent October deliberately violating that rule: our npm package us-tariff-lookup bundles a 452KB minified ruleset — every US import tariff layer we track, with legal citations — next to the TypeScript that queries it.
This is the story of why the violation is the feature, how the data gets into the bundle without leaking our internal docs, and what publishing through npm's staging-and-Trusted-Publishing pipeline actually felt like from the outside. (The engine itself is a hundred-odd KB of TypeScript across nine files — the data outweighs the logic by 4:1, which is the point.)
The case for shipping the data
US tariff math has a reproducibility problem. The rules changed roughly five times a month through 2026 — new Section 301 tiers, sector measures, fee schedules — and every change retroactively makes your old quotes look wrong.…