module-link-unlink

Link and unlink a module with saving and restoring the previous install

MIT 50 个版本
安装
npm install module-link-unlink
yarn add module-link-unlink
pnpm add module-link-unlink
bun add module-link-unlink
README

Link and unlink a module with saving and restoring the previous install

import { linkModule, unlinkModule } from 'module-link-unlink';

// If '/path/to/node_modules/module' exists, it is moved to '/path/to/node_modules/module.abcde1234' and regardless '/path/to/module' -> '/path/to/node_modules/module'. All binaries are also linked in '/path/to/node_modules/.bin'
await link('/path/to/module', '/path/to/node_modules'); 

// if '/path/to/node_modules/module.abcde1234' exists, it is restored to '/path/to/node_modules/module' otherwise it will be removed including all accompanying binaries
await unlink('/path/to/module', '/path/to/node_modules'); 

Documentation

API Docs

版本列表
1.1.2 2026-05-26
1.1.1 2026-05-26
1.1.0 2025-12-18
1.0.11 2025-12-12
1.0.10 2025-12-12
1.0.9 2025-12-04
1.0.8 2025-12-04
1.0.7 2025-12-04
1.0.6 2025-12-03
1.0.5 2025-11-06
1.0.4 2025-10-21
1.0.3 2025-10-21
1.0.2 2025-07-08
1.0.1 2025-06-29
0.1.37 2025-06-21
0.1.36 2025-06-20
0.1.35 2025-06-18
0.1.34 2025-06-14
0.1.33 2025-05-24
0.1.32 2025-05-20
0.1.31 2025-05-19
0.1.30 2025-05-19
0.1.29 2025-05-18
0.1.28 2025-05-18
0.1.27 2025-01-24
0.1.26 2025-01-23
0.1.25 2025-01-23
0.1.24 2025-01-23
0.1.23 2025-01-23
0.1.22 2025-01-23
0.1.21 2025-01-18
0.1.19 2025-01-15
0.1.18 2025-01-15
0.1.17 2025-01-14
0.1.16 2025-01-14
0.1.15 2025-01-14
0.1.14 2025-01-12
0.1.12 2025-01-04
0.1.11 2025-01-04
0.1.10 2025-01-04
0.1.9 2025-01-04
0.1.8 2025-01-04
0.1.7 2025-01-04
0.1.6 2025-01-04
0.1.5 2025-01-04
0.1.4 2025-01-04
0.1.3 2024-12-28
0.1.2 2024-12-28
0.1.1 2024-12-27
0.1.0 2024-12-27