@@ -19,7 +19,7 @@ use super::dedup_prefer_integrity;
1919use super :: npm:: inventory_package_lock_in;
2020use super :: pnpm:: {
2121 inventory_pnpm_lock_in, inventory_pnpm_lock_rel_in, inventory_pnpm_member_locks_in,
22- inventory_rush_pnpm_locks_in,
22+ inventory_rush_pnpm_locks_in, is_rush ,
2323} ;
2424use super :: view:: ProjectView ;
2525use super :: vlt:: inventory_vlt_in;
@@ -52,7 +52,7 @@ pub(crate) async fn inventory_npm_lock(
5252 project_root : & Path ,
5353) -> Result < Option < ( NpmLockFlavor , Vec < LockfileEntry > ) > , UnsupportedNpmLayout > {
5454 let view = ProjectView :: Disk ( project_root) ;
55- let rush = view . exists ( "rush.json" ) . await ;
55+ let rush = is_rush ( view ) . await ;
5656 inventory_npm_lock_raw_in ( & view, rush)
5757 . await
5858 . map ( |found| found. map ( |( flavor, raw) | ( flavor, dedup_prefer_integrity ( raw) ) ) )
@@ -77,7 +77,7 @@ pub(crate) async fn inventory_npm_trees(
7777pub ( super ) async fn inventory_npm_trees_raw_in (
7878 view : & ProjectView < ' _ > ,
7979) -> Result < Vec < LockfileEntry > , UnsupportedNpmLayout > {
80- let rush = view . exists ( "rush.json" ) . await ;
80+ let rush = is_rush ( * view ) . await ;
8181 let mut out = inventory_npm_lock_raw_in ( view, rush)
8282 . await ?
8383 . map ( |( _, entries) | entries)
@@ -90,7 +90,7 @@ pub(super) async fn inventory_npm_trees_raw_in(
9090
9191/// The routed lock's guarded instances ([`inventory_npm_lock`] before its
9292/// collapse). With pnpm's `lockfile` setting off ([`lockfile_disabled`];
93- /// not under Rush, `rush` being whether `rush.json` exists , which runs
93+ /// not under Rush, `rush` being [`is_rush`], the gate discovery shares , which runs
9494/// pnpm with settings of its own, as in lockfile discovery's
9595/// `extract_pnpm`), pnpm neither reads nor writes the root or member
9696/// locks, so a Socket-hosted pin in them is no lockfile basis. Discovery
0 commit comments