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

pandadb-node

v0.1.2

Published

Official Node.js SDK for PandaDB - A high-performance, API-first database service

Readme

PandaDB Node.js SDK - Development Guide

This guide explains how to build and publish the PandaDB Node.js SDK.

Development Setup

  1. Clone the repository:
git clone <your-repo-url>
cd sdk
  1. Install dependencies:
npm install

Building the SDK

  1. Run the build command:
npm run build

This will:

  • Clean the dist directory
  • Compile TypeScript to JavaScript
  • Generate type declaration files
  • Create source maps

The build output will be in the dist directory:

  • dist/*.js - Compiled JavaScript files
  • dist/*.d.ts - TypeScript declaration files
  • dist/*.map - Source maps

Testing

  1. Run tests:
npm test
  1. Run linting:
npm run lint
  1. Format code:
npm run format

Publishing to npm

  1. Login to npm:
npm login
  1. Update version (choose one):
npm version patch  # For bug fixes (0.0.x)
npm version minor  # For new features (0.x.0)
npm version major  # For breaking changes (x.0.0)
  1. Build and publish:
npm run build
npm publish

The package will be published as @pandadb/node.

Development Workflow

  1. Make changes to files in src/
  2. Run tests: npm test
  3. Run linting: npm run lint
  4. Build: npm run build
  5. Test the built package:
    # In another project
    npm install ../path/to/sdk

Package Structure

sdk/
├── src/
│   ├── client.ts      # Main SDK implementation
│   ├── types.ts       # TypeScript type definitions
│   ├── errors.ts      # Error handling classes
│   └── index.ts       # Public API exports
├── package.json       # Package configuration
└── tsconfig.json      # TypeScript configuration

Local Testing

To test the SDK locally in another project:

  1. In the SDK directory:
npm run build
npm pack
  1. In your test project:
npm install ../path/to/pandadb-node-0.1.0.tgz

Continuous Integration

Before publishing:

  1. Ensure all tests pass
  2. Check linting
  3. Verify the build works
  4. Test the package locally

Publishing Checklist

  • [ ] Update version in package.json
  • [ ] Run tests
  • [ ] Run linting
  • [ ] Build the package
  • [ ] Test the built package locally
  • [ ] Update README if needed
  • [ ] Commit all changes
  • [ ] Create git tag
  • [ ] Push to repository
  • [ ] Publish to npm

Example Usage

After publishing, users can install the package:

npm install @pandadb/node

And use it in their code:

import { PandaDB } from '@pandadb/node';

const client = new PandaDB({
  token: 'YOUR_AUTH_TOKEN'
});

// Execute a query
const result = await client.query(
  'db_123abc',
  'SELECT * FROM users WHERE age > ?',
  [18]
);

// Use real-time subscriptions
const unsubscribe = client.subscribe(
  'db_123abc',
  'users',
  {
    onCreate: (user) => console.log('New user:', user),
    onUpdate: (user) => console.log('Updated user:', user),
    onDelete: (id) => console.log('Deleted user:', id)
  }
);

// Clean up when done
unsubscribe();

Troubleshooting

Common issues:

  1. Build errors:

    • Run npm install to ensure all dependencies are installed
    • Check TypeScript errors in your IDE
    • Run npm run lint to find issues
  2. Publishing errors:

    • Ensure you're logged in to npm: npm login
    • Check if the package name is available
    • Verify you have publish access to the @pandadb organization
  3. Type errors:

    • Check that all types are properly exported in index.ts
    • Verify tsconfig.json settings
    • Ensure declaration files are generated

Support

For any issues:

  1. Check the troubleshooting guide
  2. Run tests and linting
  3. Contact the PandaDB team