From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

CommonJS was a project with the goal to establish conventions on module ecosystem for JavaScript outside of the web browser. The primary reason for its creation was a major lack of commonly accepted form of JavaScript scripts module units which could be reusable in environments different from that provided by a conventional web browser e.g. web server or native desktop applications which run JavaScript scripts.

CommonJS maintains specifications (including drafts) and a list of implementations on a MediaWiki site. All editing activities have ceased since November 2014, marking the effective end of its life.[1]


The project was started by Mozilla engineer Kevin Dangoor in January 2009 and initially named ServerJS.[2]

In August 2009, the project was renamed CommonJS to show the broader applicability of the APIs.[3] Specifications are created and approved in an open process. A specification is only considered final after it has been finished by multiple implementations.[4] CommonJS is not affiliated with the Ecma International group TC39 working on ECMAScript, but some members of TC39 participate in the project.[5]

In May 2013, Isaac Z. Schlueter, the author of npm, the package manager for Node.js, said CommonJS is being made obsolete by the now-dominant Node.js, and is avoided by the core Node.js developers.[6]


The list of specifications includes:[7]


  • Modules/1.0 (Superseded by Modules/1.1)
  • Modules/1.1
  • Modules/1.1.1
  • Packages/1.0
  • System/1.0


The proposals cover much more than modules. They intend to define a set of APIs that are useful both for non-web JavaScript implementations, with standardized package names to provide interoperability within the ecosystem. This goal sometimes overlaps with that of TC39, and parts such as Promises have indeed made it into ECMAScript itself.

The part after the slash is the version. When a proposal is in contention, each individual proposal (including sequential revisions from the same author) is assigned a new letter. When the main direction is known it starts being assigned numeric versions.

  • Binary/B,F
  • Console (ported from Web)
  • Encodings/A,C
  • Encodings/A
  • HTTP Client/B
  • IO/A
  • Filesystem/A,A/0
  • Modules/Async/A
  • Modules/AsynchronousDefinition
  • Modules/LoaderPlugin
  • Modules/Resources
  • Modules/SimpleAsynchronous
  • Modules/Transport/B,C,D,E
  • Modules/Wrappings
  • Modules/Wrappings-Explicit-Dependencies
  • Packages/1.1
  • Packages/AsynchronousDefinition
  • Packages/Mappings/A,B,C,D
  • Promises/B,D
  • Unit Testing/B,1.0,1.0.1


See also[edit]


  1. ^ "Recent changes". CommonJS Spec Wiki.
  2. ^ a b What Server Side JavaScript needs - Blue Sky On Mars
  3. ^ CommonJS: JavaScript Standard Library
  4. ^ ProposalProcess - CommonJS Spec Wiki
  5. ^ CommonJS: the First Year - Blue Sky On Mars
  6. ^ Schlueter, Isaac Z. (25 Mar 2013). "Forget CommonJS. It's dead. **We are server side JavaScript.**". GitHub.
  7. ^ "JavaScript Standard Library". CommonJS. Archived from the original on 2014-05-28. Retrieved 2014-05-28.CS1 maint: unfit url (link)
  8. ^ Server-side JavaScript development and hosting - Akshell
  9. ^ olegp/common-node @ GitHub
  10. ^ - GitHub
  11. ^ DrBenton/CommonJSForPHP - GitHub
  12. ^ Implementations/CouchDB - CommonJS Spec Wiki
  13. ^ Flusspferd - CommonJS platform | Javascript bindings for C
  14. ^ Implementations/GPSEE - CommonJS Spec Wiki
  15. ^ Implementations/Smart - CommonJS Spec Wiki
  16. ^ Homepage - JSBuild Archived 2011-01-04 at the Wayback Machine
  17. ^ MongoDB
  18. ^ Implementations/Narwhal - CommonJS Spec Wiki
  19. ^ Implementations/node.js - CommonJS Spec Wiki
  20. ^ Implementations/Persevere - CommonJS Spec Wiki
  21. ^ pinf/loader-js - GitHub
  22. ^ Implementations/RingoJS - CommonJS Spec Wiki
  23. ^ SilkJS WWW Site
  24. ^ Implementations/SproutCore - CommonJS Spec Wiki
  25. ^ Implementations/TeaJS - CommonJS Spec Wiki
  26. ^ Wakanda
  27. ^ xuljet - XUL JavaScript Enhanced Toolkit - Google Project Hosting

External links[edit]