Skip to content

Commit a8c447e

Browse files
committed
MLE-24641 Removed gulp-jsdoc, just using jsdoc
Removes the markdown-it vulnerability. Also moved instructions for generating docs from README to CONTRIBUTING.
1 parent faf7be4 commit a8c447e

File tree

8 files changed

+91
-248
lines changed

8 files changed

+91
-248
lines changed

.copyrightconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ startyear: 2015
1111
# - Dotfiles already skipped automatically
1212
# Enable by removing the leading '# ' from the next line and editing values.
1313
# filesexcluded: third_party/*, docs/generated/*.md, assets/*.png, scripts/temp_*.py, vendor/lib.js
14-
filesexcluded: .github/*, README.md, Jenkinsfile, package.json, package-lock.json, test-app/*, *.md, docker-compose.yaml, test-complete-app-mlDeploy/*
14+
filesexcluded: .github/*, README.md, Jenkinsfile, test-app/*, *.md, docker-compose.yaml, test-complete-app-mlDeploy/*, *.json

CONTRIBUTING.md

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ or
5757
There are also tests in the `test-complete` folder. The setup for these is more complicated and can
5858
be found in the `Jenkinsfile` file in this repository in the `runE2ETests` function.
5959

60+
## Generating documentation
61+
62+
After installing the project dependencies, you can build the reference documentation locally from the root
63+
directory of the marklogic package:
64+
65+
npm run doc
66+
67+
The documentation is generated in the `./doc` gitignored directory. The documentation can also be
68+
accessed online at <https://docs.marklogic.com/jsdoc/index.html>.
69+
6070
## Explanation of overrides in package.json
6171

6272
Each override is being documented here so we have some ability in the future to remove an override as needed.
@@ -86,30 +96,12 @@ glob-parent: "6.0.2"
8696
- Why needed: Older versions vulnerable to regex attacks
8797
- CVE/Issue: CVE-2020-28469 - ReDoS vulnerability
8898

89-
jsdoc: "4.0.0"
90-
- Purpose: Fixes high-severity data access vulnerability in older jsdoc versions
91-
- Affects: gulp-jsdoc3 → jsdoc
92-
- Why needed: [email protected] uses older jsdoc with known vulnerabilities
93-
- CVE/Issue: High severity vulnerability in taffydb (jsdoc dependency)
94-
95-
markdown-it: "14.1.0"
96-
- Purpose: Use latest markdown parser for JSDoc
97-
- Affects: gulp-jsdoc3 → jsdoc → markdown-it
98-
- Why needed: Latest version (no vulnerabilities), handles RFC 7464 parsing
99-
- Note: No newer version available, ensures consistency
100-
10199
minimatch: "5.1.0"
102100
- Purpose: Fixes ReDoS (Regular Expression Denial of Service) vulnerability
103101
- Affects: mocha, gulp-mocha, and other build tools
104102
- Why needed: Older minimatch versions have catastrophic backtracking vulnerability
105103
- CVE/Issue: CVE-2022-3517 - ReDoS vulnerability
106104

107-
sanitize-html: "2.17.0"
108-
- Purpose: Ensure JSDoc template uses non-vulnerable HTML sanitizer
109-
- Affects: gulp-jsdoc3 → ink-docstrap → sanitize-html
110-
- Why needed: Older versions have XSS vulnerabilities
111-
- Note: Also in devDependencies, override ensures transitive deps use safe version
112-
113105
semver: "7.5.3"
114106
- Purpose: Fixes ReDoS in version parsing
115107
- Affects: Multiple packages across dependency tree
@@ -122,12 +114,6 @@ tar-fs: "2.1.4"
122114
- Why needed: Older tar-fs allows extracting files outside intended directory
123115
- CVE/Issue: CVE-2024-28861 - Path traversal
124116

125-
tmp: "0.2.4"
126-
- Purpose: Fixes arbitrary file write vulnerability
127-
- Affects: gulp-jsdoc3 → jsdoc → tmp
128-
- Why needed: Older tmp versions have file system security issues
129-
- CVE/Issue: CVE-2024-28858 - Arbitrary file write
130-
131117
The following are related to this npm supply chain attack - https://orca.security/resources/blog/qix-npm-attack/ .
132118

133119
ansi-styles: "4.3.0"

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@ in the online resources. To run the examples, follow the instructions here:
9898

9999
examples/1readme.txt
100100

101-
### Generating Documentation Locally
102-
103-
After installing the project dependencies (including the [gulp](http://gulpjs.com/)
104-
build system), you can build the reference documentation locally from the root
105-
directory of the marklogic package:
106-
107-
npm run doc
108-
109-
The documentation is generated in a doc subdirectory. The documentation can also be
110-
accessed online [here](https://docs.marklogic.com/jsdoc/index.html).
111-
112101
## Support
113102

114103
The MarkLogic Node.js Client API is maintained by MarkLogic Engineering.

gulpfile.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const path = require('path');
55
const gulp = require('gulp');
66
const eslint = require('gulp-eslint-new');
77
const mocha = require('gulp-mocha');
8-
const jsdoc = require('gulp-jsdoc3');
98

109
const { parallel, series } = gulp;
1110

@@ -33,14 +32,6 @@ function test() {
3332
}));
3433
}
3534

36-
function doc() {
37-
// TODO: clear the directory first - maybe by following this recipe:
38-
// https://github.com/gulpjs/gulp/blob/master/docs/recipes/delete-files-folder.md
39-
const config = require('./jsdoc.json');
40-
return gulp.src(['./lib/*.js', 'README.md'])
41-
.pipe(jsdoc(config));
42-
}
43-
4435
let testModulesClient = null;
4536
function getTestModulesClient() {
4637
if (testModulesClient === null) {
@@ -184,7 +175,6 @@ function runProxyTests() {
184175
}));
185176
}
186177

187-
exports.doc = doc;
188178
exports.lint = lint;
189179
exports.loadProxyTests = series(parallel(loadProxyTestInspector, loadProxyTestData, loadProxyTestCases), updateMjsFiles);
190180
exports.generateProxyTests = parallel(positiveProxyTests, negativeProxyTests, generatedProxyTests);

jsdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"templates": {
77
"theme": "marklogic",
88
"systemName": "MarkLogic Node.js Client API",
9-
"copyright": "Copyright (c) 2020 MarkLogic Corporation",
9+
"copyright": "Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.",
1010
"navType": "vertical",
1111
"inverseNav": true,
1212
"includeDate": false,

0 commit comments

Comments
 (0)