Skip to content

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Nov 5, 2025

Summary

This PR adds @socketsecurity/lib and @socketsecurity/sdk as internal workspace packages to the socket-cli monorepo. This enables local development and testing of core infrastructure libraries within the monorepo without relying on published npm packages.

Changes

  • Add workspace packages: Created packages/lib/ and packages/sdk/ with full source code, tests, and build infrastructure
  • Update workspace config: Added lib and sdk to pnpm-workspace.yaml
  • Migrate dependencies: Updated all packages to reference @socketsecurity/lib and @socketsecurity/sdk as workspace dependencies (via workspace:* protocol)
  • Root package cleanup: Removed lib and sdk from root package dependencies since they are now workspace packages
  • Lockfile update: Updated pnpm-lock.yaml to reflect new workspace structure

Package Details

@socketsecurity/lib v3.2.8

  • Core utilities and infrastructure for Socket.dev security tools
  • Comprehensive test suite (4582+ tests)
  • Optimized build system with esbuild
  • Full TypeScript support with extensive type definitions

@socketsecurity/sdk v3.1.3

  • SDK for Socket API client
  • Comprehensive test coverage
  • Full TypeScript support
  • All API methods for package analysis, security scanning, and org management

Benefits

  • Local development: Developers can now modify and test lib/sdk changes alongside CLI changes
  • Faster iteration: No need to publish and update package versions for testing
  • Better debugging: Full source code available in monorepo for debugging
  • Simplified testing: Integration tests can use local workspace versions
  • Consistent tooling: Shared build, test, and lint configurations across packages

Test Plan

  • All workspace packages build successfully
  • Dependency resolution works correctly with workspace protocol
  • Existing CLI functionality remains unchanged
  • All commits pass security checks

Migration Path

This change is transparent to existing CLI functionality. All packages now use local workspace versions of lib and sdk via pnpm's workspace protocol, which automatically resolves to the local packages during development.

🤖 Generated with Claude Code

Add @socketsecurity/lib v3.2.8 and @socketsecurity/sdk v3.1.3 as internal
workspace packages. This establishes the foundation for local development
and testing of core infrastructure libraries within the monorepo.

- Add packages/lib/ with core utilities and infrastructure for Socket.dev
  security tools
- Add packages/sdk/ providing SDK for Socket API client
- Both packages include comprehensive test suites, build scripts, and
  documentation
Update pnpm-workspace.yaml to include the new lib and sdk workspace
packages for local development and dependency resolution.
Update all package dependencies to reference @socketsecurity/lib and
@socketsecurity/sdk as workspace packages instead of catalog versions.
This enables local development and testing of core libraries within
the monorepo.

Changed packages:
- bootstrap
- build-infra
- cli (adds sdk workspace dependency)
- codet5-models-builder
- minilm-builder
- models
- node-smol-builder
- onnxruntime
- sbom-generator
- socket
- yoga-layout
Remove @socketsecurity/lib and @socketsecurity/sdk from root package
dependencies and overrides since they are now managed as workspace
packages. Individual packages will reference them via workspace protocol.
Update pnpm-lock.yaml to reflect workspace package structure with lib
and sdk as internal workspace dependencies. This lockfile update ensures
dependency resolution aligns with the new workspace configuration.
Remove CLAUDE.md files from lib and sdk packages as they duplicate
the main CLI CLAUDE.md. Package-specific guidance is already covered
in the root CLAUDE.md file.
@mikolalysenko mikolalysenko merged commit bf45b5b into main Nov 5, 2025
5 checks passed
@mikolalysenko mikolalysenko deleted the lib-sdk branch November 5, 2025 20:28
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.

3 participants