CommonJS


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 and a list of implementations on a MediaWiki site. All editing activities have ceased since November 2014, marking the effective end of its life.

History

The project was started by Mozilla engineer Kevin Dangoor in January 2009 and initially named ServerJS.
In August 2009, the project was renamed CommonJS to show the broader applicability of the APIs. Specifications are created and approved in an open process. A specification is only considered final after it has been finished by multiple implementations. CommonJS is not affiliated with the Ecma International group TC39 working on ECMAScript, but some members of TC39 participate in the project.
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.

Specifications

The list of specifications includes:

Current

Proposals

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 is assigned a new letter. When the main direction is known it starts being assigned numeric versions.

Implementations