commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter

Home Page:http://commitizen.github.io/cz-cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ownership of find-node-modules

callumacrae opened this issue · comments

Hey!

I'm the maintainer of find-node-modules, and commitizen is… pretty much the only project using it as a dependency! I haven't used it myself in years and every time people open an issue about a vulnerable dependency, they're using it via this project.

Would commitizen be interested / up for taking ownership of the package? I feel like I've been neglecting it a bit.

I'd be happy to either transfer it to the commitizen org or add some maintainers, whatever works for you :)

Looking at our code, we are actually just grabbing the first match:

/**
* Gets the nearest npm_modules directory
*/
function getNearestNodeModulesDirectory (options) {
// Get the nearest node_modules directories to the current working directory
let nodeModulesDirectories = findNodeModules(options);
// Make sure we find a node_modules folder
/* istanbul ignore else */
if (nodeModulesDirectories && nodeModulesDirectories.length > 0) {
return nodeModulesDirectories[0];
} else {
console.error(`Error: Could not locate node_modules in your project's root directory. Did you forget to npm init or npm install?`)
}
}

So the best for cz-cli would be to just call findup-sync directly (or potentially find-up which seems to be more popular).