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

next-runtime-toolkit

v0.1.0

Published

A multi-toolkit package for Next.js runtime debugging, action control, and developer instrumentation.

Readme

next-runtime-toolkit

CI CodeQL

next-runtime-toolkit is a comprehensive Next.js and React utility package for runtime coordination and development-time debugging.

Included Modules

  • next-runtime-toolkit/action-backpressure
    • Queue rapid async actions so they execute one at a time.
  • next-runtime-toolkit/action-idempotency
    • Deduplicate identical in-flight actions by key.
  • next-runtime-toolkit/hydration-guard
    • Highlight likely server/client mismatch sources during development.
  • next-runtime-toolkit/stream-trace
    • Instrument suspense boundaries and visualize fallback timing.
  • next-runtime-toolkit/cache-signals
    • Manually annotate cache hits, misses, refreshes, and revalidation events.
  • next-runtime-toolkit/dev-notes
    • Add development-only UI notes with optional VS Code deep links.

Install

npm install next-runtime-toolkit

Example

'use client';

import {
  CacheSignalMarker,
  CacheSignalsProvider,
  HydrationGuard,
  HydrationGuardProvider,
  RuntimeNote,
  RuntimeNotesProvider,
  StreamTraceBoundary,
  StreamTraceProvider,
  useIdempotentAction,
  useQueuedAction
} from 'next-runtime-toolkit';

export function Example({
  saveDraft
}: {
  saveDraft: (id: string) => Promise<void>;
}) {
  const queued = useQueuedAction(saveDraft, { queueKey: 'draft-save' });
  const deduped = useIdempotentAction(saveDraft, {
    key: (id) => id,
    registryKey: 'draft-dedupe'
  });

  return (
    <RuntimeNotesProvider workspaceRoot="/Users/you/app">
      <HydrationGuardProvider>
        <CacheSignalsProvider>
          <StreamTraceProvider>
            <RuntimeNote
              title="Draft toolbar"
              note="This area combines action coordination and suspense tracing."
              file="app/editor/toolbar.tsx"
            >
              <HydrationGuard
                label="Draft timestamp"
                serverValue="2026-04-10T10:00:00.000Z"
                clientValue={new Date().toISOString()}
              >
                <CacheSignalMarker label="toolbar-cache" kind="revalidate" detail="Manual refresh">
                  <StreamTraceBoundary label="Editor sidebar" fallback={<div>Loading...</div>}>
                    <button onClick={() => void queued.run('draft-1')}>Queued Save</button>
                    <button onClick={() => void deduped.run('draft-1')}>Deduped Save</button>
                  </StreamTraceBoundary>
                </CacheSignalMarker>
              </HydrationGuard>
            </RuntimeNote>
          </StreamTraceProvider>
        </CacheSignalsProvider>
      </HydrationGuardProvider>
    </RuntimeNotesProvider>
  );
}

Notes

  • The development overlays are intentionally explicit and manual. Next.js does not currently expose all runtime internals as stable public APIs, so the toolkit focuses on practical instrumentation.
  • stream-trace instruments suspense timing, not the full internal React Flight protocol.
  • cache-signals is designed for manual reporting rather than automatic Next.js cache introspection.

Compatibility

  • Node.js >=18
  • Next.js 14, 15, and 16
  • React 18 and 19

Development

npm install
npm run test
npm run build

License

MIT