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

Searching arbitrary package.json (if not other root JSON file) fields #92

Open
brettz9 opened this issue Oct 8, 2019 · 1 comment
Open

Comments

@brettz9
Copy link

brettz9 commented Oct 8, 2019

npmjs is awesome, thanks!

Was wondering what the chances would be of your adding the ability to query arbitrary package.json properties (to find packages with their existence or with specific values, and ideally returning the packages and/or those values) across a registry (and do you support querying other registries)?

I'd love to be able to add or utilize generic service discovery mechanisms to package.json which worked with the fixed versioning nature of npm.

One use case I have is allowing packages to designate themselves as, say, being string manipulation functions, and then any tool, whether an extensible Atom context menu package or browser context menu tool, email program menu, etc., could provide discovery of any simple functions or suites of functions that will manipulate text (whether upper-casing, stripping entities, inserting the current date, etc.) without individual add-ons needing to reinvent the wheel for each environment.

(I specifically like the idea of leveraging the benefits of versioning in npm with the security features of deno so that tools could query npm registries to find deno-specific code which could be run locally without fear of escalating to network or file system privileges; without actually installing from npm, they could download the package.json designated deno file for string manipulation (downloading and extracting out of the tgz if the API couldn't itself just return a specific file) to cache for local execution by the tool.)

@brettz9
Copy link
Author

brettz9 commented Oct 8, 2019

FWIW, I see https://github.com/hughsk/npm-stats lets you get an arbitrary package.json field, but only if you know the package ahead of time.

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

1 participant