microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.93k stars 595 forks source link

[api-extractor] #3465 incorrectly changed defaults for `reportFolder` in the template #4543

Open mcdurdin opened 8 months ago

mcdurdin commented 8 months ago

Summary

The default for reportFolder is etc:

https://github.com/microsoft/rushstack/blob/8a33edff8d980dabb4c3dd2f56c515c12979051f/apps/api-extractor/src/schemas/api-extractor-defaults.json#L20

The change in #3465 changed this to temp. This is wrong, and it makes the template comments confusing, because the temp folder should not be committed to git. The report file is written to both temp and etc on first run.

Details

3465 should be rolled back.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.41.0
Operating system? Windows
API Extractor scenario? reporting
Would you consider contributing a PR? Yes
TypeScript compiler version? 4.9.5 / 5.3.3
Node.js version (node -v)? 18.14.1
iclanton commented 7 months ago

@octogonz - Which should be correct here?

atdyer commented 7 months ago

Hi all, just chiming in here because I stumbled on this in a new project I created. @mcdurdin is correct that the change made in #3465 is wrong and the PR should be rolled back.

The default value as specified in the defaults is "<projectFolder>/etc/", see in code here.

I suspect the confusion is coming from the fact that running api-extractor without the --local flag will only write the .api.md file to the reportTempFolder, which by default is "<projectFolder>/temp/". Including the --local flag will write the file to both folders. This behavior is described in the API report documentation, found here.