We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider using libnpm instead of spawning npm process in npm plugin
Every piece of information that is currently used by npm plugin can be acquired through libnpm without using npm cli directly.
versions property is sorted by npm cli view command (https://github.com/npm/cli/blob/656bce7dd0f9753a273912e803261ed246593924/lib/view.js#L50)
const packument = require('libnpm/packument'); const semver = require('semver'); packument('libnpm', { fullMetadata: true }).then((data) => { const distTags = data["dist-tags"] || {}; console.log({ name: data.name, description: data.description, latestVersion: distTags.latest, nextVersion: distTags.next, versions: Object.keys(data.versions).sort(semver.compareLoose), }); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider using libnpm instead of spawning npm process in npm plugin
Every piece of information that is currently used by npm plugin can be acquired through libnpm without using npm cli directly.
versions property is sorted by npm cli view command (https://github.com/npm/cli/blob/656bce7dd0f9753a273912e803261ed246593924/lib/view.js#L50)
The text was updated successfully, but these errors were encountered: