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

Support packages with only one version #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

silvervest
Copy link

@silvervest silvervest commented Feb 26, 2024

Packages with only one version will return a flat string rather than an array via npm view, so this supports that

Associated error may look like this:

Fetching information for 31 packages...
 ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 10% | ETA: 30s | 3/31undefined:1
10.2.0
    ^

SyntaxError: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)
    at JSON.parse (<anonymous>)
    at getVersionsForPackage (/opt/homebrew/lib/node_modules/pkgmigr8or/index.js:56:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /opt/homebrew/lib/node_modules/pkgmigr8or/index.js:25:15
    at async /opt/homebrew/lib/node_modules/pkgmigr8or/index.js:35:24
    at async Promise.all (index 9)
    at async /opt/homebrew/lib/node_modules/pkgmigr8or/index.js:77:31

Cheers!

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

Successfully merging this pull request may close these issues.

1 participant