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

@savvy-web/bun-builder

v0.7.0

Published

Bun-based build system for Node.js libraries with automatic package.json transformation, TypeScript declaration bundling, and multi-target support

Downloads

537

Readme

@savvy-web/bun-builder

npm version License: MIT Bun

Build TypeScript libraries in milliseconds with Bun's native bundler. Automatic entry detection from package.json, rolled-up .d.ts declarations, and catalog:/workspace: resolution for monorepo publishing -- zero configuration required.

Features

  • Sub-Second Builds -- Bun's native bundler for fast iteration cycles
  • Zero Configuration -- Auto-detects entry points from package.json exports
  • Bundled or Bundleless -- Single-file bundles with rolled-up .d.ts, or preserve source structure with raw declarations
  • TSDoc Warnings -- API Extractor TSDoc warnings reported with source locations; configurable severity
  • Catalog Resolution -- Resolves Bun catalog: and workspace: protocols for npm publishing
  • Multi-Target Publishing -- Single config produces dev and npm builds; all artifacts are copied to each publishConfig.targets directory

Installation

bun add -D @savvy-web/bun-builder

Peer Dependencies

bun add -D @microsoft/api-extractor @typescript/native-preview typescript @types/bun

Quick Start

Create a bun.config.ts file in your project root:

import { BunLibraryBuilder } from '@savvy-web/bun-builder';

export default BunLibraryBuilder.create({});

Run the build:

bun run bun.config.ts                  # Build all targets
bun run bun.config.ts --env-mode dev   # Dev build only
bun run bun.config.ts --env-mode npm   # npm build only

Defaults

The builder ships with sensible defaults -- most projects need no configuration:

| Option | Default | Description | | --- | --- | --- | | bundle | true | Bundled output with rolled-up .d.ts via API Extractor | | splitting | true (multi-entry) / false (single-entry) | Code splitting for shared modules between entry points | | apiModel | true | API model generation for the npm target | | tsdoc.warnings | "fail" (CI) / "log" (local) | TSDoc warning severity |

Bundleless Mode

Set bundle: false to preserve the source directory structure in output. Files are compiled individually instead of bundled, and raw .d.ts files are emitted directly (no DTS rollup). API model generation still works if enabled. Test files (.test.ts, .spec.ts) and __test__/__tests__ directories are automatically excluded from declaration output via import graph analysis.

import { BunLibraryBuilder } from '@savvy-web/bun-builder';

export default BunLibraryBuilder.create({
  bundle: false,
});

TSDoc Warnings

API Extractor TSDoc warnings are collected and reported with source file and line information. Control the behavior with the tsdoc.warnings option:

import { BunLibraryBuilder } from '@savvy-web/bun-builder';

export default BunLibraryBuilder.create({
  apiModel: {
    tsdoc: {
      warnings: 'fail',  // 'fail' | 'log' | 'none'
    },
  },
});
  • "fail" -- Fail the build on TSDoc warnings (default in CI)
  • "log" -- Log warnings but continue (default locally)
  • "none" -- Suppress warnings entirely

For fine-grained control, use suppressWarnings to silence specific messages:

export default BunLibraryBuilder.create({
  apiModel: {
    suppressWarnings: [
      { messageId: 'ae-forgotten-export', pattern: '_InternalHelper' },
      { pattern: '^Analysis will use' },
    ],
  },
});

TypeScript Configuration

The package includes a base tsconfig optimized for ESM library builds:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@savvy-web/bun-builder/tsconfig/ecma/lib.json"
}

Documentation

For configuration options, API reference, and advanced usage:

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT