Migoose is a migration toolkit for Mongoose, current stable version 0.2.4. It solves the problem of bundling migration files with tools like @vercel/ncc by generating migration code that is imported directly into the codebase, rather than globbing at runtime. Key differentiators: supports TypeScript, no 'down' migrations, uses Mongoose's connection. Release cadence is irregular; it is a young project with limited adoption.
npm install migooseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a migration via CLI and then programmatically run migrations using the Migoose.migrate() function with a mongoose instance.
Write a new migration to revert the previous changes; no automatic rollback.
Ensure your migration files are imported into your application's entry point before calling Migoose.migrate().
Set "type": "module" in package.json and use import/export syntax.
Install with `npm install migoose` (not --save-dev).
Run `npm install migoose` (not --save-dev) and if using CommonJS, switch to ES modules or use dynamic import.
Use import { Migoose } from 'migoose' not import Migoose from 'migoose'.