Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Unified Package Manager for Node.js and Bun
✅ 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 when available.
✅ Minimal implementation.
nypm, detects package manager type and version and converts command into package manager CLI arguments. It then uses corepack or proper command to execute package manager's command and download it if necessary.
+------------------------------------------------+
| nypm |
+------------------------------------------------+
+-----------------------------------+ +---------+
| Corepack | | bun |
+-----------------------------------+ +---------+
+---------+ +---------+ +---------+
| npm | | yarn | | pnpm |
+---------+ +---------+ +---------+
nypm
CommandInstall dependencies:
npx nypm i
Add a dependency:
npx nypm add defu
Remove a dependency:
npx nypm remove defu
Install package:
# ✨ Auto-detect
npx nypm i nypm
# npm
npm install nypm
# yarn
yarn add nypm
# pnpm
pnpm install nypm
# bun
bun 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:
packageManager
field from package.jsonensureDependencyInstalled(name, options)
Ensures dependency is installed.
installDependencies(options)
Installs project dependencies.
removeDependency(name, options)
Removes dependency from the project.
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 548,954 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.