Skip to content

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Oct 15, 2025

🧭 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 for json output, which is not needed.

@millotp millotp self-assigned this Oct 15, 2025
@millotp millotp requested a review from a team as a code owner October 15, 2025 09:31
@millotp millotp requested review from Fluf22 and morganleroi October 15, 2025 09:31
@algolia-bot
Copy link
Collaborator

algolia-bot commented Oct 15, 2025

✔️ Code generated!

Name Link
🪓 Triggered by f4c79f74ebbf6907848b328a6200b4f1ce3353f8
🍃 Generated commit f41acde998955830f5248faa898c4291e6c3124b
🌲 Generated branch generated/chore/accurate-cache
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
go 1759
javascript 1666
php 1480
csharp 1325
python 1144
java 1041
ruby 759
swift 404
scala 23

shortcuts
shortcuts previously approved these changes Oct 15, 2025
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great fixes!

folder: toAbsolutePath('specs/'),
generatedFiles: [],
filesToCache: ['common'],
dependsOn: ['common'],
Copy link
Member

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) {
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea !

Copy link
Member

@shortcuts shortcuts left a 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

@millotp millotp merged commit 3312bdc into main Oct 15, 2025
29 checks passed
@millotp millotp deleted the chore/accurate-cache branch October 15, 2025 12:56
algolia-bot added a commit that referenced this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants