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

Implement file hashing for to-be-uploaded files #870

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Dec 6, 2023

Uses xxhash-wasm for fast hashing of Storybook file contents. Chromatic's Storybook took 21ms to hash on my machine (Apple M1 Pro).

📦 Published PR as canary version: 10.2.0--canary.870.7197051615.0

✨ Test out this PR locally via:

npm install chromatic@10.2.0--canary.870.7197051615.0
# or 
yarn add chromatic@10.2.0--canary.870.7197051615.0

@ghengeveld ghengeveld added release Auto: Create a `latest` release when merged minor Auto: Increment the minor version when merged labels Dec 6, 2023
node-src/lib/parseArgs.ts Show resolved Hide resolved
node-src/lib/getFileHashes.ts Outdated Show resolved Hide resolved
node-src/lib/getFileHashes.ts Show resolved Hide resolved
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

I think I'm less concerned because we'll probably rarely touch that file again, but I sort of agree with @thafryer's basic point which is that the file is a bit impenetrable and could be written in a simpler way.

node-src/lib/getFileHashes.ts Show resolved Hide resolved
Copy link
Contributor

@andrewortwein andrewortwein left a comment

Choose a reason for hiding this comment

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

I'll defer to the other comments here, but otherwise approve.

#️⃣#️⃣#️⃣👍🏻

node-src/lib/getFileHashes.ts Show resolved Hide resolved
@ghengeveld ghengeveld added skip-release Auto: Preserve the current version when merged and removed release Auto: Create a `latest` release when merged labels Dec 13, 2023
@ghengeveld ghengeveld added this pull request to the merge queue Dec 13, 2023
Merged via the queue into main with commit 49f11f9 Dec 13, 2023
21 checks passed
@ghengeveld ghengeveld deleted the ghengeveld/ap-3907-cli-generate-file-hashes-for-storybook-files-before branch December 13, 2023 15:15
@ghengeveld
Copy link
Member Author

🚀 PR was released in v10.2.0 🚀

@ghengeveld ghengeveld added the released Verdict: This issue/pull request has been released label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Auto: Increment the minor version when merged released Verdict: This issue/pull request has been released skip-release Auto: Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants