CommonJS
From CommonJS Spec Wiki
Welcome to CommonJS, a group with a goal of building up the JavaScript ecosystem for web servers, desktop and command line apps and in the browser.
This wiki is a starting point for collecting up ideas, links and any draft API suggestions for the CommonJS group. Discussions occur on that mailing list and on IRC (#commonjs on freenode).
Contents |
Meta
Current Efforts
This is a list of issues currently being discussed / standardized. They come from the "Low level" department, as we need to have a solid basics prior to building a tower.
- Uniform Baseline / Globals (discussion)
- Modules (1.1.1)
-
binary: Binary Data Objects (byte arrays and/or strings) (proposals, discussion, early implementations) -
encodings: Encodings and character sets (proposals, discussion, early implementations) -
io: I/O Streams (proposals, discussion) -
fs,fs-base: Filesystem (proposals, discussion, early implementations) -
system: System Interface (stdin, stdout, stderr, &c) (1.0, amendments proposed) -
assert,test: Unit Testing (1.0, amendment proposals pending) -
sockets: Socket I/O TCP/IP sockets (early proposals) -
event-queue: Reactor Reactor/Event Queue (early proposals) -
worker: Worker Worker (concurrent shared nothing process/thread) (proposal) -
console: console (proposal)
-
- Packages (1.0)
- Web Server Gateway Interface (JSGI) (proposals, discussion, early implementations)
- Promises (proposal)
Future Efforts
Low-level APIs
This is the collection of APIs that we'd like to see behaving consistently across JavaScript interpreters.
- Language and Runtime Services
- Logging
- Relational database interface
- ResultSets (collections of data maybe from RDBMS, maybe from other sources)
- Concurrency
- String / ByteString I/O
- C unified API to our Target Platforms
- Subprocesses (popen)
High-level APIs
This is the collection of APIs that implement common functionality on top of the low-level API.
Implementations
| Implementations | Standards | Proposals and standards in development | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Modules/1.0 | Modules/1.1 | Modules/1.1.1 | Packages/1.0 | System/1.0 | Binary/B | Console | Encodings/A | Filesystem/A | Filesystem/A/0 | HTTP Client/B | Modules/Async/A | Modules/Transport/C | Modules/Transport/D | Promises/B | Unit Testing/1.0
| |
| CouchDB | yes | yes | ||||||||||||||
| Ejscript | 2.x | |||||||||||||||
| Flusspferd | yes | 0.9 | yes | yes | yes | yes | yes | |||||||||
| GPSEE | yes | yes | yes | yes | yes | |||||||||||
| Narwhal | 0.1 | 0.2 | 0.2 | 0.5 | 0.2 | |||||||||||
| Narwhal on JSC | 0.2 | 0.2 | ||||||||||||||
| Narwhal on Node | 0.5 | 0.5 | 0.5 | 0.5 | ||||||||||||
| Narwhal on Rhino | 0.2 | 0.2 | draft 4 in 0.1 | 8a45686 | ||||||||||||
| Persevere | yes | ? | ||||||||||||||
| RingoJS | yes | yes | yes | yes | minus globbing | yes | yes | |||||||||
| Smart Platform | yes | |||||||||||||||
| SproutCore 1.1/Tiki | yes | ? | yes | yes | ||||||||||||
| Wakanda | yes | yes | yes | yes | yes | yes | yes | |||||||||
| Yabble | yes | yes | yes | yes | yes | |||||||||||
| node.js | yes | yes | ||||||||||||||
| v8cgi | yes | yes | yes | yes | yes | |||||||||||
In development:
- mob is implementing SecurableModules in Ejscript http://www.ejscript.org
- pmuellr posted a sample loader for SecurableModules: http://wiki.github.com/pmuellr/modjewel
- atul varma has a SecurableModule implementation for Python/Spidermonkey: http://hg.toolness.com/pydertron/raw-file/tip/docs.html
- Alexandre implements several commonJS standards in Wakanda (SquirrelFish) http://www.wakandasoft.com
- Franky Braem tries to implement several commonJS standards in GLUEscript: http://gluescript.sf.net.
- Titanium is in the process of adding support for CommonJS. http://www.appcelerator.com
Tests
- CommonJS tests compatible with this test framework.

