Revert fs changes by MylesBorins · Pull Request #7846 · nodejs/node

@MylesBorins added confirmed-bug

Issues with confirmed bugs.

fs

Issues and PRs related to the fs subsystem / file system.

labels

Jul 22, 2016

@nodejs-github-bot nodejs-github-bot added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Jul 22, 2016

@Trott Trott mentioned this pull request

Jul 23, 2016

@Trott Trott mentioned this pull request

Jul 23, 2016

2 tasks

@Trott Trott mentioned this pull request

Jul 26, 2016

thefourtheye added a commit to thefourtheye/npm that referenced this pull request

Jul 27, 2016

@thefourtheye

@bzoz bzoz mentioned this pull request

Jul 27, 2016

2 tasks

@MylesBorins

This reverts commit 9359de9.

Original Commit Message:

    The "fs" module has two functions called `maybeCallback` and
    `makeCallback`, as of now.

    The `maybeCallback` creates a default function to report errors, if the
    parameter passed is not a function object. Basically, if the callback
    is omitted in some cases, this function is used to create a default
    callback function.

    The `makeCallback`, OTOH, creates a default function only if the
    parameter passed is `undefined`, and if it is not a function object it
    will throw an `Error`.

    This patch removes the `maybeCallback` function and makes the callback
    function argument mandatory for all the async functions.

    PR-URL: nodejs#7168
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>

addaleax pushed a commit that referenced this pull request

Aug 4, 2016
This reverts commit 9359de9.

Original Commit Message:

    The "fs" module has two functions called `maybeCallback` and
    `makeCallback`, as of now.

    The `maybeCallback` creates a default function to report errors, if the
    parameter passed is not a function object. Basically, if the callback
    is omitted in some cases, this function is used to create a default
    callback function.

    The `makeCallback`, OTOH, creates a default function only if the
    parameter passed is `undefined`, and if it is not a function object it
    will throw an `Error`.

    This patch removes the `maybeCallback` function and makes the callback
    function argument mandatory for all the async functions.

    PR-URL: #7168
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>

PR-URL: #7846
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

iarna added a commit to npm/npm that referenced this pull request

Aug 11, 2016

iarna pushed a commit to npm/npm that referenced this pull request

Aug 11, 2016

@zkat zkat mentioned this pull request

Aug 12, 2016

13 tasks

@zkat zkat mentioned this pull request

Sep 22, 2016

4 tasks