Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nypm

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nypm

Unified Package Manager for Node.js

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

🌈 nypm

npm version npm downloads codecov

🌈 Unified Package Manager for Node.js (npm, pnpm, yarn), Bun and Deno.

✅ Supports npm, yarn, pnpm and bun and deno out of the box with a unified API.

✅ Provides an API interface to interact with package managers.

Autodetects project's package manager using package.json and known lockfiles.

corepack integration for pnpm and yarn.

nypm command

Install dependencies:

npx nypm i

Add a dependency:

npx nypm add defu

Remove a dependency:

npx nypm remove defu

API Usage

Install package:

# ✨ Auto-detect
npx nypm install nypm

# npm
npm install nypm

# yarn
yarn add nypm

# pnpm
pnpm install nypm

# bun
bun install nypm

# deno
deno install nypm

Import:

// ESM
import { addDependency } from "nypm";

// CommonJS
const { addDependency } = require("nypm");

addDependency(name, options)

Adds dependency to the project.

addDevDependency(name, options)

Adds dev dependency to the project.

detectPackageManager(cwd, options)

Detect the package manager used in a directory (and up) by checking various sources:

  1. Use packageManager field from package.json
  2. Known lock files and other files

ensureDependencyInstalled(name, options)

Ensures dependency is installed.

installDependencies(options)

Installs project dependencies.

removeDependency(name, options)

Removes dependency from the project.

💻 Development

  • Clone this repository
  • Play Nyan Cat in the background (really important!)
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

NYPM is inspired from previous attempts and projects for unifying package manager exeperience.

License

Made with 💛

Published under MIT License.

FAQs

Package last updated on 28 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc