gruntjs / grunt-lib-phantomjs

Grunt and PhantomJS, sitting in a tree.
http://gruntjs.com/
MIT License
93 stars 63 forks source link

Use sync fs.write #112

Closed BridgeAR closed 6 years ago

BridgeAR commented 6 years ago

This makes sure errors will properly propagate to the user instead of being swallowed.

In the upcoming Node.js 10.x this will also result in an error. Refs: https://github.com/nodejs/node/pull/18668

jsf-clabot commented 6 years ago

CLA assistant check
All committers have signed the CLA.

Arkni commented 6 years ago

Hi @BridgeAR,

Thanks for your contribution.

You're confusing fs.write of PhantomJS's file system module with the one from NodeJS's file system modue. That file is the bridge between this plugin and PhantomJS. This plugin passes that file directly to PhantomJS in order to be executed.

For more information about this method, see fs.write docs.

As a result, I will have to close this PR. Thanks a lot for taking the time to open this PR.

BridgeAR commented 6 years ago

@Arkni thanks a lot for the heads up! I did indeed just go through a lot of modules that seemed they were impacted by this and did not dig any deeper. But good to know something new about PhantomJS.

Arkni commented 6 years ago

You're welcome :)