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

Sort node package versions by release date #214

Closed
wants to merge 3 commits into from
Closed

Sort node package versions by release date #214

wants to merge 3 commits into from

Conversation

moolmanruan
Copy link

issue

This PR solves the issue of Node package versions being missed if the target repo released versions out of order.

def node_get_package_versions(package_name: str) -> list[str]:
cmd = ('npm', 'view', package_name, '--json')
output = json.loads(subprocess.check_output(cmd))
return output['versions']
output = json.loads(subprocess.check_output(cmd, shell=True))
Copy link
Author

@moolmanruan moolmanruan Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shell=True change was required for me to run the script on Windows without throwing a FileNotFoundError when creating the subprocess.

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

Successfully merging this pull request may close these issues.

2 participants