CommonJS

CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers (e.g. on web servers or native desktop applications).

Uses your system voice; voice and rate in settings.

≈ 8 min read

Cite, export and learn8 citation formats · 8 exports · lesson and quiz

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers (e.g. on web servers or native desktop applications).

CommonJS's specification of how modules should work is widely used today for server-side JavaScript with Node.js.[1] It is also used for browser-side JavaScript, but that code must be packaged with a transpiler since browsers don't support CommonJS.[1] The other major module specification in use is the ECMAScript (ES) modules specification (ES6 modules aka ES2015 modules).[2] CommonJS can be recognized by the use of the require() function and module.exports, while ES modules use import and export statements for similar (though not identical) functionality.

  • 3 Implementations
  • 4 See also
  • 5 References
  • 6 External links
  • History

    edit edit source

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

    What I’m describing here is not a technical problem. It’s a matter of people getting together and making a decision to step forward and start building up something bigger and cooler together.

    — Kevin Dangoor[3]

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

    Specifications

    edit edit source

    The list of specifications includes:[7]

    Current

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

    Proposals

    edit edit source

    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

    Implementations

    edit edit source

    See also

    edit edit source

    References

    edit edit source
    1. ^ a b Eric Elliott (26 June 2014). Programming JavaScript Applications: Robust Web Architecture with Node, HTML5, and Modern JS Libraries. O'Reilly Media, Inc. pp. 87–. ISBN 978-1-4919-5027-2. Wikipedia revision 1376201317, retrieved 2026-11-20
    2. ^ Mario Casciaro; Luciano Mammino (29 July 2020). Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques, 3rd Edition. Packt Publishing. p. 62. ISBN 978-1-83921-044-0. Wikipedia revision 1376201317, retrieved 2026-11-20
    3. ^ a b "What Server Side JavaScript needs ·". www.blueskyonmars.com. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    4. ^ "CommonJS: JavaScript Standard Library". www.commonjs.org. Archived from the original on 2017-11-13. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    5. ^ "ProposalProcess - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    6. ^ "CommonJS: the First Year ·". www.blueskyonmars.com. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    7. ^ "JavaScript Standard Library". CommonJS. Archived from the original on 2014-05-28. Retrieved 2014-05-28. Wikipedia revision 1376201317, retrieved 2026-11-20
    8. ^ "olegp/common-node @ GitHub". olegp.github.io. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    9. ^ "CommonJS Compiler - makes your Common JS modules suitable for in-browser use". dsheiko.github.io. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    10. ^ "GitHub - DrBenton/CommonJSForPHP: A simple CommonJS spec implementation for PHP 5.3+". GitHub. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    11. ^ "Implementations/CouchDB - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    12. ^ "Flusspferd - CommonJS platform | Javascript bindings for C". Archived from the original on 2013-01-28. Retrieved 2017-09-19. Wikipedia revision 1376201317, retrieved 2026-11-20
    13. ^ "Implementations/GPSEE - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    14. ^ "Implementations/Smart - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    15. ^ "Homepage - JSBuild". Archived from the original on January 4, 2011. Wikipedia revision 1376201317, retrieved 2026-11-20
    16. ^ "The most popular database for modern apps". MongoDB. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    17. ^ "Implementations/Narwhal - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    18. ^ "Implementations/node.js - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    19. ^ "Implementations/Persevere - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    20. ^ "GitHub - pinf/loader-js: EARLY STALLED EXPLORATION". GitHub. 30 July 2021. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    21. ^ "Distributive-Network/PythonMonkey: A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment". GitHub. 2023-07-07. Retrieved 2023-07-10. Wikipedia revision 1376201317, retrieved 2026-11-20
    22. ^ "Implementations/RingoJS - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    23. ^ "SilkJS WWW Site". Archived from the original on 2017-09-12. Retrieved 2012-10-19. Wikipedia revision 1376201317, retrieved 2026-11-20
    24. ^ "Implementations/SproutCore - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    25. ^ "Implementations/TeaJS - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    26. ^ SAS, Wakanda. "Wakanda FullStack JavaScript Platform". Wakanda FullStack JavaScript Platform. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    27. ^ "Google Code Archive - Long-term storage for Google Code Project Hosting". code.google.com. Retrieved 2021-08-05. Wikipedia revision 1376201317, retrieved 2026-11-20
    edit edit source ECMAScriptDialects Engines Frameworks People Other Lists: JavaScript libraries • Ajax frameworks • Server-side JavaScript
    Comparison: JavaScript web frameworks Node.jsPlatform Packaging Frameworks Libraries Languages JavaScriptCode analysis Subsets, supersets Transpilers Concepts Debuggers Documentation generators Engines Frameworks Related technologies Package managers Module bundlers Server-side Unit testing frameworks (list) People

    Text derived from https://en.wikipedia.org/w/index.php?oldid=1376201317 under CC BY-SA 4.0; modifications have been made.

    Words in each sectionSpecificationsSpecificationsSpecifications: 198 words198ImplementationsImplementationsImplementations: 141 words141HistoryHistoryHistory: 130 words130See alsoSee alsoSee also: 33 words33
    Words in each section. Measured from the stored article body; sections below the minimum are not plotted.

    Provenance

    snapshot enwiki-001376201317 · captured 2026-09-22 · ledger · version history

    Cite this page as: encyclopegia.org, “CommonJS”, snapshot enwiki-001376201317. https://encyclopegia.org/a/commonjs