
Security News
OpenClaw Advisory Surge Highlights Gaps Between GHSA and CVE Tracking
A recent burst of security disclosures in the OpenClaw project is drawing attention to how vulnerability information flows across advisory and CVE systems.
@docusaurus/remark-plugin-npm2yarn
Advanced tools
Remark plugin for converting npm commands to Yarn commands as tabs.
Transforms npm bash command code blocks to Docusaurus tabs:
The following (remove the //):
// ```bash npm2yarn
// npm run build
// ```
Becomes:

Note: it only works when used with Docusaurus themes that have the Tabs and TabItems components.
npm install @docusaurus/remark-plugin-npm2yarn
It is a Remark plugin, not a Docusaurus plugin, so you have to install it as a Remark plugin in the config of your Docusaurus plugins.
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
// ...
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
],
},
blog: {
// ...
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
],
},
pages: {
// ...
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
],
},
// ...
},
],
],
// ...
};
| Property | Type | Default | Description |
|---|---|---|---|
sync | boolean | false | Syncing tab choices (Yarn and npm). See https://docusaurus.io/docs/markdown-features/#syncing-tab-choices for details. |
converters | array | 'yarn', 'pnpm' | The list of converters to use. The order of the converters is important, as the first converter will be used as the default choice. |
In case you want to convert npm commands to something else than yarn or pnpm, you can use custom converters:
type CustomConverter = [name: string, cb: (npmCode: string) => string];
{
remarkPlugins: [
[
require('@docusaurus/remark-plugin-npm2yarn'),
{
sync: true,
converters: [
'yarn',
'pnpm',
['Turbo', (code) => code.replace(/npm/g, 'turbo')],
],
},
],
];
}
FAQs
Remark plugin for converting npm commands to Yarn commands as tabs.
The npm package @docusaurus/remark-plugin-npm2yarn receives a total of 55,873 weekly downloads. As such, @docusaurus/remark-plugin-npm2yarn popularity was classified as popular.
We found that @docusaurus/remark-plugin-npm2yarn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
A recent burst of security disclosures in the OpenClaw project is drawing attention to how vulnerability information flows across advisory and CVE systems.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.