Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@manypkg/cli
Advanced tools
Manypkg is a linter for `package.json` files in Yarn, Bolt, Lerna, pnpm or Rush monorepos.
@manypkg/cli is a command-line tool designed to help manage monorepos. It provides various utilities to ensure consistency and correctness across multiple packages within a monorepo.
Check
This command checks the monorepo for common issues such as mismatched dependency versions, invalid package.json files, and other potential problems. It helps maintain consistency and correctness across the monorepo.
manypkg check
Fix
This command automatically fixes issues found by the 'check' command. It can resolve version mismatches, update package.json files, and more, ensuring the monorepo remains in a healthy state.
manypkg fix
Upgrade
This command helps upgrade dependencies across the monorepo. It ensures that all packages are using the latest versions of their dependencies, which can help avoid compatibility issues.
manypkg upgrade
Lerna is a popular tool for managing JavaScript projects with multiple packages. It offers similar functionalities to @manypkg/cli, such as versioning, publishing, and dependency management. However, Lerna is more focused on automating workflows and managing large-scale monorepos.
Nx is a powerful build system with first-class monorepo support and powerful integrations. It provides advanced features like distributed caching, dependency graph visualization, and more. Compared to @manypkg/cli, Nx offers a more comprehensive suite of tools for managing and optimizing monorepos.
Rush is a scalable monorepo manager for JavaScript projects. It provides robust support for managing dependencies, building projects, and publishing packages. Rush focuses on performance and scalability, making it suitable for very large monorepos. Compared to @manypkg/cli, Rush offers more advanced features for handling complex monorepo setups.
Manypkg is a linter for package.json
files in Yarn, Bolt, Lerna, pnpm or Rush monorepos.
yarn add @manypkg/cli
manypkg check
manypkg check
runs all of the checks against your repo, logs any errors and exits with a code
manypkg fix
manypkg check
runs all of the checks against your repo and fixes any of problems that can be fixed.
manypkg upgrade <packageName> <tag or version>
This command helps you quickly upgrade your dependencies in a monorepo, or for packages from another scope. This is similar to yarn upgrade
with slightly different ergonomics. At its most basic:
manypkg upgrade react
This will find every instance of react in your packages, and upgrade it to latest.
manypkg upgrade react next
This will find every instance of react in your packages, and upgrade it to the next tag on npm.
Using tags respects your version range specifier (carat, or tilde dependency type).
You can also specify a version or version range such as:
manypkg upgrade react ^16.3.0
If you specify a scope, rather than a package name, you can upgrade all packages within a scope, for example:
manypkg upgrade @keystonejs
This would upgrade all packages in the keystone
scope to latest across your repository. You can specify a tag, or a version range. If you specify a tag, it will update every package that has a tag at this scope.
If you specify a version range, all packages in the scope will be updated to that version range and then an install will be attempted, but you will have errors if not all packages in the scope have that version.
manypkg npm-tag tagname (--otp OTP_CODE)
This gets each public package in the repo, and adds the npm tag specified to the current version of each. This can be run after publish to give a particular release a name.
manypkg npm-tag charmander
WARNING - npm-tag is not currently particularly robust in its implementation. The logging and feedback are likely to be poor
manypkg run <partial package name or directory> <script>
manypkg run
executes scripts for packages within a monorepo.
As an example, let's say there are two packages: @project/package-a
at packages/pkg-a
and @project/package-b
at packages/pkg-b
which both have a start
script, manypkg run
can be used like this:
yarn manypkg run pkg-a start
yarn manypkg run a start
yarn manypkg run package-a start
yarn manypkg run @project/package-a start
yarn manypkg run packages/pkg-a start
yarn manypkg run package-b start
yarn manypkg run b start
The following wouldn't work though because the package
and pkg
aren't unique among the package names/directories:
yarn manypkg run package start
yarn manypkg run pkg start
In order to target a package with a name that is a substring of another (@project/package-a
at packages/pkg-a
and @project/package-a-1
at packages/pkg-a-1
), use the exact package or directory name:
yarn manypkg run @project/package-a start
yarn manypkg run packages/pkg-a start
FAQs
Manypkg is a linter for `package.json` files in Yarn, Bolt, Lerna, pnpm or Rush monorepos.
The npm package @manypkg/cli receives a total of 102,701 weekly downloads. As such, @manypkg/cli popularity was classified as popular.
We found that @manypkg/cli 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.