-
Notifications
You must be signed in to change notification settings - Fork 188
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
build: stop formatting api files #686
build: stop formatting api files #686
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2432bc2:
|
4e50d8e
to
2432bc2
Compare
Uh! How comes this line didn't work? 🤨 |
@sarahdayan because Steps for issue to happen
Does that make sense... it's a pretty convoluted, multistep issue. |
@johnhooks I think what I still don't get is, since Prettier is supposed to ignore all |
@sarahdayan Prettier didn't touch the Sorry, I tried to be detailed in the explanation before, and must have done a bad job describing the issue. |
@sarahdayan if you want to see exactly what happens. $ rm -rf packages/*/lib
$ yarn build:types # if your local *.api.md files have been previously modified some of them will have changed
$ git add -A # so you can see what happens next
$ yarn format # watch the output, it formats all the packages/*/lib/**/*.d.ts files, but that didn't modify the git status
$ yarn build:types # *.api.md files have now been generated with the reformatted files |
Ah, gotcha now 👍 I was missing that it's not |
I finally figured out why the
*.api.md
files kept being reformatted!api-extractor
uses the code in thelib
folder to build the api files, but it wasn't ignored by Prettier so anytime the scriptformat
ran it would format all the files in the lib folders, then on the next run ofbuild:types
the reformatted code was used!Changes in this PR
lib
to.prettierignore
*.api.md
files to original output fromapi-extractor
Now the
*.api.md
files should only change if the api does.