Skip to content

Commit fd3bb2a

Browse files
committed
Drop support for Node versions < v20 (the minimum version required by node-glob)
1 parent 7c43e24 commit fd3bb2a

File tree

4 files changed

+464
-86
lines changed

4 files changed

+464
-86
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest] # Remove windows as tests fail on `\r\n` style newlines
19-
node-version: [12, 14, 16, 18, 20, 22]
19+
node-version: [20, 22]
2020

2121
steps:
2222
- uses: actions/checkout@v4

lib/jsdoc-command.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ const { __dirname } = currentModulePaths(import.meta.url)
1818
* @abstract
1919
*/
2020
class JsdocCommand {
21-
constructor (options, cache) {
22-
options = options || {}
21+
constructor (options = {}, cache) {
22+
assert.ok(
23+
options.files?.length || options.source,
24+
'Must set either .files or .source'
25+
)
2326
options.files = arrayify(options.files)
2427

2528
this.cache = cache
@@ -41,11 +44,8 @@ class JsdocCommand {
4144
}
4245

4346
async execute () {
44-
this.inputFileSet = new FileSet(this.options.files)
45-
assert.ok(
46-
this.options.files.length || this.options.source,
47-
'Must set either .files or .source'
48-
)
47+
this.inputFileSet = new FileSet()
48+
await this.inputFileSet.add(this.options.files)
4949
let result
5050
try {
5151
result = await this.getOutput()

0 commit comments

Comments
 (0)