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

[api-extractor] Allow omission of import statements in API reports #4756

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Josmithr
Copy link
Contributor

Summary

Add a config option for omitting import statements from API reports.

Details

Especially when combined with the new reportVariants functionality, the import statements included in the reports by default may or may not actually reflect the set of imports used by the (reduced) set of exports included in the report.

Additionally, for reviewing / API change monitoring, including the import statements can create unwanted noise in PR reviews.

The new includeImports report config option is optional, and defaults to true to preserve existing behavior.

How it was tested

Updated one of the test suite configurations to omit imports. See updated test collateral.

Impacted documentation

This page may want to be updated to call out the new optional config parameter:
https://api-extractor.com/pages/setup/configure_api_report/

@WayneFerrao
Copy link

Nit: Spelling in title 'omission'?

@Josmithr Josmithr changed the title [api-extractor] Allow omition of import statements in API reports [api-extractor] Allow omission of import statements in API reports Jun 4, 2024
@Josmithr
Copy link
Contributor Author

Josmithr commented Jun 6, 2024

Related: #4762

This link was an error. Please disregard.

@octogonz
Copy link
Collaborator

octogonz commented Jun 7, 2024

Related: #4762

How are these related? #4762 seems to be an actual bug which would affect .d.ts rollups as well.

@Josmithr
Copy link
Contributor Author

Josmithr commented Jun 7, 2024

Related: #4762

How are these related? #4762 seems to be an actual bug which would affect .d.ts rollups as well.

This was an error on my part. Linked from the wrong ticket. Please disregard 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: AE/AD
Development

Successfully merging this pull request may close these issues.

None yet

3 participants