tkellen/node-liftoff — pull request #14 by kt3k (2014-05-28 03:59:06+00:00)
Title: Fix the case of only 1 extension

Hi!

I think I found a bug in the creation of `configPathRegex` in index.js.

When the `extensions` parameter has only one entry (for example `.js`), then `configPathRegex` become `mochafile{.js}` (when `configName` is `mochafile`).
But this string is not treated as glob (brace expansion) pattern, but just as the string itself.
So in this case liftoff searches the file `mochafile{.js}` literally, not `mochafile.js`.

This behaviour of `node-findup-sync` (or `node-glob`) doesn't seem a bug because the document of bash says:

> A correctly-formed brace expansion must contain unquoted opening and closing braces, and at least one unquoted comma or a valid sequence expression. Any incorrectly formed brace expansion is left unchanged.

( in https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html )

So I suggest this change.

Thanks!