validateBraces = (pattern, logger) => {
  const fixedPattern = stripDoubleBraces(stripIncorrectBraces(pattern))

  if (fixedPattern !== pattern) {
    logger.warn(incorrectBraces(pattern, fixedPattern))
  }

  return fixedPattern
}
Validate and remove incorrect brace expansions from glob pattern.
For example `*.{js}` is incorrect because it doesn't contain a `,` or `..`,
and will be reformatted as `*.js`.

@param {string} pattern the glob pattern
@param {*} logger
@returns {string}