Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: introduce //lib/api.js #3835

Merged
merged 3 commits into from
Jan 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix doclint tests
  • Loading branch information
aslushnikov committed Jan 24, 2019
commit 8b6e3e660b8dd53c5f4c3e93d8aaf51d7d32f5f8
8 changes: 4 additions & 4 deletions utils/doclint/check_public_api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ function checkSorting(doc) {
*/
function filterJSDocumentation(jsSources, jsDocumentation) {
const apijs = jsSources.find(source => source.name() === 'api.js');
if (!apijs)
throw new Error('Failed to find "api.js" file that declares public API classes');
const includedClasses = new Set(Object.keys(require(apijs.filePath())));
let includedClasses = null;
if (apijs)
includedClasses = new Set(Object.keys(require(apijs.filePath())));
// Filter private classes and methods.
const classes = [];
for (const cls of jsDocumentation.classesArray) {
if (!includedClasses.has(cls.name))
if (includedClasses && !includedClasses.has(cls.name))
continue;
const members = cls.membersArray.filter(member => !EXCLUDE_PROPERTIES.has(`${cls.name}.${member.name}`));
classes.push(new Documentation.Class(cls.name, members));
Expand Down