Unable to parse version 'latest'
hougesen opened this issue · comments
Mads Hougesen commented
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)
Jeff Hansen commented
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.
Jeff Hansen commented
0.12.1
should address this.