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

@feedbackfruits/east-mongo

v2.0.0

Published

Mongodb adapter for east, the Node.js migration tool

Readme

east-mongo

npm

[!NOTE] This is a fork of okv/east-mongo, rewritten in TypeScript and kept up to date with current MongoDB driver versions.

A MongoDB adapter for east, the Node.js database migration tool. It uses the MongoDB Node.js driver under the hood and passes a pre-connected MongoClient instance directly into each migration.

Executed migration names are tracked in a _migrations collection in the target database, with each document's _id set to the migration name.

A default migration template is included at migrationTemplates/async.ts and will be used automatically unless you override it. To use a custom template, set template in your .eastrc:

module.exports = {
  template: require.resolve('@feedbackfruits/east-mongo/migrationTemplates/async.ts')
}

or in TypeScript:

export default {
  template: require.resolve('@feedbackfruits/east-mongo/migrationTemplates/async.ts')
}

Compatibility

east-mongo targets the current, active, and maintenance releases of Node.js — currently tested against versions 22 and 24.

For MongoDB, we follow the official driver support matrix:

The minimum supported MongoDB server version is 7.0 and the minimum supported driver version is 5.7.

Installation

mongodb is a peer dependency, so install it alongside east and this adapter:

npm install east @feedbackfruits/east-mongo mongodb
yarn add east @feedbackfruits/east-mongo mongodb
pnpm add east @feedbackfruits/east-mongo mongodb

Usage

Create an .eastrc file at the root of your project:

{
	"adapter": "@feedbackfruits/east-mongo",
	"url": "mongodb://localhost:27017/test"
}

You can also pass the adapter and URL directly via the CLI:

east migrate --adapter @feedbackfruits/east-mongo --url $MONGODB_URI

To run TypeScript migrations, use tsx:

npm install -DE tsx
tsx node_modules/east/bin/east.js migrate --adapter @feedbackfruits/east-mongo --url $MONGODB_URI --migration-extension ts

url should be a valid MongoDB connection string. For all available options, see the MongoClientOptions reference.

Migrations created with the default template look like:

import type { MongoClient } from 'mongodb';

exports.tags = [];

exports.migrate = async (client: MongoClient) => {
  // Migration definition
};

exports.rollback = async (client: MongoClient) => {
  // Rollback definitions
};

For more on running and managing migrations, see the east CLI usage and library usage docs.