Skip to content

fix: use npx @socketsecurity/socket-patch and add dependencies script#60

Closed
Mikola Lysenko (mikolalysenko) wants to merge 3 commits intomainfrom
chore/update-patch-setup-command
Closed

fix: use npx @socketsecurity/socket-patch and add dependencies script#60
Mikola Lysenko (mikolalysenko) wants to merge 3 commits intomainfrom
chore/update-patch-setup-command

Conversation

@mikolalysenko
Copy link
Copy Markdown
Contributor

Summary

  • Update setup command to generate npx @socketsecurity/socket-patch apply (or pnpx for pnpm projects) instead of bare socket patch apply
  • Add dependencies lifecycle script alongside postinstall for npm v7+ compatibility
  • Detect pnpm projects via pnpm-lock.yaml / pnpm-workspace.yaml lockfile presence

Test plan

  • All 253 cargo tests pass
  • New tests for PackageManager detection, pnpm command generation, and dependencies script
  • E2E tests in depscan repo (updated in companion PR)

🤖 Generated with Claude Code

Jake Verbaten (Raynos) and others added 3 commits April 6, 2026 12:24
TypeScript 6.0 changed the default types behavior
so node types are no longer auto-included. This
fixes builds in projects that use TS 6.

Made-with: Cursor
Update the setup command to generate the correct npx/pnpx command
prefix based on lockfile detection, and configure both postinstall
and dependencies lifecycle scripts.

- Add PackageManager enum (Npm/Pnpm) with lockfile detection
- Generate `npx @socketsecurity/socket-patch apply` for npm projects
- Generate `pnpx @socketsecurity/socket-patch apply` for pnpm projects
- Add dependencies lifecycle script alongside postinstall
- Thread PackageManager through detect -> update -> setup pipeline

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace pnpx with pnpm dlx for better compatibility. pnpx has been
deprecated since pnpm v7 in favor of pnpm dlx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mikolalysenko
Copy link
Copy Markdown
Contributor Author

Superseded by new PR with rebased changes on latest main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants