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

@migration-preflight/adapters-sqlite

v0.2.0

Published

node:sqlite driver for migration-preflight: test your SQLite migrations with zero runtime dependencies.

Downloads

302

Readme

🪶 @migration-preflight/adapters-sqlite



The SQLite driver for migration-preflight. A migration that silently drops data usually only fails once it meets real data, and by then it already ran. This package is what lets that test run against SQLite.

Zero runtime dependencies: node:sqlite is a Node builtin, so testing your SQLite migrations never requires installing or configuring anything else.

flowchart LR
    Core["migration-preflight<br/>(replay engine)"] --> Sqlite["@migration-preflight/adapters-sqlite<br/>(node:sqlite)"]
    Sqlite --> Test["Your migrations,<br/>tested with real data"]

Install

pnpm add -D migration-preflight @migration-preflight/adapters-sqlite

Two entry points

So a consumer of the raw driver never has to install drizzle-orm / better-sqlite3:

| Import | Use it for | | ---------------------------------------------- | ------------------------------------------------------- | | @migration-preflight/adapters-sqlite | Seed-between-migrations tests, the one that matters | | @migration-preflight/adapters-sqlite/drizzle | Quick "does the whole history apply cleanly" smoke test |

// Seed-between-migrations test
import { createNodeSqliteMigrationDatabase } from "@migration-preflight/adapters-sqlite";
// Quick smoke test
import { runDrizzleBetterSqliteMigrations } from "@migration-preflight/adapters-sqlite/drizzle";

Usage

Works with any bundled migration source, Drizzle, Prisma, or plain SQL files:

import { createNodeSqliteMigrationDatabase } from "@migration-preflight/adapters-sqlite";
import { MigrationChain } from "migration-preflight";
import { drizzleFileSource, prismaFileSource, sqlFileSource } from "migration-preflight/sources";

const migrations = drizzleFileSource(join(import.meta.dirname, "out"));
// or: prismaFileSource(join(import.meta.dirname, "../prisma/migrations"))
// or: sqlFileSource(join(import.meta.dirname, "migrations"))

const chain = new MigrationChain(createNodeSqliteMigrationDatabase(), migrations);

await chain.applyAll();

No emulator, no device, no Docker, this runs in plain Node, as fast as any other test. See How-to § Pick a migration source for what each folder layout looks like.

📦 Packages

| Package | What it's for | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | | migration-preflight | Core: replay engine, ports | | @migration-preflight/adapters-sqlite | SQLite driver (node:sqlite) | | @migration-preflight/adapters-postgres | Postgres driver (PGlite) |

@migration-preflight/adapters-sqlite isn't linked above: that's this package.

📚 Documentation

Contributing

pnpm --filter @migration-preflight/adapters-sqlite test        # run the test suite
pnpm --filter @migration-preflight/adapters-sqlite typecheck   # type-check
pnpm --filter @migration-preflight/adapters-sqlite lint        # eslint

License

MIT