File tree 1 file changed +3
-15
lines changed
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -82,18 +82,12 @@ const getFileSync = (file, cwd) => {
82
82
const normalizeOptions = ( {
83
83
ignore = [ ] ,
84
84
cwd = slash ( process . cwd ( ) ) ,
85
- } = { } ) => ( { ignore, cwd} ) ;
85
+ } = { } ) => ( { ignore : [ ... DEFAULT_IGNORE , ... ignore ] , cwd} ) ;
86
86
87
87
export const isGitIgnored = async options => {
88
88
options = normalizeOptions ( options ) ;
89
89
90
- const paths = await fastGlob ( '**/.gitignore' , {
91
- ignore : [
92
- ...DEFAULT_IGNORE ,
93
- ...options . ignore ,
94
- ] ,
95
- cwd : options . cwd ,
96
- } ) ;
90
+ const paths = await fastGlob ( '**/.gitignore' , options ) ;
97
91
98
92
const files = await Promise . all ( paths . map ( file => getFile ( file , options . cwd ) ) ) ;
99
93
const ignores = reduceIgnore ( files ) ;
@@ -104,13 +98,7 @@ export const isGitIgnored = async options => {
104
98
export const isGitIgnoredSync = options => {
105
99
options = normalizeOptions ( options ) ;
106
100
107
- const paths = fastGlob . sync ( '**/.gitignore' , {
108
- ignore : [
109
- ...DEFAULT_IGNORE ,
110
- ...options . ignore ,
111
- ] ,
112
- cwd : options . cwd ,
113
- } ) ;
101
+ const paths = fastGlob . sync ( '**/.gitignore' , options ) ;
114
102
115
103
const files = paths . map ( file => getFileSync ( file , options . cwd ) ) ;
116
104
const ignores = reduceIgnore ( files ) ;
You can’t perform that action at this time.
0 commit comments