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

Still maintained? (Update Dependencies?) #10

Closed
nelsonic opened this issue Mar 26, 2015 · 7 comments
Closed

Still maintained? (Update Dependencies?) #10

nelsonic opened this issue Mar 26, 2015 · 7 comments

Comments

@nelsonic
Copy link
Collaborator

Hi @indexzero
is this module still maintained?
Do you have plans to update it?
e.g. dependencies:
Dependency Status

Would you accept a PR with tests?

@indexzero
Copy link
Owner

@nelsonic a PR would be welcome, but I'm not actively maintaining it. Would you like to be the new head maintainer? 😄

@nelsonic
Copy link
Collaborator Author

@indexzero I've added some basic tests on a branch: nelsonic#1
But unable to get past 92% coverage because of the if(!module.parent) which allows the script to be called directly:

if(!module.parent) {
  childrenOfPid(process.argv[2] || 1, function (err, data) {
  console.log(data)
  })

I tried to execute the file from inside my test:

  var child = cp.exec("node ./index.js", function(error, data) {
    console.log('data: ' + data.length);
    if (error !== null) {
        console.log(red('exec error: ' + error));
    }
  })

But that still does not improve coverage...

If you can live without 100% test coverage I can submit the PR.

@indexzero
Copy link
Owner

I would be happy to remove the !module.parent part all together and make that a separate bin/ps-tree script.

@nelsonic
Copy link
Collaborator Author

Ok. I can do that.
Next steps:

  1. I will add a bin/ps-tree script to invoke the module from command line
  2. Update the dependency on event-stream
  3. Re-run tests
    Will keep you posted. 👍

@nelsonic
Copy link
Collaborator Author

@indexzero I have substituted:

if(!module.parent) {
  childrenOfPid(process.argv[2] || 1, function (err, data) {
  console.log(data)
  })
}

for ./bin/ps-tree.js containing:

#!/usr/bin/env node
'use strict';
require('../')(process.argv[2] || 1, function (err, data) {
  console.log(data)
});

As a result we get 100% test coverage. 👍

nelsonic added a commit to nelsonic/ps-tree that referenced this issue Mar 27, 2015
@nelsonic
Copy link
Collaborator Author

Build passes: https://travis-ci.org/nelsonic/ps-tree/builds/56141651
Submitting PR.

@nelsonic
Copy link
Collaborator Author

@indexzero should I do a major _version bump_ in package.json or leave that to you?

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

No branches or pull requests

2 participants