()
| 255 | exports.parseOptions = parseOptions; |
| 256 | |
| 257 | function globOptions() { |
| 258 | // These options are just to make fast-glob be compatible with POSIX (bash) |
| 259 | // wildcard behavior. |
| 260 | var defaultGlobOptions = { |
| 261 | onlyFiles: false, |
| 262 | followSymbolicLinks: false, |
| 263 | }; |
| 264 | |
| 265 | var newGlobOptions = Object.assign({}, config.globOptions); |
| 266 | var optionRenames = { |
| 267 | // node-glob's 'nodir' is not quote the same as fast-glob's 'onlyFiles'. |
| 268 | // Compatibility for this is implemented at the call site. |
| 269 | mark: 'markDirectories', |
| 270 | matchBase: 'baseNameMatch', |
| 271 | }; |
| 272 | Object.keys(optionRenames).forEach(function (oldKey) { |
| 273 | var newKey = optionRenames[oldKey]; |
| 274 | if (oldKey in config.globOptions) { |
| 275 | newGlobOptions[newKey] = config.globOptions[oldKey]; |
| 276 | } |
| 277 | }); |
| 278 | var invertedOptionRenames = { |
| 279 | nobrace: 'braceExpansion', |
| 280 | noglobstar: 'globstar', |
| 281 | noext: 'extglob', |
| 282 | nocase: 'caseSensitiveMatch', |
| 283 | }; |
| 284 | Object.keys(invertedOptionRenames).forEach(function (oldKey) { |
| 285 | var newKey = invertedOptionRenames[oldKey]; |
| 286 | if (oldKey in config.globOptions) { |
| 287 | newGlobOptions[newKey] = !config.globOptions[oldKey]; |
| 288 | } |
| 289 | }); |
| 290 | return Object.assign({}, defaultGlobOptions, newGlobOptions); |
| 291 | } |
| 292 | |
| 293 | // Expands wildcards with matching (ie. existing) file names. |
| 294 | // For example: |
no outgoing calls
no test coverage detected
searching dependent graphs…