danmakenoise / link-status Goto Github PK
View Code? Open in Web Editor NEWA simple CLI to display all of the Node modules you have currently linked through `npm link`.
A simple CLI to display all of the Node modules you have currently linked through `npm link`.
I know that the project is quite old but as I did need to debug existing links I decided to give it a go. Locally it works exactly as advertised but when running the same command under gihub actions (ubuntu), the script did not display anything than a long list of newlines. See https://github.com/ansible/ansible-language-server/runs/4078323194?check_suite_focus=true
Interestingly it did not return an error exist code, but the output was of no use either.
After some extra searching online I was able to find a workaround that does not need any extra tools, documenting it here in case someone would find it useful:
npm ls --link=true --depth=0
Would be nice to have Windows support. Finding linked packages on Windows is particularly hard because all of the Stack Overflow answers are in Linux (using linux tools that don't exist on Windows). It appears this package does too. ๐ข
> link-status --source --prettify
{ Error: Command failed: find ./node_modules/ -maxdepth 2 -type l -ls
FIND: Parameter format not correct
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
killed: false,
code: 2,
signal: null,
cmd: 'find ./node_modules/ -maxdepth 2 -type l -ls' }
NO LINKS FOUND
In particular, find
isn't available. Would be nice if this package just used JavaScript/node so it was cross-platform rather than using CLI tools on the host.
We added some new features to the CLI, and the README is now out of date.
Currently when running the -s
flag, sym links are shown, but they are really just the nvm shims for the links. It would be nice to follow the symlink through to give an actual directory.
Example:
../../../.nvm/versions/node/v6.9.1/lib/node_modules/semistandard
Versus:
/Users/me/dev/semistandard
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.