GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix npm workspace refusal check for hoisted/PnP members with zero pac… · SocketDev/socket-patch@59281f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • crates/socket-patch-core/src/hosted
    • governing_root.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎crates/socket-patch-core/src/hosted/governing_root.rs‎

Copy file name to clipboardExpand all lines: crates/socket-patch-core/src/hosted/governing_root.rs
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ pub async fn refusal(view: &ProjectView<'_>, candidates: &[Candidate]) -> Option
6868
return Some(refusal);
6969
}
7070
}
71-
if candidates.iter().any(|c| c.dep.ecosystem == "npm") {
71+
// Check npm-family workspace refusals when there are npm candidates OR
72+
// when candidates is empty and a package.json exists (hoisted/PnP
73+
// members may have zero discovered packages).
74+
let has_npm_candidates = candidates.iter().any(|c| c.dep.ecosystem == "npm");
75+
let has_package_json = root.join("package.json").exists();
76+
if has_npm_candidates || (candidates.is_empty() && has_package_json) {
7277
if !has_own_npm_family_lock(root) {
7378
if let Some(refusal) = package_json_workspace_refusal(root).await {
7479
return Some(refusal);

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.