jeffijoe / typesync

Install missing TypeScript typings for dependencies in your package.json.
MIT License
1.53k stars 22 forks source link

honor yarn `save-exact` setting #12

Closed dylang closed 6 years ago

dylang commented 6 years ago

We use renovate to keep our dependencies up-to-date, and it recommends not including ^ or ~ in the semver version in package.json files so that it can test all version upgrades before merging them.

yarn has a setting for this:

save-exact true

It would be helpful if typesync honored that config.

There might be a similar setting for npm.

jeffijoe commented 6 years ago

Currently typesync always adds the latest version of typings, but maybe it should look for a version that matches the semver of the package and write it out in the same format. That's more work though, and not sure if it's that valuable. If yarn upgrade-interactive still lists updates for packages with no prefixed version, I would not be opposed to making typesync write the exact version always.

dylang commented 6 years ago

That sounds like an even better idea, good thinking!

jeffijoe commented 6 years ago

I always use prefixes so I don't know how yarn upgrade-interactive works in that case. Could you verify this for me please?

jeffijoe commented 6 years ago

Implemented as of v0.4.0.

dylang commented 6 years ago

Amazing job, works great!