AndreasMadsen / async-hook

Inspect the life of handle objects in node
MIT License
36 stars 14 forks source link

Support new setupHooks argument format for Node versions v5.10 or later #4

Closed jgwmaxwell closed 8 years ago

jgwmaxwell commented 8 years ago

Happy to amend this however you want, but this keeps the test suite green and gets the library working with v5.10

AndreasMadsen commented 8 years ago

Thanks.

It turns out that maintaining backward compatibility with older versions of async wrap becomes a nightmare very quickly. Thus I have previously decided to not try at all, and just support the latest version.

The supported version (in this case ^5.10) should be specified in the package.json file https://github.com/AndreasMadsen/async-hook/blob/master/package.json#L29. That way other modules may detect the appropriate version (npm doesn't do that by default, but it is possible).

jgwmaxwell commented 8 years ago

Thanks for getting back so quickly! Cool - that makes it easier, and then locking to the current release for node 5.9 and below works nicely. If you're interested in this PR would you like me to do anything other than remove the check?

AndreasMadsen commented 8 years ago

Just, update the engine field and drop 8769da6. Otherwise perfect!

jgwmaxwell commented 8 years ago

Updated as requested.

AndreasMadsen commented 8 years ago

Landed in 951e7433ae92bf1b7ec40398dd77da823cc14213. I squashed and edited the commit message, I hope that is fine.

jgwmaxwell commented 8 years ago

Awesome - thanks so much for a quick turnaround!