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

Support promises in the fs module #173

Closed

Commits on Dec 16, 2014

  1. benchmark: forward execArgv to spawned childs

    Modify the benchmark runner to forward `process.execArgv`
    to child processes spawned to run individual scenarios (configs).
    Miroslav Bajtoš committed Dec 16, 2014
    Configuration menu
    Copy the full SHA
    a930ddb View commit details
    Browse the repository at this point in the history
  2. fs: promisify fs.stat and fs.readFile

    Add a new exec flag `--promisify-core` to enable the partial and
    experimental support for promises in the core APIs.
    
    Modify `fs.stat` and `fs.readFile` to return a promise when
    no callback is specified.
    
    Add helper functions
      `makeCallbackOrPromise` and `maybeCallbackOrPromise`
    that serve as a replacement for
      `makeCallback` and `maybeCallback`
    and make it super easy to add promise support to existing code.
    
    **BREAKING CHANGE**
    
    Before this commit, when an async function was invoked without
    a callback, it would:
    
     - silently discard the result on success
     - throw an error on failure, this error would go to "unhandled error"
       handler (domain or process)
    
    The commit changes the error behaviour: the rejected promise will
    be silently discarded, because the current version of V8 does not
    provide any way for detecting rejected promises that don't have
    any `catch` handler.
    
    In the future, if V8 and/or the Promise standard provide a way for
    detecting unhandled rejections and Node integrates that mechanism,
    then this behaviour will be automatically reverted back.
    Miroslav Bajtoš committed Dec 16, 2014
    Configuration menu
    Copy the full SHA
    f9ce2aa View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2015

  1. fixup! pass data to cb in benchmark

    Miroslav Bajtoš committed Jan 6, 2015
    Configuration menu
    Copy the full SHA
    f48e8fa View commit details
    Browse the repository at this point in the history