Skip to content

Conversation

shellscape
Copy link
Contributor

This facilitates the re-addition of sync methods to internal-ip, citing this issue there. All platforms for both families have been assigned sync methods using execa.sync. Tests were updated to also consider sync methods and run locally on OSX and Ubuntu with success.

This change is necessary in order for internal-ip and other consumers of default-gateway to implement synchronous methods. I followed the patterns established in the source but let me know if you'd like to see any semantic changes.

android.js Outdated
};

return result;
const get = family => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

care to rename these to async?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem at all.

index.js Outdated
].indexOf(platform) !== -1) {
module.exports.v4 = () => require(`./${platform}`).v4();
module.exports.v6 = () => require(`./${platform}`).v6();
const fams = require(`./${platform}`);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor, but i'd prefer families here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

@shellscape
Copy link
Contributor Author

give me about 30 minutes to switch back to this and i'll make those updates for you

win32.js Outdated
return result;
};

const wmic = family => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, just rename to async.

@silverwind
Copy link
Owner

LGTM once those things are renamed.

@shellscape
Copy link
Contributor Author

@silverwind just remembered - async is a keyword in node 7.6+. is there another choice you'd be comfortable with?

@silverwind
Copy link
Owner

Lowercase promise then ;)

@shellscape
Copy link
Contributor Author

@silverwind should be all set. happy to make additional changes if you spot anything

@silverwind silverwind merged commit 1443b75 into silverwind:master Sep 28, 2017
@silverwind
Copy link
Owner

Thanks, I'll update docs and then push a release.

silverwind pushed a commit that referenced this pull request Mar 27, 2018
* MAKEFILE should use local eslint
* implement sync() methods
* get -> promise rename
* fams -> families rename
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 this pull request may close these issues.

3 participants