Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Unified Package Manager for Node.js
🚧 This project is under development. Please follow issues for the roadmap. 🚧
✅ Supports npm, yarn, pnpm and bun 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 supported package managers using nodejs/corepack
✅ Minimal 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 | | bun |
+---------+ +---------+ +---------+ +---------+
+------------------------------------------------+
| Node.js project |
+------------------------------------------------+
Install dependencies:
npx nypm@latest i
Add a dependency:
npx nypm@latest add defu
Remove a dependency:
npx nypm@latest remove defu
Install package:
# npm
npm install nypm
# pnpm
pnpm install nypm
# yarn
yarn add nypm
# bun
bun install nypm
Import:
// ESM
import {
detectPackageManager,
installDependencies,
addDependency,
addDevDependency,
removeDependency,
} from "nypm";
// CommonJS
const {
detectPackageManager,
installDependencies,
addDependency,
addDevDependency,
removeDependency,
} = require("nypm");
corepack enable
(use npm i -g corepack
for Node.js < 16.10)pnpm install
pnpm dev
NYPM is inspired from previous attempts and projects for unifying package manager exeperience.
Made with 💛
Published under MIT License.
FAQs
Unified Package Manager for Node.js
The npm package nypm receives a total of 2,715,978 weekly downloads. As such, nypm popularity was classified as popular.
We found that nypm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.