nypm
Unified Package Manager for Node.js
Last updated 4 years ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install nypm 
SYNC missed versions from official npm registry.

🌈 nypm

npm version npm downloads Github Actions Codecov

Unified Package Manager for Node.js

🚧 This project is under development. Please follow issues for the roadmap. 🚧

What does nypm do?

✅ Supports npm, yarn and pnpm 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

✅ Auto-installs and use exactly expected version of package manager using nodejs/corepack

✅ Zero dependency and low overhead implementation

nypm, detects package manager type and version and converts command into package manager CLI arguments. It then uses corepack to execute package manager's command (and download it if necessary).

  +------------------------------------+
  |                nypm                |
  +------------------------------------+
  +------------------------------------+
  |              Corepack              |
  +------------------------------------+
  +---------+  +---------+   +---------+
  |   npm   |  |  yarn   |   |  pnpm   |
  +---------+  +---------+   +---------+
  +------------------------------------+
  |         Node.js project            |
  +------------------------------------+

CLI Usage

[TBA]

API Usage

Install package:

# npm
npm install nypm

# yarn
yarn add nypm

# pnpm
pnpm install nypm

Import:

// ESM
import { detectPackageManager, installDependency } from 'nypm'

// CommonJS
const { detectPackageManager, installDependency } = require('nypm')

💻 Development

  • Clone this repository
  • Play Nyan Cat in the background (really important!)
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

Related Projects

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

License

Made with 💛

Published under MIT License.

Current Tags

  • 0.6.12                                ...           latest (a month ago)
  • 0.1.1                                ...           latest-0.1 (4 years ago)

39 Versions

  • 0.6.12                                ...           a month ago
  • 0.6.11                                ...           a month ago
  • 0.6.10                                ...           3 months ago
  • 0.6.9                                ...           4 months ago
  • 0.6.8                                ...           5 months ago
  • 0.6.7                                ...           6 months ago
  • 0.6.6                                ...           7 months ago
  • 0.6.5                                ...           10 months ago
  • 0.6.4                                ...           10 months ago
  • 0.6.3                                ...           10 months ago
  • 0.6.2                                ...           a year ago
  • 0.6.1                                ...           a year ago
  • 0.6.0                                ...           2 years ago
  • 0.5.4                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.12                                ...           2 years ago
  • 0.3.11                                ...           2 years ago
  • 0.3.10                                ...           2 years ago
  • 0.3.9                                ...           2 years ago
  • 0.3.8                                ...           3 years ago
  • 0.3.7                                ...           3 years ago
  • 0.3.6                                ...           3 years ago
  • 0.3.5                                ...           3 years ago
  • 0.3.4                                ...           3 years ago
  • 0.3.3                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.1.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 122
Today 0
This Week 1
This Month 52
Last Day 0
Last Week 14
Last Month 67
Dependencies (1)
Dev Dependencies (12)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE