Skip to content

Commit

Permalink
fix(cli): fix breaking changes to readdirp API
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jul 24, 2019
1 parent a9ec935 commit 5150f3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ logger.info('output directory: %s', outDir);
if (target.isDirectory()) {
// the ajv json validator will be passed into the main module to help with processing
var files=[];
readdirp({ root: schemaPath, fileFilter: `*.${schemaExtension}` })
readdirp(schemaPath, { root: schemaPath, fileFilter: `*.${schemaExtension}` })
.on('data', entry => {
files.push(entry.fullPath);
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ Schema.getExamples = function(filePath, schema){
var filename=path.basename(filePath, path.extname(filePath));
filename=filename.split('.')[0]+'.example.*.json';
return new Promise((resolve, reject) => {
readdirp({ root: dirname, fileFilter: filename })
readdirp(dirname, { root: dirname, fileFilter: filename })
.on('data', entry => exampleFileNames.push(entry.fullPath))
.on('end', () => resolve(exampleFileNames))
.on('error', err => reject(err));
Expand Down

0 comments on commit 5150f3f

Please sign in to comment.