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

@yucacodes/ts

v0.0.7

Published

Lightweight TypeScript runtime loader for Node.js using custom import hooks

Readme

@yucacodes/ts

A lightweight TypeScript runtime loader for Node.js using custom import hooks. Run TypeScript files directly without pre-compilation.

Features

  • Direct execution - Run .ts files without building
  • tsconfig.json support - Automatically loads and applies your TypeScript configuration
  • Path aliases - Full support for paths in tsconfig.json (exact matches and wildcards)
  • Fast resolution - Optimized with caching for alias paths and transpiled modules
  • Zero configuration - Works out of the box with sensible defaults
  • Module interop - Import CommonJS, ESM, JSON, and TypeScript files seamlessly

Installation

npm install @yucacodes/ts

Usage

CLI

Run any TypeScript file directly:

yts your-script.ts

Programmatic

Use as a loader with Node.js:

node --import @yucacodes/ts your-script.ts

Configuration

Create a tsconfig.json in your project root:

{
  "compilerOptions": {
    "module": "ESNext",
    "target": "ES2015",
    "paths": {
      "@models/*": ["./src/models/*"],
      "@utils": ["./src/utils/index.ts"]
    }
  }
}

The loader will automatically:

  • Find and load tsconfig.json from your working directory
  • Apply your compiler options
  • Resolve path aliases

How It Works

The package uses Node.js custom import hooks to:

  1. Intercept TypeScript file imports
  2. Transpile them using the TypeScript compiler
  3. Cache transpiled modules with mtime validation
  4. Resolve path aliases from tsconfig.json

Supported Features

  • TypeScript transpilation (.ts files)
  • Path alias resolution (exact and wildcard patterns)
  • CommonJS and ESM module imports
  • JSON imports
  • Source maps for debugging
  • Module format detection (CommonJS/ESM based on tsconfig)

Performance

The loader includes several optimizations:

  • Caching - Transpiled modules are cached with modification time validation
  • Lazy resolution - Path aliases are pre-processed for O(1) exact lookups
  • Skip JS files - JavaScript files bypass TypeScript processing entirely

License

ISC