Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

symlinked

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symlinked

Node utility to list packages that are npm linked

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

symlinked

Node utility to list symlinks made by npm link, yarn link, or fs.link

Install

npm install symlinked

Local install as above is best practice if you are using in a shared codebase because then all developers will use the same version. CLI can be used locally via npx or via npm scripts. npm install has a --global flag you can add if you prefer global use. Yarn can be used via yarn add and yarn global add respectively if you prefer yarn.

CLI

Usage: symlinked <command> [<path>]

  Finds all linked package names of an npm package.

Commands:

  names    Get linked package names
  paths    Get linked package paths
  roots    Get linked package roots
  links    Get linked package links

Options:

  -h, --help     Display this usage info

API

require

var symlinked = require("symlinked")

Methods

  • symlinked.names(dir: ".") get array of linked package names
  • symlinked.paths(dir: ".") get array of linked package paths
  • symlinked.roots(dir: ".") get array of linked package roots
  • symlinked.links(dir: ".") get array of linked package links
  • symlinked.is(path) test if path exists and is linked
  • symlinked.read(path) read link

Examples

Ran in package directory with said dependency linked on both ends
symlinked.names()
// [ 'said' ]
symlinked.paths()
// [ '/Users/jdoe/symlinked/node_modules/said' ]
symlinked.roots()
// [ '/Users/jdoe/symlinked/node_modules/said/node_modules' ]
symlinked.links()
// [ '/Users/said' ]

Webpack resolve.modules configuration to resolve dependencies of linked dependencies

module.exports = {
  resolve: {
    modules: ["node_modules"].concat(symlinked.roots())
  }
}

Keywords

FAQs

Package last updated on 21 Nov 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc