couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson (JIRA)" <>
Subject [jira] Commented: (COUCHDB-658) Add CommonJS style modules to the view server
Date Thu, 18 Feb 2010 21:59:27 GMT


Chris Anderson commented on COUCHDB-658:

I'd say the additional code is well worth it.

I hadn't thought about relative require, but I think that will also not be so hard.

And I'd suggest again that "the conceptual module name space root" should be the ddoc, so
we can require things outside of ddoc.modules.

If we say that the root is ddoc.modules then we are suddenly giving a weird sense of security
guarantees (some crazy person might get the idea that data in eg ddoc.secret can't be accessed
from shows and lists, or something...)

I think if we fail hard when someone tries to require("views/foo/reduce") that's just fine,
although it'd be nice to give a helpful error message.

> Add CommonJS style modules to the view server
> ---------------------------------------------
>                 Key: COUCHDB-658
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: JavaScript View Server
>         Environment: CouchDB
>            Reporter: mikeal
>         Attachments: require.patch
> I have a patch that adds CommonJS module support to all ddoc aware view server functions
(everything except map/reduce/rereduce).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message