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

@tsonic/nodejs

v10.0.48

Published

TypeScript type definitions for Node.js CLR library

Readme

@tsonic/nodejs

Node-style APIs for Tsonic.

This package is part of Tsonic: https://tsonic.org.

Use @tsonic/nodejs when you want Node-like modules (fs, path, events, crypto, process, http, …) while still compiling to a native binary with tsonic.

Prerequisites

  • Install the .NET 10 SDK (required by Tsonic): https://dotnet.microsoft.com/download
  • Verify: dotnet --version

Quick Start

mkdir my-app && cd my-app
npx --yes tsonic@latest init --surface @tsonic/js
npx --yes tsonic@latest add npm @tsonic/nodejs
import { join } from "node:path";
import { readFileSync } from "node:fs";

export function main(): void {
  const fullPath = join("src", "App.ts");
  console.log(fullPath);
  console.log(readFileSync(fullPath, "utf-8"));
}
npm run dev

Existing project

npx --yes tsonic@latest add npm @tsonic/nodejs

@tsonic/nodejs is a regular package, not a surface. Use @tsonic/js for the ambient JavaScript world, and add @tsonic/nodejs when you want node:* module imports. If your workspace is still on CLR, switch its surface to @tsonic/js first.

Versioning

This repo is versioned by runtime major:

Before publishing, run npm run selftest.

Publish with:

npm run publish:10

Core Modules (what you get)

  • fs, path, events, crypto, process
  • http (separate module entrypoint)

Usage

File System (node:fs)

import { readFileSync, writeFileSync } from "node:fs";

const content = readFileSync("./package.json", "utf-8");
writeFileSync("./output.txt", "Hello from Tsonic!");

Path Operations (node:path)

import { join, extname, dirname } from "node:path";

const fullPath = join("config", "settings.json");
const ext = extname(fullPath);  // ".json"
const dir = dirname(fullPath);

Events

import { EventEmitter } from "@tsonic/nodejs/index.js";

class MyEmitter extends EventEmitter {}
const emitter = new MyEmitter();
emitter.on("data", (chunk) => console.log(chunk));

Crypto

import { createHash } from "node:crypto";

const hash = createHash("sha256").update("hello").digest("hex");
void hash;

Process

import * as process from "node:process";

const cwd = process.cwd();
void cwd;

HTTP

import { createServer } from "node:http";

const server = createServer((_req, res) => {
  res.writeHead(200, "OK");
  res.end("Hello from Tsonic!");
});

void server;

Imports (important)

For JS-surface projects with @tsonic/nodejs installed, prefer Node-style imports:

  • node:fs, node:path, node:crypto, node:process, ...
  • bare aliases (fs, path, crypto, ...) are also supported

Direct ESM imports from @tsonic/nodejs/index.js are still supported.

Relationship to @tsonic/js

  • @tsonic/js provides JavaScript runtime APIs (JS-style console, JSON, timers, etc.)
  • @tsonic/nodejs provides Node-style modules (fs, path, crypto, http, etc.)

Documentation

Naming Conventions

  • @tsonic/nodejs intentionally uses Node/JS-style naming (camelCase members).

Development

See __build/ for regeneration scripts.

Run the publish-gated validation suite with:

npm run selftest

When sibling @tsonic/* repos are checked out locally, the selftest installs those local packages first, whether they are versioned package repos (for example ../js/versions/10) or root-package repos (for example ../aspnetcore). That keeps the consumer validation coherent across a local release wave instead of mixing one local package with stale published transitive dependencies. The selftest also fails on peer-dependency warnings, so stale local release waves are caught before publish.

License

MIT