Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
nypm
Advanced tools
Changelog
Readme
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 2,158,204 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.