Registry / database / east-couchdb

east-couchdb

JSON →
library1.0.2jsnpmunverified

An adapter for the East migration tool, providing CouchDB database support. Version 1.0.2 is the current stable release; the package is in maintenance mode with no recent updates. It allows running migrations against CouchDB by configuring connection via environment variables or a `.eastrc` file. Unlike generic database adapters, this is specifically tailored for East's migration workflow and supports CouchDB-specific features. The parsing for e mapping function name was changed in version 0.3.0 (field name changed from 'file' to 'name').

npm install east-couchdb
INSTALL
IMPORT
SIG · EAST-COUCHDB
E
east-couchdb
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.

require('east-couchdb')
✓ const eastCouchdb = require('east-couchdb');
✗ const eastCouchdb = require('east-couchdb').default;
Package uses CommonJS; no default export available.
east.registerAdapter
✓ east.registerAdapter('couchdb', eastCouchdb);
✗ east.registerAdapter(eastCouchdb);
First argument must be the adapter name string.
Configuration via .eastrc
✓ // In .eastrc: { "couchdb": { "url": "http://localhost:5984" } }
✗ // Using "couchdb" key with array instead of object
Configuration must be nested under "couchdb" key.

Shows how to configure east-couchdb, create a migration, and run it against a CouchDB instance.

// Install east and east-couchdb // npm install east east-couchdb // .eastrc { "couchdb": { "url": "http://localhost:5984" } } // Create a migration // east create add-users // In migrations/20230101000000-add-users.js module.exports = { up: async (db) => { await db.insert({ _id: 'user:1', name: 'Alice' }); }, down: async (db) => { await db.destroy('user:1'); } }; // Run migration // east migrate
Debug
Known issues
breakingIn version 0.3.0, the 'file' field in migration result was renamed to 'name'. Existing code reading 'file' will break.
fix
Update any code that reads the 'file' property to use 'name' instead.
affects: >=0.3.0
deprecatedThis package is in maintenance mode with no recent updates. Consider using an alternative if you need active development.
fix
Consider alternatives like migrate-couchdb or custom migration scripts.
affects: all
gotchaIf both environment variables and .eastrc configuration are provided, environment variables take precedence.
fix
Ensure consistent configuration; avoid mixing if unintended.
affects: all
gotchaThe adapter requires 'nano' to be installed as a peer dependency; it is not automatically installed.
fix
Run: npm install nano
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'nano'
Missing required peer dependency nano.
fix
Install nano: npm install nano
TypeError: east.registerAdapter is not a function
Trying to register adapter before east is initialized or using wrong import.
fix
Ensure east is required and registerAdapter is called on the east object: const east = require('east'); east.registerAdapter('couchdb', ...);
Configuration property 'couchdb' should be an object
.eastrc has invalid format for couchdb config.
fix
Ensure couchdb configuration is an object, e.g., { "couchdb": { "url": "..." } }
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
eastrequiredCore migration framework required; this adapter extends east's functionality.
nanorequiredCouchDB client library used for database operations.
Agent activity
13 hits · last 30 days
node
12
Resources
east-couchdb — npm install east-couchdb · libregistry