Code Monkey home page Code Monkey logo

global-modules's People

Contributors

jonschlinkert avatar kikobeats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

global-modules's Issues

Support for Yarn global

Hey there. Just found that it not works for yarn global path.

Which i believe isn't configurable or?

If that's right, then it is /home/<username>/.config/yarn/global/node_modules

Please provide an array instead of only one path

Hi,

It will be better to provides an array instead of only path.

Debian will first search to /usr/local/lib//nodejs than to /usr/local/lib/nodejs than /usr/local/share/nodejs then /usr/lib//nodejs than to /usr/lib/nodejs than /usr/share/nodejs

So please return an array

It will break depends but it is life

tests fail on debian due to hard coded paths.

mocha -R spec


  mods
    1) should resolve the path to the global npm modules directory:


  0 passing (20ms)
  1 failing

  1) mods should resolve the path to the global npm modules directory::
     AssertionError: false == true
      at Context.<anonymous> (/<<PKGBUILDDIR>>/test.js:17:5)
      at callFn (/usr/lib/nodejs/mocha/lib/runnable.js:223:21)
      at Test.Runnable.run (/usr/lib/nodejs/mocha/lib/runnable.js:216:7)
      at Runner.runTest (/usr/lib/nodejs/mocha/lib/runner.js:373:10)
      at /usr/lib/nodejs/mocha/lib/runner.js:451:12
      at next (/usr/lib/nodejs/mocha/lib/runner.js:298:14)
      at /usr/lib/nodejs/mocha/lib/runner.js:308:7
      at next (/usr/lib/nodejs/mocha/lib/runner.js:246:23)
      at Immediate._onImmediate (/usr/lib/nodejs/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:383:17)

On debian the global modules path is /usr/lib/nodejs. Its similar to jonschlinkert/global-prefix#15

Refactor?

Heya. I'm just thinking that it probably better idea would to move this to npm-global-modules and then we can implement both things here - you call globalModules() and get both for Yarn and Npm.

This name is good and because we already have yarn-global-modules, then it make sense to rename this one too.

But anyway, it's not something so important for now.

Wrong path for my 64bit linux

I am on gentoo linux with npm 6.4.1 and node 8.12.0 and have set my local prefix to ~/.local.
Now npm is installing packages into ~/.local/lib64/node_modules. Unfortunately global-modules is returning ~/.local/lib/node_modules.

With the default prefix, there would actually be a /usr/lib -> /usr/lib64 symlink, but npm by itself does not use that. (Though as a workaround I will create a symlink in ~/.local/ too).

Too many caught exceptions

Trying to debug a gulp script, I enabled breakpoints on all exceptions. There were a large number of exceptions from the global-modules package. If you can change the implementation to avoid this, it would make this a better package.

P.S. It would also be nice if you adopt semver and bump the version number to 1, semver rules say version 0 is reserved effectively excluded from versioning.

Should resolve ~ on Windows?

I have in my .npmrc

prefix=~/.npm-packages

Even though Windows doesn't natively expand ~ to homedir, it works as expected since npm manages to handle it... then this module should be able to handle it too

Update dependency global-prefix to fix security issue downstream

Security vulnerability CVE-2019-20149 downstream in kind-of (used by global-prefix, which this package uses) leads to any projects using this to be flagged.

As this security vulnerability has been rated fairly high, this is problematic.

A new version of kind-of (6.0.3) has been released with a fix, but not yet clone-deep.

When this PR in global-prefix to bump the kind-of version is merged and a new version released, then this package should also bump its version of global-prefix to match.

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.