File tree Expand file tree Collapse file tree
socket-patch-core/src/vendor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2770,7 +2770,7 @@ async fn hosted_scan_from_npm_member_with_stray_lock_refuses() {
27702770 }
27712771}
27722772
2773- /// #1101 (Bun), #1134 (vlt): a workspace member holding a stray
2773+ /// #1101 (Bun), #1134 / #1542 (vlt): a workspace member holding a stray
27742774/// `bun.lock` / `bun.lockb` / `vlt-lock.json` of its own (one its manager
27752775/// never reads; members install from the root lock) used to skip the
27762776/// #884 / #942 refusal. `scan` and `get` pinned the ignored member lock
@@ -2804,6 +2804,19 @@ async fn hosted_scan_from_bun_or_vlt_member_with_stray_lock_refuses() {
28042804 "vlt-lock.json" ,
28052805 vlt_text. as_str ( ) ,
28062806 ) ,
2807+ // #1542: vlt lists members through extglobs too.
2808+ (
2809+ "vlt-lock.json" ,
2810+ Some ( r#"{"workspaces":["packages/+(a|b)"]}"# ) ,
2811+ "vlt-lock.json" ,
2812+ vlt_text. as_str ( ) ,
2813+ ) ,
2814+ (
2815+ "vlt-lock.json" ,
2816+ Some ( r#"{"workspaces":["packages/@(a|b)"]}"# ) ,
2817+ "vlt-lock.json" ,
2818+ vlt_text. as_str ( ) ,
2819+ ) ,
28072820 ] {
28082821 let tmp = tempfile:: tempdir ( ) . unwrap ( ) ;
28092822 let member = write_package_json_workspace ( tmp. path ( ) , root_lock, false ) ;
Original file line number Diff line number Diff line change @@ -1909,7 +1909,7 @@ mod tests {
19091909 ) ;
19101910 }
19111911
1912- /// #1101 (Bun), #1134 (vlt): a workspace member's own `bun.lock`,
1912+ /// #1101 (Bun), #1134 / #1542 (vlt): a workspace member's own `bun.lock`,
19131913 /// `bun.lockb` or `vlt-lock.json` is a lock its manager never reads
19141914 /// (members install from the workspace root's lock), so vendoring into
19151915 /// it would wire nothing. The engine and the hosted→vendored takeover
@@ -1939,6 +1939,23 @@ mod tests {
19391939 ( "vlt-lock.json" , VLT_TEXT ) ,
19401940 ] ,
19411941 ) ,
1942+ // #1542: vlt lists members through extglobs too.
1943+ (
1944+ "vlt-lock.json" ,
1945+ VLT_TEXT ,
1946+ vec ! [
1947+ ( "vlt.json" , r#"{"workspaces":["packages/+(a|b)"]}"# ) ,
1948+ ( "vlt-lock.json" , VLT_TEXT ) ,
1949+ ] ,
1950+ ) ,
1951+ (
1952+ "vlt-lock.json" ,
1953+ VLT_TEXT ,
1954+ vec ! [
1955+ ( "vlt.json" , r#"{"workspaces":["packages/@(a|b)"]}"# ) ,
1956+ ( "vlt-lock.json" , VLT_TEXT ) ,
1957+ ] ,
1958+ ) ,
19421959 ] {
19431960 let ( tmp, record) = npm_project ( ) . await ;
19441961 tokio:: fs:: remove_file ( tmp. path ( ) . join ( "package-lock.json" ) )
You can’t perform that action at this time.
0 commit comments