ts-fireway is a schema migration tool for Firestore, inspired by Flyway. Current stable version is 1.1.2, released as an npm package with no regular cadence. It provides a CLI to apply migration files (JS or TS) to Firestore, with support for dry-run, custom migration paths, project IDs, and Firestore emulator. Key differentiators: TypeScript-first with full type definitions, simple file-naming convention based on semver, and integration with Firebase Admin SDK. It is best suited for developers who want a lightweight, declarative migration workflow for Firestore without heavy ORM dependencies.
npm install ts-firewayNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a simple migration file and run it via CLI with project ID.
Rename file to match pattern, e.g., v1.0.0__initial.js
Set GOOGLE_APPLICATION_CREDENTIALS to the path of your service account JSON file, or start emulator and set FIRESTORE_EMULATOR_HOST.
Ensure migration scripts are idempotent or avoid side effects in dry-run.
Install compatible firebase-admin version (check peerDependencies if any).
Run 'npm install -g ts-fireway' or use 'npx ts-fireway'.
Rename to 'v1.0.0__test.js' (or .ts).
Use 'module.exports.migrate = async ({firestore}) => { ... }' for JS, or 'export async function migrate(...)' for TS.