A lightweight, zero-dependency TypeScript library for typed weighted progress state primitives (v0.1.0, initial release, not yet on a regular cadence). It provides `createProgressGroup` and `ProgressItem` to track weighted completion progress as a number between 0 and 1, with snapshot support for terminal UIs, logs, or dashboards. Unlike the unmaintained `are-we-there-yet`, it offers a compact, fully typed API and does not include any UI or logging; it is purely a state primitive. The package is an independent migration helper for projects moving away from `are-we-there-yet`, but is not a drop-in replacement.
npm install progress-stateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a progress group, adds two weighted items, partially completes one, and logs overall weighted percentage.
Ensure `value` is clamped to [0,1] before calling `complete()`.
Call `snapshot()` and re-render after each `complete()` call.
Manually migrate from `are-we-there-yet` patterns to `createProgressGroup` and `ProgressItem`.
Add `"types": "./dist/index.d.ts"` to tsconfig or explicitly import types.
Run `npm install progress-state`. Ensure Node >=18. If using TypeScript, check that `types` field is correctly resolved (see warnings).
Use `import { createProgressGroup } from 'progress-state'` and call `createProgressGroup()` to get a group.Ensure you use `import type { ProgressItem } from 'progress-state'` and have TypeScript >=4.5.After creating the group with `createProgressGroup()`, use `const group = createProgressGroup(); group.snapshot()`.