Coder Social home page Coder Social logo

Follow symlinks about dependency-lint HOT 3 CLOSED

charlierudolph avatar charlierudolph commented on September 27, 2024
Follow symlinks

from dependency-lint.

Comments (3)

charlierudolph avatar charlierudolph commented on September 27, 2024

What exactly are the false errors that are being produced?

from dependency-lint.

kevgo avatar kevgo commented on September 27, 2024

When running dependency-lint on https://github.com/Originate/nitroglycerin with dependencies installed via ied, I get the error: mocha (unused)

Mocha is used in bin/tests, which looks like this:

#!/usr/bin/env bash
set -e

if [ "$#" == "0" ]; then
  mocha --compilers ls:livescript spec
else
  mocha --compilers ls:livescript "$@"
fi

A traditional install using NPM3 works correctly without dependency-lint errors.

IED changes the structure of the node_modules folder to contain symlinks to folders in the .cas directory. I assume dependency-lint is unable to follow these symlinks, hence it doesn't see the mocha binary in node_modules/.cas/161be5bdeb496771eb9b35745050b622b5aefc58/package/bin, and thinks mocha is unused.

Here is the structure of my node_modules folder for reference:

drwxr-xr-x   23 kevin  staff   782B Jul 11 12:04 .
drwxr-xr-x   18 kevin  staff   612B Jul 11 12:04 ..
drwxr-xr-x   15 kevin  staff   510B Jul 11 12:04 .bin
drwxr-xr-x  374 kevin  staff    12K Jul 11 12:04 .cas
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 chai -> .cas/4d02637b067fe958bdbfdd3a40ec56fef7373247/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 coveralls -> .cas/f9ff01a1adbf22a129e35a8d62345a52a781b395/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 dependency-lint -> .cas/83a1ec93a1b9d7427b68075a57029e3a0bb735da/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp -> .cas/571ce45928dd40af6514fc4011866016c13845b4/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-concat -> .cas/585cfb115411f348773131140566b6a81c69cb91/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-exit -> .cas/082313548683ad0ab05d430d7a563330d4e61370/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-header -> .cas/e456f9390e5c86102d8f9b1fc49ca8f2b8902e0c/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-livescript -> .cas/d2d7e068c22921c1a573d6683946018a65f9cdb0/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-livescript-istanbul -> .cas/c50106ea1d8207519e44df66cc6edd23a0eca56f/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-mocha -> .cas/1ce5eba4b94b40c7436afec3c4982c8eea894192/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-uglify -> .cas/524788d87666d09f9d0c21fb2177f90039a658c9/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 gulp-util -> .cas/78925c4b8f8b49005ac01a011c557e6218941cbb/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 livescript -> .cas/4fe7121c41217e4608e334eb9cbe1762e63e5566/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 mocha -> .cas/161be5bdeb496771eb9b35745050b622b5aefc58/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 mocha-circleci-reporter -> .cas/9751273e919e8ea7c9e2d2128e18c374b0f4a817/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 o-tools -> .cas/3cd428e19d88718f403e7f0925c7b4be74495215/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 o-tools-livescript -> .cas/e07e67de0554a343e3f6f5c8953cefd3ee7d06ff/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 sinon -> .cas/4e4ff4d84b20adee13138f36acb132ca1cd72c83/package
lrwxr-xr-x    1 kevin  staff    53B Jul 11 12:04 sinon-chai -> .cas/432a9bbfd51a6fc00798f4d2526a829c060687ac/package

Running mocha itself works as expected.

Thanks!

from dependency-lint.

charlierudolph avatar charlierudolph commented on September 27, 2024

Alright, based on a short discussion with you I believe we need to update how we connect the executables with what module exposes them. Currently it is looking at the symlinks in the node_modules/.bin. Instead should probably just read the bin section of the each module's package.json.

from dependency-lint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.