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

Unable to parse version 'latest' #106

Closed
hougesen opened this issue Jan 5, 2024 · 2 comments · Fixed by #107
Closed

Unable to parse version 'latest' #106

hougesen opened this issue Jan 5, 2024 · 2 comments · Fixed by #107

Comments

@hougesen
Copy link

hougesen commented Jan 5, 2024

It looks like setting the package version to latest does not work when using version 0.12.0.
It does not throw an error in 0.11.1.

»  TypeSync v0.12.0
-  Syncing type definitions in package.json...
✖  Could not parse version 'latest'
Stack:
Error: Could not parse version 'latest'
    at parseOrThrow (/home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/versioning.js:34:15)
    at getClosestMatchingVersion (/home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/versioning.js:12:25)
    at /home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/type-syncer.js:156:117
    at step (/home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/type-syncer.js:44:23)
    at Object.next (/home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/type-syncer.js:25:53)
    at fulfilled (/home/runner/.npm/_npx/6f28a8a9be075978/node_modules/typesync/lib/type-syncer.js:16:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@jeffijoe
Copy link
Owner

jeffijoe commented Jan 5, 2024

Thanks for the report. We started parsing versions in 0.12, which requires actual versions. I had not considered that one may use latest or other non-version strings in package.json.

I'll make it so it defaults to latest if unable to parse.

@jeffijoe
Copy link
Owner

jeffijoe commented Jan 5, 2024

0.12.1 should address this.

This issue was closed.
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 a pull request may close this issue.

2 participants