packspec icon indicating copy to clipboard operation
packspec copied to clipboard

pkg.lock.json

Open justinmk opened this issue 1 year ago • 3 comments

need some sort of "lockfile" concept, probably. ugh.

ref https://github.com/savq/paq-nvim/issues/149#issuecomment-1665434482

justinmk avatar Jan 17 '25 22:01 justinmk

In paq-nvim, the lockfile is just used to check if an installed package has version/URL mismatch with what users specify in their config. So their lockfile is just a JSON-ized version of their Packages object

{
    "package-1": {
       "name": "package-1",
       "url": "https://.../package-1.git"
       "hash": "..."
       // Other field of Package that can be serialized
   },
    "pack2": {
        "name": "pack2",
        "url":  ""
        "hash": "..."
        // etc
    }
}

Also since pkg.json's lockfile is called pkg.lock.json instead of pkg-lock.json, does that mean it doesn't have to be a subset of npm's package-lock.json?

brianhuster avatar Apr 02 '25 10:04 brianhuster

Is this issue still needs to be opened, as vim.pack already has lockfile support?

brianhuster avatar Dec 16 '25 15:12 brianhuster

Depends on whether it makes sense to formalize the lockfile spec here.

justinmk avatar Dec 17 '25 16:12 justinmk