package.json-validator icon indicating copy to clipboard operation
package.json-validator copied to clipboard

🚀 Feature: Validate by repo name

Open hemanth opened this issue 11 years ago • 2 comments

var PJV=require('package-json-validator').PJV;
PJV.validate(repoName, spec, options);
psjv -r repoName

This is try to fetch the required package.json from the npmjs.org based on the repoName and validate it, will be very useful for scripts that are programatically validated list of repos.

hemanth avatar Oct 21 '14 10:10 hemanth

👋 @hemanth I know it's been almost a decade, but - are you still interested in this? I think it's an interesting idea but has some edge cases to cover:

  • What about monorepos?
  • Should regexes/wildcards be supported?

Also, the package doesn't yet make network calls right now. This would be the first usage of fetch/http/etc. My personal hunch is that that would probably be out of scope for what this offline-friendly CLI is meant to do. But maybe my hunch is wrong?

JoshuaKGoldberg avatar Mar 28 '24 12:03 JoshuaKGoldberg

👋 @JoshuaKGoldberg Feels like pervious life!

What about monorepos? We can provide a command line option to select the package.json of interest.

Should regexes/wildcards be supported? For the reponame? 🤔

offline-friendly CLI

If -r or says even -m <module_name> if provided should fetch and render?

hemanth avatar Mar 28 '24 14:03 hemanth