Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@pnpm/link-bins
Advanced tools
@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.
Link bins to node_modules/.bin
npm i -S @pnpm/logger @pnpm/link-bins
import linkBins, {linkPackageBins} from '@pnpm/link-bins'
await linkBins('node_modules', 'node_modules/.bin')
await linkPackageBins('node_modules/some-pkg', 'node_modules/.bin')
FAQs
Link bins to node_modules/.bin
The npm package @pnpm/link-bins receives a total of 245,013 weekly downloads. As such, @pnpm/link-bins popularity was classified as popular.
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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.