Skip to content

Releases: edvinh/node-sloc

v0.2

20 Mar 23:35
Compare
Choose a tag to compare

Release v0.2.0

This release includes a few improvements and breaking changes, the most notable ones being:

  • Full TypeScript support
  • A build system for compiling, linting, and formatting TS
  • Hooks for running tests and linting before commit & push
  • Support for both ES Modules & CommonJS
  • Glob support for ignorePaths
  • New sloc alias for running node-sloc as a CLI

Breaking changes

  • Dropped support for node <8.
  • sloc(opts) now returns null if no files matched the specified path. The previous behavior was to return an object with an empty path array and an empty sloc object: {path: [], sloc: {}}.
  • The returned object from sloc(opts) has no nesting anymore. It now returns a SLOCResult containing 6 fields:
{
  loc: number; 
  sloc: number;
  blank: number;
  comments: number;
  paths: string[];
  files: number;
}