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

@hedia/types

v3.12.6

Published

Enums, interfaces, and other common types for use in Hedia's software.

Downloads

1,281

Readme

@hedia/types

Shared TypeScript enums, interfaces, and constants used across Hedia's software. Published to npm as @hedia/types.

This package contains types only. It has no runtime dependencies and ships as CommonJS with TypeScript declarations.

Installation

npm install @hedia/types

Pin the exact version in consuming projects, as this repo does with its own dependencies.

Usage

import { BloodGlucoseUnit, DiabetesType, IUserSettings } from "@hedia/types";

const settings: IUserSettings = {
	// ...
};

if (unit === BloodGlucoseUnit.MMOL_L) {
	// ...
}

Everything is exported from the package root via src/index.ts.

What's included

| Module | Contents | | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | activity | Activity entries, intensity and reduction interval enums, activity settings | | boluscalculator | Bolus calculator constants, error enums, recommendation params and result | | logbook | Logbook entries, mood enum, client/backend sync objects | | userdetails | User details | | usersettings | User settings, notifications, BGL targets, insulin, diabetes type, and related enums | | enums | Cross-cutting enums: glucose and ketone units, insulin units, languages, HTTP status codes and methods |

Types prefixed with Legacy describe older data shapes still present in stored data and should not be used for new code.

Development

Requires Node >=22.14.0 (see engines in package.json).

npm ci
npm run validate

validate runs everything CI runs:

| Script | What it does | | ----------------------------------- | --------------------------------------------------------------- | | npm run tsc | Type-check without emitting | | npm run eslint / eslint:fix | Lint with @hedia/eslint-config | | npm run prettier / prettier:fix | Check or fix formatting with @hedia/prettier-config | | npm run pkg-json-lint | Lint package.json (exact versions, alphabetical dependencies) | | npm audit --audit-level=critical | Fail on critical vulnerabilities |

Conventions

  • Prefer interface over type for object shapes (enforced by ESLint).
  • Enum members must be literal values (enforced by ESLint).
  • Dependencies are pinned to exact versions, no ^ or ~, and kept in alphabetical order (enforced by npm-package-json-lint).
  • Source lives in src/. The build output in lib/ is generated and git-ignored.

Build

The build runs automatically on npm pack / npm publish via the prepack hook. To build manually:

npx bob build

react-native-builder-bob emits lib/commonjs (JavaScript) and lib/typescript (declarations). Both lib/ and src/ are included in the published package so source maps resolve.

Releasing

Publishing is fully automated by .github/workflows/ci.yaml. Do not bump the version manually.

Pull requests

  1. Branch from master and open a PR. The title must reference a Jira ticket, e.g. HDAM-1234 Add ketone thresholds. An optional [x.y.z] - or [Anytime] - prefix is allowed. Draft PRs skip this check.
  2. Add a major or minor label to control the version bump. With no label the bump is patch.
  3. On every push CI runs validate, then:
    • commits the bumped version to the PR branch as chore: bump version to x.y.z [skip ci]
    • publishes x.y.z-alpha.<run> to npm under the alpha dist-tag
    • comments the install command on the PR

Pull the branch after CI runs so you pick up the version bump commit before pushing again.

Testing an alpha

npm install @hedia/[email protected]   # exact version from the PR comment
npm install @hedia/types@alpha              # latest alpha

Release

Merging to master publishes the version in package.json as latest, creates a vX.Y.Z git tag, and creates a GitHub release. If that version is already on npm the publish is skipped.

License

UNLICENSED. This package is published publicly for distribution convenience only. All rights reserved by Hedia.