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

Having a dedicated info command to print out the local environment information #2097

Closed
jamesgeorge007 opened this issue May 18, 2019 · 7 comments · Fixed by #2106
Closed

Comments

@jamesgeorge007
Copy link
Contributor

jamesgeorge007 commented May 18, 2019

I think it is good to have a dedicated info command which will print out the local environment information that proves to be useful while submitting bug reports.

Proposed API

lerna info

Environment Info:

  System:
    OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
    CPU: (2) x64 Intel(R) Pentium(R) CPU G2020 @ 2.90GHz
  Binaries:
    Node: 8.11.4 - /usr/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 72.0.3626.81
    Firefox: 65.0

I would be happy to work on this 👏

@evocateur
Copy link
Member

I feel like there has to be an existing CLI package that fulfills this need? (If there isn't you should build it!) Perhaps we could employ the programmatic API of such a package to append this information to any lerna-debug.log dumps?

I'm not certain a top-level subcommand like lerna info is justified by this, however. (Lerna already has too many, tbh)

@jamesgeorge007
Copy link
Contributor Author

@evocateur There is an already an available package for the purpose - envinfo

@jamesgeorge007
Copy link
Contributor Author

I guess there is no harm in having yet another command for the respective purpose as most of the scaffolding tools out there comes shipped with.

@evocateur
Copy link
Member

Sure, why not, lerna info. I figure these options would be sufficient for our needs:

{
  System: ['OS', 'CPU'],
  Binaries: ['Node', 'Yarn', 'npm'],
  Utilities: ['Git'],
  npmPackages: ['lerna'],
}

@jamesgeorge007
Copy link
Contributor Author

@evocateur As per what I see each and every command is available as an npm package. How are we gonna implement this 🤔

@evocateur
Copy link
Member

Yes, the subcommands are separate packages under ./commands. I would say the list subcommand is a good starting point, since all you're going to do is call envinfo and emit the result to stdout (@lerna/output).

@jamesgeorge007
Copy link
Contributor Author

@evocateur Have a look at #2106 This is just an initial workaround. Kindly suggest the required changes (Especially writing unit tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants