npm view all versions code example
Example 1: npm display all versions
// nicely formatted npm package versions:
npm view <package-name> versions --json
Example 2: npm view available versions
npm view webpack versions --json
// nicely formatted npm package versions:
npm view <package-name> versions --json
npm view webpack versions --json