-
Notifications
You must be signed in to change notification settings - Fork 26
chore(scripts): accurate cache for building docs #5480
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
Conversation
✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great fixes!
scripts/specs/format.ts
Outdated
folder: toAbsolutePath('specs/'), | ||
generatedFiles: [], | ||
filesToCache: ['common'], | ||
dependsOn: ['common'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
scripts/cache.ts
Outdated
|
||
for (const fileToCache of this.filesToCache) { | ||
hash += (await hashElement(`${this.folder}/${fileToCache}`)).hash; | ||
for (const file of this.dependsOn) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependsOn could also be named dependencies so we have a singular form
nitpick though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so perfect I can't even believe it's real
…[skip ci] Co-authored-by: Pierre Millot <[email protected]>
🧭 What and Why
The cache for
yarn cli build specs -d
was broken and didn't take the snippets or the correct output file into account, now it should be pixel perfect.Also fix some types, refactor the cache, and avoid a double call to
bundleSpecsForDoc
! it was calling this even forjson
output, which is not needed.