Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership of find-node-modules #863

Open
callumacrae opened this issue Nov 19, 2021 · 1 comment
Open

Ownership of find-node-modules #863

callumacrae opened this issue Nov 19, 2021 · 1 comment

Comments

@callumacrae
Copy link

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 :)

@LinusU
Copy link
Contributor

LinusU commented Nov 23, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants