GLOSSARY
CommonJS
CommonJS is a module specification that is widely used in NodeJS and a few other platforms before the introduction of ESM. There are still a vast majority of libraries in the JavaScript ecosystem distribute in CommonJS format.
module file
Module file is a file with one or more top level import/export statements.
public API
Public API refers to the API exposed to the consumer.
For library, it means the functions and classes exposed in index.ts
.
script file
Script file is a file with no top level import/export statement.