Skip to content

Commit 82428c7

Browse files
committed
deps, dates, CI
1 parent 77475d0 commit 82428c7

7 files changed

Lines changed: 80 additions & 142 deletions

File tree

.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, windows-latest]
19-
node-version: [12, 14, 16, 18, 20, 22, 23]
19+
node-version: [12, 14, 16, 18, 20, 22, 24, 25]
2020

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

LICENSE renamed to LICENCE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
The MIT Licence (MIT)
22

3-
Copyright (c) 2015-24 Lloyd Brookes <75pound@gmail.com>
3+
Copyright (c) 2015-26 Lloyd Brookes <opensource@75lb.com>
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: 2 additions & 3 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-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
76

87
***Upgraders, please check the [release notes](https://github.com/jsdoc2md/jsdoc-api/releases).***
98

@@ -110,6 +109,6 @@ See the [API documentation](https://github.com/jsdoc2md/jsdoc-api/blob/master/do
110109

111110
* * *
112111

113-
&copy; 2015-24 [Lloyd Brookes](https://github.com/75lb) \<75pound@gmail.com\>.
112+
&copy; 2015-2026 [Lloyd Brookes](https://github.com/75lb) \<opensource@75lb.com\>.
114113

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

dist/index.cjs

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ var path = require('path');
66
var fs = require('node:fs');
77
var os = require('os');
88
var crypto = require('crypto');
9-
var fg = require('fast-glob');
10-
var fs$1 = require('fs');
9+
var FileSet = require('file-set');
1110
var assert = require('assert');
1211
var walkBack = require('walk-back');
1312
var currentModulePaths = require('current-module-paths');
@@ -40,82 +39,6 @@ class TempFile {
4039
}
4140
}
4241

43-
class FileSet {
44-
constructor () {
45-
/* validation */
46-
if (arguments.length) {
47-
throw new Error('new Fileset() does not require any arguments')
48-
}
49-
50-
/** • fileSet.files :string[]
51-
≈ The existing files found.
52-
*/
53-
this.files = [];
54-
55-
/** • fileSet.dirs :string[]
56-
≈ The existing directories found. Directory paths will always end with `'/'`.
57-
*/
58-
this.dirs = [];
59-
60-
/** • fileSet.notExisting :string[]
61-
≈ Paths which were not found.
62-
*/
63-
this.notExisting = [];
64-
}
65-
66-
/** ø fileSet.add(patterns)
67-
≈ Add file patterns to the set.
68-
• [patterns] :string|string[] - One or more file paths or glob expressions to inspect.
69-
*/
70-
async add (files, options = {}) {
71-
files = arrayify(files);
72-
for (let file of files) {
73-
/* Force all incoming file paths and glob expressions to use posix separators */
74-
file = os.platform() === 'win32'
75-
? file.replace(/\\/g, path.posix.sep)
76-
: file;
77-
try {
78-
const stat = await fs$1.promises.stat(file);
79-
if (stat.isFile() && !this.files.includes(file)) {
80-
this.files.push(file);
81-
} else if (stat.isDirectory() && !this.dirs.includes(file)) {
82-
this.dirs.push(file.endsWith(path.posix.sep) ? file : `${file}${path.posix.sep}`);
83-
}
84-
} catch (err) {
85-
if (err.code === 'ENOENT') {
86-
if (fg.isDynamicPattern(file)) {
87-
const found = await fg.glob(file, { onlyFiles: false, markDirectories: true });
88-
if (found.length) {
89-
if (options.globResultSortFn) {
90-
found.sort(options.globResultSortFn);
91-
}
92-
for (const match of found) {
93-
if (match.endsWith(path.posix.sep)) {
94-
if (!this.dirs.includes(match)) this.dirs.push(match);
95-
} else {
96-
if (!this.files.includes(match)) this.files.push(match);
97-
}
98-
}
99-
} else {
100-
if (!this.notExisting.includes(file)) this.notExisting.push(file);
101-
}
102-
} else {
103-
if (!this.notExisting.includes(file)) this.notExisting.push(file);
104-
}
105-
} else {
106-
throw err
107-
}
108-
}
109-
}
110-
}
111-
112-
clear () {
113-
this.files = [];
114-
this.dirs = [];
115-
this.notExisting = [];
116-
}
117-
}
118-
11942
const { __dirname: __dirname$1 } = currentModulePaths((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
12043

12144
class JsdocCommand {

package-lock.json

Lines changed: 58 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsdoc-api",
3-
"author": "Lloyd Brookes <75pound@gmail.com>",
3+
"author": "Lloyd Brookes <opensource@75lb.com>",
44
"version": "9.3.5",
55
"description": "A programmatic interface for jsdoc",
66
"repository": {
@@ -31,13 +31,13 @@
3131
"docs": "75lb-nature jsdoc2md index.js lib/*.js > docs/api.md"
3232
},
3333
"dependencies": {
34-
"array-back": "^6.2.2",
34+
"array-back": "^6.2.3",
3535
"cache-point": "^3.0.1",
36-
"current-module-paths": "^1.1.2",
36+
"current-module-paths": "^1.1.3",
3737
"file-set": "^5.3.0",
38-
"jsdoc": "^4.0.4",
38+
"jsdoc": "^4.0.5",
3939
"object-to-spawn-args": "^2.0.1",
40-
"walk-back": "^5.1.1"
40+
"walk-back": "^5.1.2"
4141
},
4242
"peerDependencies": {
4343
"@75lb/nature": "latest"

test/lib/fixture.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,19 @@ class Fixture {
2626
static createTmpFolder (folder) {
2727
try {
2828
fs.statSync(folder)
29-
/* rmdirSync is node v12 friendly */
30-
fs.rmdirSync(folder, { recursive: true })
29+
/* rmdirSync supports v12 but was removed in v25.. rmSync is supported in v15 onward. */
30+
if (Number(process.versions.node.split('.')[0]) >= 15) {
31+
fs.rmSync(folder, { recursive: true, force: true })
32+
} else {
33+
fs.rmdirSync(folder, { recursive: true })
34+
}
3135
fs.mkdirSync(folder)
3236
} catch (err) {
33-
fs.mkdirSync(folder)
37+
if (err.code === 'ENOENT') {
38+
fs.mkdirSync(folder)
39+
} else {
40+
throw err
41+
}
3442
}
3543
}
3644

0 commit comments

Comments
 (0)