Tuesday 16 January 2018

How to lock all versions in package.json?

I'd ask on stackoverflow, but they're too prissy about this kind of thing.Basically, I want to remove all the ^s and ~s from package.json, but I can't simply do that because those aren't the exact versions that are presently installed.Yes, I know all about package-lock.json and yarn.lock, but they're too much of a pain to deal with when there's a merge conflict, so we usually end up just deleting the file and rebuilding it. Usually this works fine, but it causes all of our packages to get upgraded. I've been burned one too many times by broken minor versions, so now I want to lock it down more.Yes, I also know that specifying a specific minor and patch version doesn't guarantee I'll get the same package next time, but I'm willing to take my chances.So, is there a command I can run that will "refresh" my package.json with my currently installed packages, sans [~] modifiers?

Submitted January 16, 2018 at 06:18PM by xcOoE22awjiaLmyAxepO

No comments:

Post a Comment