diff --git a/config/jsdoc/info/publish.js b/config/jsdoc/info/publish.js index 9b9dd81874..9e42a6a6d3 100644 --- a/config/jsdoc/info/publish.js +++ b/config/jsdoc/info/publish.js @@ -53,7 +53,7 @@ exports.publish = function(data, opts) { docs.filter(function(doc) { var include = true; var constructor = doc.memberof; - if (constructor && constructor.substr(-1) === '_') { + if (constructor && constructor.substr(-1) === '_' && constructor.indexOf('module:') === -1) { assert.strictEqual(doc.inherited, true, 'Unexpected export on private class: ' + doc.longname); include = false; diff --git a/package.json b/package.json index 8ee21836f1..58a4d107cb 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "istanbul": "0.4.5", "jquery": "3.3.1", "jscodeshift": "^0.4.0", - "jsdoc": "3.5.5", + "jsdoc": "git://github.com/ahocevar/jsdoc.git#closure-path-types", "karma": "^2.0.0", "karma-chrome-launcher": "2.2.0", "karma-coverage": "^1.1.1", diff --git a/tasks/generate-info.js b/tasks/generate-info.js index 089f203415..ba328d9b6d 100644 --- a/tasks/generate-info.js +++ b/tasks/generate-info.js @@ -208,62 +208,6 @@ function spawnJSDoc(paths, callback) { } -/** - * Given the path to a source file, get the list of provides. - * @param {string} srcPath Path to source file. - * @param {function(Error, Array.)} callback Called with a list of - * provides or any error. - */ -const getProvides = async.memoize(function(srcPath, callback) { - fs.readFile(srcPath, function(err, data) { - if (err) { - callback(err); - return; - } - const provides = []; - const matcher = /goog\.provide\('(.*)'\)/; - String(data).split('\n').forEach(function(line) { - const match = line.match(matcher); - if (match) { - provides.push(match[1]); - } - }); - callback(null, provides); - }); -}); - - -/** - * Add provides data to new symbols. - * @param {Object} info Symbols and defines metadata. - * @param {function(Error, Object)} callback Updated metadata. - */ -function addSymbolProvides(info, callback) { - if (!info) { - process.nextTick(function() { - callback(null, null); - }); - return; - } - - function addProvides(symbol, callback) { - getProvides(symbol.path, function(err, provides) { - if (err) { - callback(err); - return; - } - symbol.provides = provides; - callback(null, symbol); - }); - } - - async.map(info.symbols, addProvides, function(err, newSymbols) { - info.symbols = newSymbols; - callback(err, info); - }); -} - - /** * Write symbol and define metadata to the info file. * @param {Object} info Symbol and define metadata. @@ -294,7 +238,6 @@ function main(callback) { getNewerExterns, getNewer, spawnJSDoc, - addSymbolProvides, writeInfo ], callback); }