Giter Club home page Giter Club logo

Comments (5)

fiatjaf avatar fiatjaf commented on May 27, 2024

Wait, what? So you're telling me that resolve-from actually checks a file for its existence? I thought it would just perform some string manipulation with pathnames. That would work, right? I think we can just remove resolve-from entirely and replace it with https://nodejs.org/api/path.html#path_path_resolve_paths

If you want to try that out and send a PR I will gladly accept it. Otherwise your solution will work too, but I really prefer to NOT check for file existence, that's useless filesystem bloat.

If you don't want to send a PR, show me at least a repo of yours with a missing file like that so I can use it for testing (as you can see, there are no unit tests in this project -- yes, I'm a horrible programmer).

from node-dependencies-view.

mef avatar mef commented on May 27, 2024

Thanks.

I just tried to replace resolve-from by path.resolve, however it does not produce the expected result.

Required modules do not get their file extensions appended, and are considered as different entities from the actual files (resulting in the same module being shown twice in two different places in the graph) 🤔 .

Do you see a solution for this? Perhaps that another approach is to be considered...

from node-dependencies-view.

fiatjaf avatar fiatjaf commented on May 27, 2024

I don't know why you replaced the , with a + 😛 but it is working now.

from node-dependencies-view.

fiatjaf avatar fiatjaf commented on May 27, 2024

Forget about it. You were right. It is not. I've broken everything.

(That's why you should always have unit tests.)

from node-dependencies-view.

mef avatar mef commented on May 27, 2024

Thanks 👍

from node-dependencies-view.

Related Issues (2)

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.