Socket
Book a DemoInstallSign in
Socket

@socketsecurity/registry

Package Overview
Dependencies
Maintainers
2
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socketsecurity/registry

Socket.dev registry helpers methods and metadata

Source
npmnpm
Version
1.4.4
Version published
Weekly downloads
2.5K
103.09%
Maintainers
2
Weekly downloads
 
Created
Source

@socketsecurity/registry

Socket Badge CI - SocketDev/socket-registry

Follow @SocketSecurity Follow @socket.dev on Bluesky

Programmatic access to Socket Registry metadata, constants, and helper utilities for package management operations.

Installation

pnpm install @socketsecurity/registry

Features

  • Manifest API — Query package override metadata by ecosystem and name
  • Constants — Access Node.js, npm, and package manager constants
  • Type Definitions — Full TypeScript support with comprehensive type exports
  • Helper Utilities — File system, path, package, and process utilities

Quick Start

import { getManifestData, Categories, PURL_Type } from '@socketsecurity/registry'

// Get all manifest data
const manifest = getManifestData()

// Get npm ecosystem packages
const npmPackages = getManifestData(PURL_Type.NPM)

// Get specific package data
const packageData = getManifestData(PURL_Type.NPM, 'deep-equal')

if (packageData) {
  console.log(packageData.categories) // ['speedup', 'cleanup']
  console.log(packageData.version) // '2.2.3'
  console.log(packageData.engines.node) // '>=18'
}

API Reference

getManifestData()

Query the Socket Registry manifest for package overrides.

// Get all ecosystems
function getManifestData(): Manifest

// Get all packages for an ecosystem
function getManifestData(ecosystem: EcosystemString): ManifestEntry[]

// Get specific package metadata
function getManifestData(
  ecosystem: EcosystemString,
  packageName: string,
): ManifestEntryData | undefined

Enums

enum Categories {
  CLEANUP = 'cleanup', // Reduced dependencies
  LEVELUP = 'levelup', // New features
  SPEEDUP = 'speedup', // Performance improvements
  TUNEUP = 'tuneup', // Security fixes
}

enum Interop {
  BROWSERIFY = 'browserify',
  CJS = 'cjs',
  ESM = 'esm',
}

enum PURL_Type {
  NPM = 'npm',
  PYPI = 'pypi',
  // ... and more ecosystem types
}

Constants

Import Node.js and package manager constants:

import {
  NODE_MODULES,
  PACKAGE_JSON,
  PNPM_LOCK_YAML,
  NPM_REGISTRY_URL,
} from '@socketsecurity/registry'

For a complete list of available constants, see the package.json exports.

Type Definitions

All types are exported for TypeScript projects:

import type {
  Manifest,
  ManifestEntry,
  ManifestEntryData,
  CategoryString,
  InteropString,
  EcosystemString,
} from '@socketsecurity/registry'

Utilities

Access utility modules for common operations:

// File system utilities
import { /* utilities */ } from '@socketsecurity/registry/lib/fs'

// Package utilities
import { /* utilities */ } from '@socketsecurity/registry/lib/packages'

// Path utilities
import { /* utilities */ } from '@socketsecurity/registry/lib/paths'

// And many more...

See the exports map for all available utility modules.

License

MIT

Keywords

Socket.dev

FAQs

Package last updated on 05 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts