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

@choosemycompany/lib

v0.7.0

Published

Shared composables, stores and types for ChooseMyCompany front apps

Readme

@choosemycompany/lib

Composables, stores and types shared between the ChooseMyCompany front-end apps (commercial, workspace).

Installation

pnpm add @choosemycompany/lib

Usage

import { useHttp, useStore, type Store, type View } from '@choosemycompany/lib'

A single entry point: everything is re-exported from @choosemycompany/lib.

Dependencies

The package expects to be consumed inside a Nuxt 4 project, with the following peer deps installed:

  • vue, vue-i18n, vue-router, pinia
  • mande (HTTP client)
  • h3 (for useErrorHandling)
  • @nuxtjs/i18n (useLocalePath)
  • nuxt (for useRuntimeConfig, useState, showError, imported from nuxt/app)

Composables using useRuntimeConfig(), useRoute() or useI18n() must be called inside a Nuxt scope (setup, plugin, middleware).

Local development (HMR through the sandbox)

cd sandbox && pnpm install && pnpm dev

Then http://localhost:3000. The sandbox has its own package.json and its own lockfile: it is not part of a pnpm workspace, hence the cd.

The sandbox uses a Vite alias @choosemycompany/lib../src/index.ts, so every change to the lib's sources triggers immediate HMR. A mock API is served by Nitro: /api/philosophers for useHttp + useStore, and an authentication backend for the /auth page.

The /auth page

It reproduces a session that expires, against a mocked auth backend: POST /auth/api/v2/login, POST /auth/api/v2/login/token/refresh and POST /auth/api/v2/logout served at the origin like the real auth-api, a protected resource under /api/session/protected, and POST /api/session/simulate to age the session without waiting 4 h.

The scenario: sign in, call the protected API, expire the token, call again. The network trace shows what the lib does — or does not do — between the app's call and the response.

Build & publish

pnpm build            # vite build → dist/
pnpm typecheck
pnpm test
pnpm publish          # through CircleCI on a push to main

Notable API changes

  • useStore: unified signature absorbing the workspace variant (search, filters, a fourth FilterItem generic). Public method: isPending(key). getViewKey sorts keys to guarantee a deterministic cache.
  • usePrimaryTypeTranslation(primaryTypes): now receives the list of primary types as an argument instead of importing it from commercial's @/entities/form.