Skip to content

skip analyzing problematic exports and log the errors #4516

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

Merged
merged 1 commit into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 21 additions & 5 deletions repo-scripts/size-analysis/analysis-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,19 +867,35 @@ export async function buildJsonReport(
name: moduleName,
symbols: []
};

for (const exp of publicApi.classes) {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
try {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
} catch (e) {
console.log(e);
}
}

for (const exp of publicApi.functions) {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
try {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
} catch (e) {
console.log(e);
}
}
for (const exp of publicApi.variables) {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
try {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
} catch (e) {
console.log(e);
}
}

for (const exp of publicApi.enums) {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
try {
result.symbols.push(await extractDependenciesAndSize(exp, jsFile, map));
} catch (e) {
console.log(e);
}
}
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion repo-scripts/size-analysis/package-analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
import glob from 'glob';
import * as fs from 'fs';

const projectRoot = dirname(resolve(__dirname, '../package.json'));
const projectRoot = dirname(resolve(__dirname, '../../package.json'));
/**
* Support Command Line Options
* -- inputModule (optional) : can be left unspecified which results in running analysis on all exp modules.
Expand Down