Skip to content

Commit 1787caf

Browse files
committed
replace use of glob (via file-set) with fast-glob..
A sideeffect of this change is that non-existing input files will be ignored
1 parent fd79eb5 commit 1787caf

File tree

6 files changed

+641
-1865
lines changed

6 files changed

+641
-1865
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-23 Lloyd Brookes <[email protected]>
3+
Copyright (c) 2015-24 Lloyd Brookes <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![Gihub repo dependents](https://badgen.net/github/dependents-repo/jsdoc2md/jsdoc-api)](https://github.com/jsdoc2md/jsdoc-api/network/dependents?dependent_type=REPOSITORY)
44
[![Gihub package dependents](https://badgen.net/github/dependents-pkg/jsdoc2md/jsdoc-api)](https://github.com/jsdoc2md/jsdoc-api/network/dependents?dependent_type=PACKAGE)
55
[![Node.js CI](https://github.com/jsdoc2md/jsdoc-api/actions/workflows/node.js.yml/badge.svg)](https://github.com/jsdoc2md/jsdoc-api/actions/workflows/node.js.yml)
6-
[![Coverage Status](https://coveralls.io/repos/github/jsdoc2md/jsdoc-api/badge.svg)](https://coveralls.io/github/jsdoc2md/jsdoc-api)
76
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
87

98
# jsdoc-api
@@ -231,6 +230,6 @@ Directory in which JSDoc should search for tutorials.
231230

232231
* * *
233232

234-
&copy; 2015-23 [Lloyd Brookes](https://github.com/75lb) \<[email protected]\>.
233+
&copy; 2015-24 [Lloyd Brookes](https://github.com/75lb) \<[email protected]\>.
235234

236235
Tested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

lib/jsdoc-command.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ class JsdocCommand {
6767
* Perform pre-execution processing here, e.g. expand input glob patterns.
6868
*/
6969
preExecute () {
70-
const FileSet = require('file-set')
71-
this.inputFileSet = new FileSet(this.options.files)
70+
const fastGlob = require('fast-glob')
71+
const files = fastGlob.globSync(this.options.files, { onlyFiles: true })
72+
this.inputFileSet = { files }
7273
}
7374

7475
/**
@@ -81,12 +82,6 @@ class JsdocCommand {
8182
this.options.files.length || this.options.source,
8283
'Must set either .files or .source'
8384
)
84-
85-
if (this.inputFileSet.notExisting.length) {
86-
const err = new Error('These files do not exist: ' + this.inputFileSet.notExisting)
87-
err.name = 'JSDOC_ERROR'
88-
return err
89-
}
9085
}
9186

9287
/**

0 commit comments

Comments
 (0)