Skip to content

2.1.0

Compare
Choose a tag to compare
@obahareth obahareth released this 02 Jun 09:28
· 34 commits to master since this release
9864b2e
  • #40 - Return a non-zero exit code when ES6+ packages are detected.
  • #39 - Typeify ModulesChecker's checkModules return value.

If you were using this package as a library and not just the CLI:
This typeificaiton also changed the return value to match what was on the README when 2.0.0 was originally released, e.g. you should now use it as so:

const result = checkModules({
  path: '', // Automatically find up package.json from cwd
  checkAllNodeModules: true,
  ignoreBabelAndWebpackPackages: true
})

/** Returns the regexp including all es6 modules */
const es6IncludeRegExp = buildIncludeRegexp(result.es6Modules)

/** Returns the regexp excluding all es6 modules */
const es6ExcludeRegexp = buildExcludeRegexp(result.es6Modules)

result is now an object that contains 3 arrays, ignored, es5Modules, and es6Modules.