Registry / database / firemorph

firemorph

JSON →
library1.0.2jsnpmunverified

Firestore migration tool (v1.0.2, beta pre-release) for managing schema changes in Firestore databases. Provides a CLI to create, run, and rollback migrations with batch operations. Key differentiators: lightweight (53KB minzip), TypeScript-first, supports Firebase Emulator for local testing. Caution: still prerelease and subject to breaking changes. Distributed via npm as ESM package.

npm install firemorph
INSTALL
IMPORT
SIG · FIREMORPH
F
firemorph
databasejavascriptv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

firemorph
✓ import { firemorph } from 'firemorph'
✗ const firemorph = require('firemorph')
ESM-only; named export. TypeScript types included.
Migration
✓ import { Migration } from 'firemorph'
✗ import Migration from 'firemorph'
Named export for defining migration functions.
FirestoreMigration
✓ import type { FirestoreMigration } from 'firemorph'
✗ const { FirestoreMigration } = require('firemorph')
Type-only import for TypeScript users.

Initialize a migration directory, create a new migration file, and apply pending migrations using CLI commands.

npx firemorph init npx firemorph create my_migration npx firemorph up
Debug
Known issues
breakingPre-release: breaking changes may occur in minor/patch versions before 1.0.0 stable.
fix
Pin to exact version or use lockfile.
affects: <1.0.0
gotchaFirestore batch write limit of 500 operations per batched write, enforce in migration batches.
fix
Break migrations into batches under 500 writes.
affects: all
gotchaEnvironment variables FIRESTORE_EMULATOR_HOST and GCLOUD_PROJECT required for local testing.
fix
Set FIRESTORE_EMULATOR_HOST='localhost:8080' and GCLOUD_PROJECT='your-project-id'.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'firemorph'
Using CommonJS require() on ESM-only package.
fix
Use import syntax or set 'type': 'module' in package.json.
Error: FIRESTORE_EMULATOR_HOST not set
Missing environment variable for local emulator.
fix
Set FIRESTORE_EMULATOR_HOST='localhost:8080' before running firemorph.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
firebase-adminrequiredrequired for Firestore interactions
commanderrequiredCLI argument parsing
Agent activity
7 hits · last 30 days
node
6
Resources
firemorph — npm install firemorph · libregistry