Skip to content

Commit 5150f3f

Browse files
committed
fix(cli): fix breaking changes to readdirp API
1 parent a9ec935 commit 5150f3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ logger.info('output directory: %s', outDir);
105105
if (target.isDirectory()) {
106106
// the ajv json validator will be passed into the main module to help with processing
107107
var files=[];
108-
readdirp({ root: schemaPath, fileFilter: `*.${schemaExtension}` })
108+
readdirp(schemaPath, { root: schemaPath, fileFilter: `*.${schemaExtension}` })
109109
.on('data', entry => {
110110
files.push(entry.fullPath);
111111
try {

lib/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ Schema.getExamples = function(filePath, schema){
358358
var filename=path.basename(filePath, path.extname(filePath));
359359
filename=filename.split('.')[0]+'.example.*.json';
360360
return new Promise((resolve, reject) => {
361-
readdirp({ root: dirname, fileFilter: filename })
361+
readdirp(dirname, { root: dirname, fileFilter: filename })
362362
.on('data', entry => exampleFileNames.push(entry.fullPath))
363363
.on('end', () => resolve(exampleFileNames))
364364
.on('error', err => reject(err));

0 commit comments

Comments
 (0)