File tree 4 files changed +43
-1
lines changed
fixtures/ignore-node-modules
4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { findImports } from "../shared/findImports";
7
7
import { findSharedParent } from "./shared/findSharedParent" ;
8
8
9
9
const isFilePathIgnored = ( filePath : string ) => {
10
- const ignoreList = [ / ^ \. g i t / ] ;
10
+ const ignoreList = [ / ^ \. g i t | n o d e _ m o d u l e s / ] ;
11
11
12
12
return ignoreList . some ( re => re . test ( filePath ) ) ;
13
13
} ;
Original file line number Diff line number Diff line change @@ -437,6 +437,26 @@ exports[`end-to-end --avoid-single-file globals: globals/src/index.js 1`] = `
437
437
"
438
438
` ;
439
439
440
+ exports [` end-to-end --avoid-single-file ignore-node-modules 1` ] = `
441
+ "ignore-node-modules
442
+ ├── file2.js
443
+ ├── index.js
444
+ └── node_modules
445
+ ├── add.js
446
+ └── subtract.js"
447
+ ` ;
448
+
449
+ exports [` end-to-end --avoid-single-file ignore-node-modules: ignore-node-modules/file2.js 1` ] = ` ""` ;
450
+
451
+ exports [` end-to-end --avoid-single-file ignore-node-modules: ignore-node-modules/index.js 1` ] = ` "require('./file2')"` ;
452
+
453
+ exports [` end-to-end --avoid-single-file ignore-node-modules: ignore-node-modules/node_modules/add.js 1` ] = `
454
+ "require('./subtract')
455
+ "
456
+ ` ;
457
+
458
+ exports [` end-to-end --avoid-single-file ignore-node-modules: ignore-node-modules/node_modules/subtract.js 1` ] = ` ""` ;
459
+
440
460
exports [` end-to-end --avoid-single-file index-cycle 1` ] = `
441
461
"index-cycle
442
462
├── index
@@ -1075,6 +1095,27 @@ export const five = 5;
1075
1095
"
1076
1096
` ;
1077
1097
1098
+ exports [` end-to-end ignore-node-modules 1` ] = `
1099
+ "ignore-node-modules
1100
+ ├── index
1101
+ │ └── file2.js
1102
+ ├── index.js
1103
+ └── node_modules
1104
+ ├── add.js
1105
+ └── subtract.js"
1106
+ ` ;
1107
+
1108
+ exports [` end-to-end ignore-node-modules: ignore-node-modules/index.js 1` ] = ` "require('./index/file2')"` ;
1109
+
1110
+ exports [` end-to-end ignore-node-modules: ignore-node-modules/index/file2.js 1` ] = ` ""` ;
1111
+
1112
+ exports [` end-to-end ignore-node-modules: ignore-node-modules/node_modules/add.js 1` ] = `
1113
+ "require('./subtract')
1114
+ "
1115
+ ` ;
1116
+
1117
+ exports [` end-to-end ignore-node-modules: ignore-node-modules/node_modules/subtract.js 1` ] = ` ""` ;
1118
+
1078
1119
exports [` end-to-end index-cycle 1` ] = `
1079
1120
"index-cycle
1080
1121
├── index
Original file line number Diff line number Diff line change
1
+ require ( './file2' )
You can’t perform that action at this time.
0 commit comments