browserslist / update-db

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
https://browsersl.ist/
MIT License
286 stars 57 forks source link

No installed version detected with npm lockfileVersion 3 #18

Closed lpgera closed 1 year ago

lpgera commented 1 year ago

Hi,

I noticed that when running the update in a project which has an npm package-lock.json with version 3, the output looks like this:

Latest version:     1.0.30001478
Installed version:  none
[...]

So even though I have caniuse-lite installed, the installed version is not detected. Note, that the update is still successful, so this detection error doesn't prevent the script from updating the db.


Version 3 is the default lock file format for npm@9.x, and npm@9.x comes pre-bundled with node@18 since February, I guess it's time to get ready for parsing the new format.

I think the biggest difference between the formats is this:

The content of dependencies and packages probably also differ, but I haven't dug deep enough yet to understand all the nuances.

ai commented 1 year ago

Should be fixed in 1.0.11.

Can you try?

lpgera commented 1 year ago

That was very quick! 👏 Works like a charm now, thank you.