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

@launchql/migrate

v2.4.0

Published

LaunchQL Migrate

Readme

@launchql/migrate

A TypeScript-based database migration system for PostgreSQL that replaces Sqitch with a native implementation.

Features

  • Native TypeScript: No external dependencies on Sqitch
  • PostgreSQL-based state tracking: All migration state is stored in the database
  • Dependency management: Supports change dependencies
  • Verification support: Built-in support for verify scripts
  • Import from Sqitch: Can import existing Sqitch deployments
  • Drop-in replacement: Compatible with existing Sqitch plan files

Installation

npm install @launchql/migrate

Usage

As a Library

import { LaunchQLMigrate } from '@launchql/migrate';

const migrate = new LaunchQLMigrate({
  host: 'localhost',
  port: 5432,
  user: 'postgres',
  password: 'password',
  database: 'postgres'
});

// Deploy changes
const deployResult = await migrate.deploy({
  project: 'myproject',
  targetDatabase: 'myapp',
  planPath: './launchql.plan'
});

// Revert changes
const revertResult = await migrate.revert({
  project: 'myproject',
  targetDatabase: 'myapp',
  planPath: './launchql.plan'
});

// Verify deployment
const verifyResult = await migrate.verify({
  project: 'myproject',
  targetDatabase: 'myapp',
  planPath: './launchql.plan'
});

// Check status
const status = await migrate.status('myproject');

// Import from existing Sqitch deployment
await migrate.importFromSqitch();

// Don't forget to close the connection
await migrate.close();

As a Drop-in Replacement for Sqitch

import { deployCommand, revertCommand, verifyCommand } from '@launchql/migrate';

const config = {
  host: 'localhost',
  port: 5432,
  user: 'postgres',
  password: 'password'
};

// Replace spawn('sqitch', ['deploy', 'db:pg:mydb'])
await deployCommand(config, 'mydb', '/path/to/project');

// Replace spawn('sqitch', ['revert', 'db:pg:mydb'])
await revertCommand(config, 'mydb', '/path/to/project');

// Replace spawn('sqitch', ['verify', 'db:pg:mydb'])
await verifyCommand(config, 'mydb', '/path/to/project');

Migration Schema

The migration system creates a launchql_migrate schema in your PostgreSQL database with the following tables:

  • projects: Tracks migration projects
  • changes: Records deployed changes with their script hashes
  • dependencies: Tracks change dependencies
  • events: Logs deployment events (deploy, revert, fail)

Plan File Format

The system is compatible with Sqitch plan files:

%syntax-version=1.0.0
%project=myproject
%uri=https://github.com/myorg/myproject

schema 2024-01-01T00:00:00Z developer <[email protected]> # Create schema
users [schema] 2024-01-02T00:00:00Z developer <[email protected]> # Create users table
posts [users] 2024-01-03T00:00:00Z developer <[email protected]> # Create posts table

Differences from Sqitch

  1. State Storage: Migration state is stored in PostgreSQL instead of a separate registry
  2. No Tags: The system doesn't support Sqitch tags (yet)
  3. Simplified Events: Event logging is minimal compared to Sqitch
  4. Script Hashing: Uses SHA256 for script content hashing
  5. Native TypeScript: No need to install Sqitch or Perl

License

See LICENSE in the root of the repository.