privatenumber / link

🔗 A better `npm link`
193 stars 8 forks source link

feat: publish emulation mode #13

Closed privatenumber closed 11 months ago

privatenumber commented 2 years ago

Feature

Specifically, to only link publish files and dependencies from the dependencies object. This would likely result in a watcher.

Motivation

Only publish files

In a development environment, it's possible files that are not published are present and accessible, leading to an inconsistent/inaccurate package.

Removes dev dependencies

When linking a development package, the linked package's node_modules directory usually contains devDependencies.

If the package's dev dependency is also a peer dependency, it's usually provided by the consuming app. However, when linked, Node will resolve the closest dependency, which is unexpected.