René's URL Explorer Experiment


Title: fix: prioritize pnpm-workspace.yaml detection and restrict setup to root package.json by Wenxin-Jiang · Pull Request #45 · SocketDev/socket-patch · GitHub

Open Graph Title: fix: prioritize pnpm-workspace.yaml detection and restrict setup to root package.json by Wenxin-Jiang · Pull Request #45 · SocketDev/socket-patch

X Title: fix: prioritize pnpm-workspace.yaml detection and restrict setup to root package.json by Wenxin-Jiang · Pull Request #45 · SocketDev/socket-patch

Description: Summary Fix workspace detection order: check for pnpm-workspace.yaml before the "workspaces" field in package.json, since pnpm projects often have both for compatibility For pnpm monorepos, the setup command now only adds the postinstall script to the root package.json, not individual workspace package.json files Fixes socket-patch: not found errors in pnpm monorepos where workspaces don't have @socketsecurity/socket-patch as a dependency Root Cause Two issues: Wrong detection order: detect_workspaces checked "workspaces" in package.json before pnpm-workspace.yaml. Many pnpm projects include both for compatibility, so they were misclassified as WorkspaceType::Npm. pnpm-workspace.yaml is the definitive signal for pnpm. Unnecessary workspace postinstalls: The setup command added npx @socketsecurity/socket-patch apply postinstall scripts to all workspace package.json files. In pnpm monorepos with strict module isolation, npx cannot resolve the package in workspaces that don't declare it as a dependency. Why root-only is correct for pnpm socket-patch apply is already monorepo-aware — it recursively searches all workspace node_modules directories from CWD, including following pnpm symlinks. Running it once from the root patches everything across all workspaces. Adding postinstall to individual workspaces was redundant (and broken due to the missing dependency). See: SocketDev/depscan#18843 Changes find.rs: detect_workspaces() now checks pnpm-workspace.yaml before "workspaces" in package.json find.rs: find_package_json_files() returns a PackageJsonFindResult struct containing both the file list and the detected WorkspaceType setup.rs: Filters to root-only when WorkspaceType::Pnpm is detected Test plan All 25 tests pass (including new test for pnpm + workspaces field coexistence) Full cargo check passes 🤖 Generated with Claude Code

Open Graph Description: Summary Fix workspace detection order: check for pnpm-workspace.yaml before the "workspaces" field in package.json, since pnpm projects often have both for compatibility For pnpm monorep...

X Description: Summary Fix workspace detection order: check for pnpm-workspace.yaml before the "workspaces" field in package.json, since pnpm projects often have both for compatibility For pnpm...

Opengraph URL: https://github.com/SocketDev/socket-patch/pull/45

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c5b92ac3-9363-5b1e-1dbf-65ab16611f4d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB90E:47423:3A281B:4D2929:6A4ED916
html-safe-nonce82086c811758447a57c74ddfcacae0facf5f52c79fa74565c481f06703f0ab12
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTBFOjQ3NDIzOjNBMjgxQjo0RDI5Mjk6NkE0RUQ5MTYiLCJ2aXNpdG9yX2lkIjoiODY4MzY1NzQxNTkwNjc0NDU5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacba1f4e48e3904f9068b5b7e84ed885353dc30e9c7e80a1869413047c551ed3b5
hovercard-subject-tagpull_request:3477789480
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/SocketDev/socket-patch/pull/45/files
twitter:imagehttps://avatars.githubusercontent.com/u/71545489?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/71545489?s=400&v=4
og:image:altSummary Fix workspace detection order: check for pnpm-workspace.yaml before the "workspaces" field in package.json, since pnpm projects often have both for compatibility For pnpm monorep...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/SocketDev/socket-patch git https://github.com/SocketDev/socket-patch.git
octolytics-dimension-user_id69326764
octolytics-dimension-user_loginSocketDev
octolytics-dimension-repository_id1093661456
octolytics-dimension-repository_nwoSocketDev/socket-patch
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1093661456
octolytics-dimension-repository_network_root_nwoSocketDev/socket-patch
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec37fe3e3f5f306900bd5b6bee97463f66c938b2c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/SocketDev/socket-patch/pull/45/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSocketDev%2Fsocket-patch%2Fpull%2F45%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSocketDev%2Fsocket-patch%2Fpull%2F45%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=SocketDev%2Fsocket-patch
Reloadhttps://github.com/SocketDev/socket-patch/pull/45/files
Reloadhttps://github.com/SocketDev/socket-patch/pull/45/files
Reloadhttps://github.com/SocketDev/socket-patch/pull/45/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/45/files
SocketDev https://github.com/SocketDev
socket-patchhttps://github.com/SocketDev/socket-patch
Notifications https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Fork 0 https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Star 3 https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Code https://github.com/SocketDev/socket-patch
Issues 1 https://github.com/SocketDev/socket-patch/issues
Pull requests 1 https://github.com/SocketDev/socket-patch/pulls
Actions https://github.com/SocketDev/socket-patch/actions
Models https://github.com/SocketDev/socket-patch/models
Security and quality 0 https://github.com/SocketDev/socket-patch/security
Insights https://github.com/SocketDev/socket-patch/pulse
Code https://github.com/SocketDev/socket-patch
Issues https://github.com/SocketDev/socket-patch/issues
Pull requests https://github.com/SocketDev/socket-patch/pulls
Actions https://github.com/SocketDev/socket-patch/actions
Models https://github.com/SocketDev/socket-patch/models
Security and quality https://github.com/SocketDev/socket-patch/security
Insights https://github.com/SocketDev/socket-patch/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FSocketDev%2Fsocket-patch%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FSocketDev%2Fsocket-patch%2Fissues%2Fnew%2Fchoose
Wenxin Jiang (Wenxin-Jiang)https://github.com/Wenxin-Jiang
mainhttps://github.com/SocketDev/socket-patch/tree/main
fix/pnpm-setup-root-onlyhttps://github.com/SocketDev/socket-patch/tree/fix/pnpm-setup-root-only
Conversation 0 https://github.com/SocketDev/socket-patch/pull/45
Commits 2 https://github.com/SocketDev/socket-patch/pull/45/commits
Checks 19 https://github.com/SocketDev/socket-patch/pull/45/checks
Files changed https://github.com/SocketDev/socket-patch/pull/45/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/45/files
fix: prioritize pnpm-workspace.yaml detection and restrict setup to root package.json https://github.com/SocketDev/socket-patch/pull/45/files#top
Show all changes 2 commits https://github.com/SocketDev/socket-patch/pull/45/files
c8ec913 fix: only add postinstall to root package.json for pnpm monorepos Wenxin-Jiang Apr 1, 2026 https://github.com/SocketDev/socket-patch/pull/45/commits/c8ec9137e452063d9ee68b0832c8d73df7dfe14b
feb7d62 fix: correct ruby/setup-ruby version comment to match SHA Wenxin-Jiang Apr 1, 2026 https://github.com/SocketDev/socket-patch/pull/45/commits/feb7d62e80bb311a64e09abe38f82746c804e2cd
Clear filters https://github.com/SocketDev/socket-patch/pull/45/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/45/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/45/files
ci.yml https://github.com/SocketDev/socket-patch/pull/45/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f
setup.rs https://github.com/SocketDev/socket-patch/pull/45/files#diff-b7839b8c6a3cb91aa9d682cba53ffde01f7462ecdb06b7da1fe7b216172416a3
find.rs https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
.github/workflows/ci.ymlhttps://github.com/SocketDev/socket-patch/pull/45/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f
View file https://github.com/SocketDev/socket-patch/blob/feb7d62e80bb311a64e09abe38f82746c804e2cd/.github/workflows/ci.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/45/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/45/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f
https://github.com/SocketDev/socket-patch/pull/45/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f
crates/socket-patch-cli/src/commands/setup.rshttps://github.com/SocketDev/socket-patch/pull/45/files#diff-b7839b8c6a3cb91aa9d682cba53ffde01f7462ecdb06b7da1fe7b216172416a3
View file https://github.com/SocketDev/socket-patch/blob/feb7d62e80bb311a64e09abe38f82746c804e2cd/crates/socket-patch-cli/src/commands/setup.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/45/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/45/files#diff-b7839b8c6a3cb91aa9d682cba53ffde01f7462ecdb06b7da1fe7b216172416a3
https://github.com/SocketDev/socket-patch/pull/45/files#diff-b7839b8c6a3cb91aa9d682cba53ffde01f7462ecdb06b7da1fe7b216172416a3
https://github.com/SocketDev/socket-patch/pull/45/files#diff-b7839b8c6a3cb91aa9d682cba53ffde01f7462ecdb06b7da1fe7b216172416a3
crates/socket-patch-core/src/package_json/find.rshttps://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
View file https://github.com/SocketDev/socket-patch/blob/feb7d62e80bb311a64e09abe38f82746c804e2cd/crates/socket-patch-core/src/package_json/find.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/45/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
https://github.com/SocketDev/socket-patch/pull/45/files#diff-cdbfc08c533333c2025ec99adf72d3c8b280684e503850ec2d254e07430cc7d9
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/45/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.