Skip to content

Replace hasha library with node built-ins#17

Merged
GrahamCampbell merged 1 commit intomainfrom
remove-hasha
Apr 27, 2026
Merged

Replace hasha library with node built-ins#17
GrahamCampbell merged 1 commit intomainfrom
remove-hasha

Conversation

@GrahamCampbell
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the external hasha dependency and replaces its usage with a small internal cache-hashing helper built on Node’s built-in crypto/fs APIs, keeping the existing cache-hash contract and adding tests to lock it in.

Changes:

  • Add src/utils/cache-hash.js to compute the cache hash using Node built-ins (streaming file reads + crypto hashing).
  • Update the Framework component to use the new helper and remove hasha usage.
  • Add/extend unit tests to validate the cache-hash contract and deploy-skip behavior; remove hasha from package.json.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/cache-hash.js Introduces Node-based implementation of the existing cache-hash contract.
components/framework/index.js Switches framework caching logic to the new utility and drops hasha usage.
test/unit/src/utils/cache-hash.test.js Adds focused tests to lock down cache-hash semantics (sorting, delimiter, binary, empty matches, read failures).
test/unit/components/framework/index.test.js Adds tests covering deploy skip when unchanged and cache-hash refresh when inputs change.
package.json Removes hasha from dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GrahamCampbell GrahamCampbell merged commit 17d1092 into main Apr 27, 2026
8 checks passed
@GrahamCampbell GrahamCampbell deleted the remove-hasha branch April 27, 2026 18:16
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.

2 participants