Security News
pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
@pnpm/link-bins
Advanced tools
Package description
@pnpm/link-bins is a utility package that helps in linking binaries from node_modules/.bin to a specified directory. This is particularly useful in monorepos or when working with multiple packages that need to share executables.
Linking Binaries
This feature allows you to link all binaries from the node_modules/.bin directory to a specified destination directory. This is useful for making executables available in a consistent location.
const { linkBins } = require('@pnpm/link-bins');
const path = require('path');
const sourceDir = path.join(__dirname, 'node_modules/.bin');
const destDir = path.join(__dirname, 'bin');
linkBins(sourceDir, destDir).then(() => {
console.log('Binaries linked successfully');
}).catch(err => {
console.error('Error linking binaries:', err);
});
symlink-dir is a package that creates symbolic links for directories. While it can be used to link binaries, it is more general-purpose and not specifically designed for linking node_modules/.bin executables.
npm-link is a built-in npm command that allows you to symlink a package folder. It is useful for local development but does not specifically focus on linking binaries from node_modules/.bin.
yarn link is a command provided by Yarn that allows you to symlink a package for local development. Similar to npm-link, it is not specifically designed for linking binaries from node_modules/.bin.
Readme
Link bins to node_modules/.bin
<pnpm|yarn|npm> add @pnpm/link-bins
import linkBins, {linkBinsOfPackages} from '@pnpm/link-bins'
function warn (msg) { console.warn(msg) }
await linkBins('node_modules', 'node_modules/.bin', {warn})
const packages = [{manifest: packageJson, location: pathToPackage}]
await linkBinsOfPackages(packages, 'node_modules/.bin', {warn})
FAQs
Unknown package
We found that @pnpm/link-bins 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
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
Security News
A threat actor on BreachForums is selling an unverified npm vulnerability for account takeover, but npm has not officially confirmed the existence of this security concern.
Security News
Cyber insurance rates are dropping as the market matures, according to a new report projecting global premiums to reach $43 billion by 2030, driven by international market uptake and growth in the SME sector.