fix: break unstable lockfile v5 to remove "has" from property names (#29095)

Lockfile v5 hasn't stabilized yet, so going to do this breaking change
in order to make the property names shorter.
This commit is contained in:
David Sherret 2025-04-29 14:17:54 -04:00 committed by GitHub
parent 7b28e76881
commit 490c9c9099
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 55 additions and 21 deletions

View file

@ -280,8 +280,8 @@ fn populate_lockfile_from_snapshot(
}
}),
deprecated: pkg.is_deprecated,
has_bin: pkg.has_bin,
has_scripts: pkg.has_scripts,
bin: pkg.has_bin,
scripts: pkg.has_scripts,
optional_peers,
}
}

View file

@ -99,8 +99,8 @@ async fn get_infos(
cpu: version_info.cpu.iter().map(|s| s.to_string()).collect(),
os: version_info.os.iter().map(|s| s.to_string()).collect(),
deprecated: version_info.deprecated.is_some(),
has_bin: version_info.bin.is_some(),
has_scripts: version_info.scripts.contains_key("preinstall")
bin: version_info.bin.is_some(),
scripts: version_info.scripts.contains_key("preinstall")
|| version_info.scripts.contains_key("install")
|| version_info.scripts.contains_key("postinstall"),
optional_peers: version_info