We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b7c867 commit a374aa9Copy full SHA for a374aa9
1 file changed
index.js
@@ -65,7 +65,11 @@ function precinct(content, options = {}) {
65
let dependencies = [];
66
67
if (detective) {
68
- dependencies = detective(ast, options[type]);
+ dependencies = detective(ast, {
69
+ ...options[type],
70
+ filename: options.filename,
71
+ treePath: options.treePath
72
+ });
73
} else {
74
debug('no detective found for: %s', type);
75
}
@@ -88,7 +92,7 @@ function precinct(content, options = {}) {
88
92
* @return {String[]}
89
93
*/
90
94
precinct.paperwork = (filename, options = {}) => {
91
- options = { includeCore: true, ...options };
95
+ options = { includeCore: true, filename, ...options };
96
97
const fileSystem = options.fileSystem || fs;
98
const content = fileSystem.readFileSync(filename, 'utf8');
0 commit comments