@@ -26,16 +26,14 @@ function convertPathToPosix(filepath) {
2626 *
2727 * Also makes sure all path separators are POSIX style for `glob` compatibility.
2828 *
29- * @param {Object } [options] An options object
30- * @param {string[] } [options.extensions=['.js']] An array of accepted extensions
31- * @param {string } [options.cwd=process.cwd()] The cwd to use to resolve relative pathnames
29+ * @param {string[] } [extensions=['.js']] An array of accepted extensions
3230 * @returns {Function } A function that takes a pathname and returns a glob that
3331 * matches all files with the provided extensions if
3432 * pathname is a directory.
3533 */
36- function processPath ( options ) {
37- var cwd = ( options && options . cwd ) || process . cwd ( ) ;
38- var extensions = ( options && options . requireExtension ) || [ '.js' ] ;
34+ function processPath ( extensions ) {
35+ var cwd = process . cwd ( ) ;
36+ extensions = extensions || [ '.js' ] ;
3937
4038 extensions = extensions . map ( function ( ext ) {
4139 return ext . replace ( / ^ \. / , '' ) ;
@@ -71,11 +69,11 @@ function processPath(options) {
7169/**
7270 * Resolves any directory patterns into glob-based patterns for easier handling.
7371 * @param {string[] } patterns File patterns (such as passed on the command line).
74- * @param {Object } options An options object.
72+ * @param {Array<string> } extensions A list of file extensions
7573 * @returns {string[] } The equivalent glob patterns and filepath strings.
7674 */
77- function resolveFileGlobPatterns ( patterns , options ) {
78- var processPathExtensions = processPath ( options ) ;
75+ function resolveFileGlobPatterns ( patterns , extensions ) {
76+ var processPathExtensions = processPath ( extensions ) ;
7977 return patterns . map ( processPathExtensions ) ;
8078}
8179
@@ -128,9 +126,7 @@ function listFilesToProcess(globPatterns) {
128126
129127function smartGlob ( indexes , extensions ) {
130128 return listFilesToProcess (
131- resolveFileGlobPatterns ( indexes , {
132- extensions : extensions
133- } )
129+ resolveFileGlobPatterns ( indexes , extensions )
134130 ) ;
135131}
136132
0 commit comments