Skip to content

Conversation

@badrequest400
Copy link
Contributor

@badrequest400 badrequest400 commented Nov 21, 2025

Context

The hash() function is meant to take either a string filepath or a Buffer as parameter. Currently this is not typed correctly and the Buffer branch cannot be used in Typescript without errors.

Solution

Add Buffer to type union for the parameter.

closes #338

@pwlmc pwlmc self-requested a review November 23, 2025 10:07
pwlmc
pwlmc previously approved these changes Nov 23, 2025
Copy link
Owner

@pwlmc pwlmc left a comment

Choose a reason for hiding this comment

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

lgtm

@badrequest400 thanks for the contribution, much appreciated!

Can I ask you to:

  1. Sync with pwlmc:master (we should get the CI run on this PR after you rebase)
  2. Exclude package-lock.json changes from the PR. You likely have auto-install-peers enabled for your NPM, which is ok, but I don't want to force auto-peer install by default in the project.

@badrequest400
Copy link
Contributor Author

badrequest400 commented Nov 28, 2025

Can I ask you to:

1. Sync with `pwlmc:master` (we should get the CI run on this PR after you rebase)

2. Exclude `package-lock.json` changes from the PR. You likely have `auto-install-peers` enabled for your NPM, which is ok, but I don't want to force auto-peer install by default in the project.

Hey @pwlmc

Thanks for the review and considering it. I've excluded the peer changes and rebased the branch. Hope this will be okay now. Let me know!

@pwlmc pwlmc self-requested a review November 28, 2025 17:20
Copy link
Owner

@pwlmc pwlmc left a comment

Choose a reason for hiding this comment

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

lgtm, thx!

@pwlmc pwlmc merged commit 4730c10 into pwlmc:master Nov 28, 2025
7 checks passed
@pwlmc
Copy link
Owner

pwlmc commented Nov 28, 2025

@badrequest400 I will release the new version this weekend

@badrequest400
Copy link
Contributor Author

@badrequest400 I will release the new version this weekend

Thanks so much for looking at this @pwlmc 🙌

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.

fix: type for hash function

2 participants