Analyzes the type field from package.json.
The type field determines whether .js files are treated as
ES modules ("module") or CommonJS ("commonjs", the default).
Summary
Functions
Checks if the package uses CommonJS.
Checks if a package is a dual CJS/ESM package.
Checks if the package uses ES modules.
Returns the type field value (default: "commonjs").
Determines the module system for a given file path.
Returns the counts of ESM vs CJS packages.
Functions
Checks if the package uses CommonJS.
Checks if a package is a dual CJS/ESM package.
Checks if the package uses ES modules.
Returns the type field value (default: "commonjs").
Determines the module system for a given file path.
Returns the counts of ESM vs CJS packages.