Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@manypkg/get-packages
Advanced tools
> A simple utility to get the packages from a monorepo, whether they're using Yarn, Bolt, Lerna, pnpm or Rush
A simple utility to get the packages from a monorepo, whether they're using Yarn, Bolt, Lerna, pnpm or Rush
This library exports getPackages
and getPackagesSync
. It is intended mostly for use of developers building tools that want to support different kinds of monorepos as an easy way to write tools without having to write tool-specific code. It supports Yarn, Bolt, Lerna, pnpm, Rush and single-package repos(where the only package is the the same as the root package). This library uses @manypkg/find-root
to search up from the directory that's passed to getPackages
or getPackagesSync
to find the project root.
import { getPackages, getPackagesSync } from "@manypkg/get-packages";
const { tool, packages, rootPackage, rootDir } = await getPackages(process.cwd());
const { tool, packages, rootPackage, rootDir } = getPackagesSync(process.cwd());
// From @manypkg/tools
interface Tool {
readonly type: string;
isMonorepoRoot(directory: string): Promise<boolean>;
isMonorepoRootSync(directory: string): boolean;
getPackages(directory: string): Promise<Packages>;
getPackagesSync(directory: string): Packages;
}
interface Package {
packageJson: PackageJSON;
dir: string;
relativeDir: string;
}
interface Packages {
tool: Tool;
packages: Package[];
rootPackage?: Package;
rootDir: string;
}
FAQs
> A simple utility to get the packages from a monorepo, whether they're using Yarn, Bolt, Lerna, pnpm or Rush
The npm package @manypkg/get-packages receives a total of 1,199,246 weekly downloads. As such, @manypkg/get-packages popularity was classified as popular.
We found that @manypkg/get-packages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
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.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.