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

@eliware/common

v2.0.0

Published

An ESM and Node.js compatibility layer for shared Eliware filesystem, path, logging, error, and signal APIs.

Readme

@eliware/common

A small native ESM compatibility package that provides one stable import surface for Eliware's shared Node.js utilities.

Requirements

  • Node.js 26 or newer
  • Node.js >=26
  • Published Eliware dependency packages matching the versions in package.json

Installation

npm install @eliware/common

Exports

@eliware/common re-exports the current public APIs from:

  • @eliware/log: log, createLogger, safeSerialize
  • @eliware/path: path, pathUrl, getCurrentDirname, getCurrentFilename, resolvePath, relativePath, fileUrlToPath
  • @eliware/errors: registerHandlers
  • @eliware/signals: registerSignals
  • Node.js fs

The implementation is split into focused modules under src/ while the package root remains the public entry point.

Usage

import {
  fs,
  log,
  path,
  pathUrl,
  resolvePath,
  registerHandlers,
  registerSignals,
} from '@eliware/common';

const configPath = path(import.meta, '.env');
const configUrl = pathUrl(import.meta, '.env');
const absolutePath = resolvePath(import.meta, 'config');

log.info('Application starting', { configPath, configUrl, absolutePath });
log.info(`Files: ${fs.readdirSync(path(import.meta)).join(', ')}`);

const errors = registerHandlers({ events: ['uncaughtException', 'unhandledRejection'] });
const signals = registerSignals({ shutdownHook: async () => errors.removeHandlers() });

process.once('SIGTERM', () => void signals.shutdown('SIGTERM'));

TypeScript

Type declarations are included and expose the dependency option and return types:

import {
  createLogger,
  getCurrentDirname,
  registerSignals,
  type RegisterSignalsOptions,
} from '@eliware/common';

const logger = createLogger({ format: 'json' });
const directory = getCurrentDirname(import.meta);
const options: RegisterSignalsOptions = { exit: false };
const registration = registerSignals(options);

Configuration and operations

The package has no global configuration and performs no work at import time. Configure the delegated logger, error handlers, and signal handlers through their options. Applications should validate their own configuration before opening files or external connections and should make shutdown cleanup idempotent.

Errors / Troubleshooting

This package is a compatibility layer and delegates behavior to its underlying packages. For logging, path, error-handler, or signal-handler failures, consult the corresponding dependency documentation. Keep dependency versions synchronized with the public exports and declarations.

Development

npm install
npm test
npm run lint
npm run typecheck
npm run pack
npm audit --omit=dev --audit-level=moderate

This package is a re-export/compatibility layer. Its tests verify the public export contract and representative delegation to the underlying packages; implementation behavior is tested in those dependency packages.

Security

Do not log secrets or include credentials or machine-specific paths in examples. Review delegated package behavior and keep dependencies updated before publishing.

Links

License

MIT