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

@rollercoaster-dev/rd-logger

v0.3.4

Published

A neurodivergent-friendly logger for Rollercoaster.dev projects

Readme

@rollercoaster-dev/rd-logger

A neurodivergent-friendly logger for Rollercoaster.dev projects.

CI npm version

Note: This package is part of the Rollercoaster.dev monorepo. For development setup and contributing guidelines, please refer to the monorepo documentation.

Installation

npm install @rollercoaster-dev/rd-logger
# or
yarn add @rollercoaster-dev/rd-logger
# or
pnpm add @rollercoaster-dev/rd-logger

Usage

Import the logger and start logging:

import { Logger } from '@rollercoaster-dev/rd-logger';

const logger = new Logger({
  level: 'debug', // Set the desired log level
});

logger.info('Application starting...');
logger.debug('Debugging some initial setup.');
logger.warn('Something seems off.');
logger.error('An error occurred!', new Error('Example error'));

Features

The logger provides several features designed for clarity and ease of use:

  • Neuro-friendly formatting: Uses colors, icons, and consistent spacing to improve readability, especially for neurodivergent developers.
  • Multiple log levels: Supports standard levels like debug, info, warn, error, fatal.
  • Human-readable timestamps: Displays timestamps in a clear, understandable format.
  • Structured context: Allows attaching additional key-value data to log messages.
  • Request context propagation (optional): Integrates with web frameworks to automatically include request IDs in logs for easier tracing.
  • Framework adapters: Provides specific adapters for seamless integration:
    • Hono: Middleware for the Hono framework.
    • Express: Middleware for the Express framework.
    • Generic: Functions for wrapping arbitrary code blocks or background tasks in a logging context.
  • Customizable: Allows configuration of log levels, formatting, and more.
  • Accessible: Aims to follow accessibility best practices in output formatting.

Query Logger

The package includes an optional QueryLogger to help track database query performance.

import { Logger, QueryLogger } from '@rollercoaster-dev/rd-logger';

const logger = new Logger();
const queryLogger = new QueryLogger(logger, {
  slowQueryThreshold: 150, // Log queries slower than 150ms as warnings
  logDebugQueries: true,   // Log all queries at debug level
});

// Example usage (e.g., inside a database adapter)
const startTime = Date.now();
const result = await databaseClient.execute(sql, params);
const duration = Date.now() - startTime;

// The `requestId` typically comes from the framework adapter's context (e.g., req.id)
const requestId = getCurrentRequestId(); // Replace with your actual method to get the ID
queryLogger.logQuery(sql, params, duration, 'PostgreSQL', requestId);

// Later, you can retrieve stats:
const stats = queryLogger.getStats();
console.log('Query Stats:', stats);

Contributing

Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md before contributing.

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build the package
pnpm build

CI/CD

This project uses GitHub Actions for continuous integration and deployment:

  • CI Workflow: Runs on every push to main and pull requests to ensure code quality
  • PR Checks: Additional checks that run on pull requests
  • Publish Workflow: Automatically publishes the package to npm when a new release is created

Versioning and Releases

This project follows Semantic Versioning and uses Conventional Commits for commit messages.

Creating a Release

To create a new release, you can use one of the following commands:

# Create a patch release (0.0.x)
pnpm release:patch

# Create a minor release (0.x.0)
pnpm release:minor

# Create a major release (x.0.0)
pnpm release:major

# Create a prerelease (alpha)
pnpm release:alpha

# Create a prerelease (beta)
pnpm release:beta

Alternatively, you can use the GitHub Actions workflow "Create Release" to create a new release directly from GitHub.

License

MIT