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

restore removed methods which still used #3268

Merged
merged 1 commit into from
Mar 7, 2018

Conversation

outsideris
Copy link
Contributor

Description of the Change

In ec8901a , utils.files is removed, but it still used in https://github.com/mochajs/mocha/blob/master/bin/_mocha#L532 . So, running mocha with watch mode raised a error with v5.0.2. See #3265 . We should re-release new version.

mocha --watch

/Users/outsider/temp/mocha-test/node_modules/mocha/bin/_mocha:532
  const watchFiles = utils.files(cwd, [ 'js' ].concat(program.watchExtensions));
                           ^

TypeError: utils.files is not a function
    at Object.<anonymous> (/Users/outsider/temp/mocha-test/node_modules/mocha/bin/_mocha:532:28)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Alternate Designs

N/A

Why should this be in core?

Users who use watch mode encounter error.

Benefits

Not break mocha in watch mode.

Possible Drawbacks

N/A

Applicable issues

Close #3265

@outsideris outsideris requested a review from boneskull March 7, 2018 05:03
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 90.077% when pulling c7cab5e on outsideris:issue-3265 into aaaa5ab on mochajs:master.

@boneskull boneskull merged commit eb09421 into mochajs:master Mar 7, 2018
@boneskull
Copy link
Contributor

I'll release this tomorrow

@boneskull boneskull added type: bug a defect, confirmed by a maintainer semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Mar 7, 2018
@boneskull boneskull added this to the v5.0.4 milestone Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes" type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"utils.files is not a function" (mocha: 5.0.2)
3 participants