Skip to content

Compiling directories is broken in 14.x #49

@stevebest

Description

@stevebest

Running a simple cdbb http://localhost:5984 ./couchdb works fine in version 1.14.0, but is completely broken in 14.2.0.

Basically, despite what the docs say, CommonJS index.js modules at best make the cdbb explode, and at worst - create an unexpected document with a single field called index containing its source code, which is totally not what I want.

Project structure:

project
  couchdb
    mydb
      index.js

Contents of project/couchdb/mydb/index.js:

module.exports = { _id: "test", foo: "bar" };

couchdb-bootstrap@1.14.0 runs as expected, creating a mydb/test document.


couchdb-bootstrap@14.2.0 throws an error at index.js:130:

TypeError: Cannot use 'in' operator to search for '_id' in module.exports = {
    "_id": "test",
    "foo": "bar"
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions