File tree 2 files changed +1
-23
lines changed
2 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -92,19 +92,7 @@ async function getChildrenModuleIds ({ id, alias }) {
92
92
children = ( await parse ( cleanCodeForParsing ( raw ) ) ) [ 0 ] . map ( i => i . n )
93
93
}
94
94
95
- try {
96
- children = children . concat (
97
- Array . from ( raw . matchAll ( / r e q u i r e \( [ ' " ] ( .+ ) [ ' " ] \) / gm) ) . map (
98
- ( [ _ , child ] ) => child
99
- )
100
- )
101
- } catch ( e ) { }
102
-
103
95
return children
104
- . reduce ( ( _ , child ) => {
105
- // get unique children
106
- return _ . includes ( child ) ? _ : _ . concat ( child )
107
- } , [ ] )
108
96
. map ( moduleId => {
109
97
const req = createRequire ( id )
110
98
let resolved
Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ test('constructs valid tree', async () => {
76
76
a_a : {
77
77
url : './valid/a_a.js' ,
78
78
content : `
79
- const a_a_a = require('./a_a_a')
80
- const a_a_b = require('./a_a_b') // multiline
79
+ import a_a_a from './a_a_a'
81
80
export default ''
82
81
`
83
82
} ,
@@ -87,12 +86,6 @@ test('constructs valid tree', async () => {
87
86
export default ''
88
87
`
89
88
} ,
90
- a_a_b : {
91
- url : './valid/a_a_b.js' ,
92
- content : `
93
- module.exports = ''
94
- `
95
- } ,
96
89
a_b : {
97
90
url : './valid/a_b.js' ,
98
91
content : `
@@ -122,9 +115,6 @@ test('constructs valid tree', async () => {
122
115
assert (
123
116
tree [ fsx . files . a_a ] . childrenPointers . includes ( tree [ fsx . files . a_a_a ] . pointer )
124
117
)
125
- assert (
126
- tree [ fsx . files . a_a ] . childrenPointers . includes ( tree [ fsx . files . a_a_b ] . pointer )
127
- )
128
118
129
119
// parents
130
120
assert ( tree [ fsx . files . a_a ] . parentPointers . includes ( tree [ fsx . files . a ] . pointer ) )
You can’t perform that action at this time.
0 commit comments