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

@push.rocks/smartwatch

v6.3.0

Published

A cross-runtime file watcher with glob pattern support for Node.js, Deno, and Bun.

Readme

Migration Plan: smartchok to Chokidar 4.x

Command to reread CLAUDE.md: cat /home/philkunz/.claude/CLAUDE.md

MIGRATION COMPLETED ✅

All phases of the migration have been successfully completed:

Current State Analysis

  • Current dependency: @tempfix/watcher v2.3.0 (a fork of fabiospampinato/watcher)
  • Target: Chokidar v4.0.3
  • Major challenge: Chokidar 4.x removed glob support, but smartchok heavily uses glob patterns

Migration Plan

Phase 1: Preparation

  1. Install chokidar 4.x and glob library for pattern matching
    • pnpm install chokidar@^4.0.3
    • pnpm install picomatch (for glob pattern matching)
    • pnpm uninstall @tempfix/watcher

Phase 2: Code Changes

2.1 Update Plugin Imports (ts/smartchok.plugins.ts)

  • Remove @tempfix/watcher import
  • Add chokidar import
  • Add picomatch for glob pattern matching

2.2 Update Smartchok Class (ts/smartchok.classes.smartchok.ts)

  • Replace watcher initialization with chokidar
  • Implement custom glob filtering using picomatch
  • Update event mapping to match chokidar's event names
  • Adjust watcher options to match chokidar's API

2.3 Handle Glob Patterns

Since chokidar 4.x removed glob support, we need to:

  • Parse glob patterns to extract base directories
  • Use chokidar to watch base directories
  • Use picomatch to filter events based on glob patterns
  • Ensure backward compatibility with existing API

2.4 Event Mapping

Map chokidar events to existing smartchok events:

  • Keep existing event names for backward compatibility
  • Ensure all current functionality is preserved

Phase 3: Testing

  1. Run existing tests to ensure backward compatibility
  2. Add new tests for glob pattern handling
  3. Test edge cases with complex glob patterns
  4. Verify performance with large file sets

Phase 4: Documentation

  1. Update readme.md to reflect the change to chokidar 4.x
  2. Document any API changes (if any)
  3. Update version number in package.json

Technical Details

Key Differences to Handle:

  1. Glob Support: Implement custom glob filtering layer
  2. API Changes: Adapt initialization and option passing
  3. Event Names: Map between different event naming conventions
  4. Minimum Node Version: Ensure compatibility with Node 14+

Risk Mitigation:

  • Maintain backward compatibility with existing API
  • Extensive testing with current test suite
  • Consider keeping a legacy branch if breaking changes are unavoidable