Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak output – don’t display “undefined”? #1

Closed
lydell opened this issue Jun 16, 2018 · 3 comments
Closed

Tweak output – don’t display “undefined”? #1

lydell opened this issue Jun 16, 2018 · 3 comments
Labels
invalid This doesn't seem right

Comments

@lydell
Copy link

lydell commented Jun 16, 2018

First off, thanks for making this tool! I’ve been missing yarn why in projects that use npm. I like it!

In all projects that aren’t to-be-published npm packages, I keep my package.json as minimalistic as possible: No name, version, license fields etc. – just private: true and dependencies (see lydell/blog#1).

This seems to cause npm-why to print undefined in a few places:

# The setup:
~/stuff/npm-why  
❯ cat package.json 
{
  "private": true,
  "dependencies": {
    "npm-why": "1.1.0"
  }
}

# Perhaps we could show the directory name for package.json instead of undefined?
~/stuff/npm-why  
❯ ./node_modules/.bin/npm-why chalk

  Who required chalk:

  undefined > npm-why > chalk@2.4.1

# Here’s some more undefined, but I’m not sure what it even means running without arguments.
~/stuff/npm-why  
❯ ./node_modules/.bin/npm-why

  Who required undefined:

  undefined@undefined

In summary, this doesn’t matter much (the tool works just fine anyway), but it’d be a nice little tweak to the output, don’t you think?

@amio
Copy link
Owner

amio commented Jun 16, 2018

Good catch 👍
This should get fixed.

@amio amio added the invalid This doesn't seem right label Jun 16, 2018
amio added a commit that referenced this issue Jun 16, 2018
@amio
Copy link
Owner

amio commented Jun 16, 2018

1.1.2 is released 😉

@lydell
Copy link
Author

lydell commented Jun 16, 2018

Nice! 🎉

@lydell lydell closed this as completed Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants