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

@remcostoeten/hygienic

v0.1.0

Published

Consolidates UI component imports from individual files into barrel imports. CLI tool with caching, git integration, and CI support.

Readme

Resolving the unrelated histories error in Git

When you encounter the error message fatal: refusing to merge unrelated histories during a git pull, it means that the branches you are trying to merge do not share a common commit history.

This can happen if the repository history was rewritten or if the branches were independently created.

To resolve this error, you can use the --allow-unrelated-histories option with your git pull command:

git pull origin master --allow-unrelated-histories

This forces Git to merge the histories even if they are unrelated.

Be cautious when doing this, as it can lead to merge conflicts that you will need to resolve manually.

Would you like me to run this command for you now?

Hygienic

Hygienic is a versatile TypeScript tool that:

  • Cleans up unused imports, types, methods, and variables
  • Organizes barrel file imports
  • Enforces a consistent structure

👉 Making your colleagues hate you less during code reviews.


Install

bun add -g @remcostoeten/hygienic

Or run without installing:

bunx @remcostoeten/hygienic src/

pnpm also works, or npm/yarn if you're a maniac

Usage

hygienic src/          # Preview changes
hygienic src/ --fix    # Apply changes

Options

  • --check - Exit with error if changes needed (CI mode)
  • --verbose - Show detailed output
  • --except <patterns> - Skip files/folders
  • --include <patterns> - Only process these patterns
  • --config - Interactive setup

Examples

hygienic src/ --fix --sort
hygienic components/ --check   # CI mode
hygienic src/ --except test stories

What it does

Before:

import { Button } from '@/shared/components/ui/button';
import { Input } from '@/shared/components/ui/input';
import { Card } from '@/shared/components/ui/card';

After:

import { Button, Input, Card } from '@/shared/components/ui';

⚙️ Config

Run hygienic --config or edit ~/.config/import-consolidator/config.json:

{
  "barrelPaths": ["src/shared/components/ui/index.ts"],
  "extensions": [".tsx"],
  "sortImports": false
}

Features

  • Consolidates only when a barrel file exists
  • Creates backups before making changes
  • Caches results for speed
  • Git status checking
  • CI/CD support with --check

API

For build tools and custom integrations:

import { UIImportConsolidator, Config } from '@remcostoeten/hygienic';

const config = new Config();
await config.initialize();

const consolidator = new UIImportConsolidator(config);
await consolidator.initialize();

const results = await consolidator.processFiles(['src/'], false, true);

See examples/ for more.


xxx, Remco Stoeten