Skip to content

[LON-427] Drop create-hash - #255

Open
mt-btanner wants to merge 8 commits into
masterfrom
lon-427-drop-create-hash
Open

[LON-427] Drop create-hash#255
mt-btanner wants to merge 8 commits into
masterfrom
lon-427-drop-create-hash

Conversation

@mt-btanner

@mt-btanner mt-btanner commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This one function somehow managed to introduce 2 runtime dependencies for things which can be vendored in a single line or replaced with native APIs.

create-hash

This can be replaced with the crypto.subtle API, available in browser and Node environments. I also preserved the behaviour of dropping the trailing "=".

The implementation is copied from Google's here

url-safe-base64

We used this exclusively to make the base64 hash URL-safe, which is a one-line method from the package. I inlined it as a helper instead.

uuid?

I'm not entirely sure how this ever worked, considering uuid as a package was never in runtime dependencies and @types/uuid was only in devDependencies. As you can see in the diff from its removal, uuid wasn't brought into yarn.lock as a dependency of the @types package either.

Regardless, it's now replaced with window.crypto.randomUUID(), available in both browser and Node environments.

@mt-btanner mt-btanner self-assigned this Jul 30, 2026
@mt-btanner
mt-btanner requested review from a team as code owners July 30, 2026 02:36
mt-mwalston
mt-mwalston previously approved these changes Jul 30, 2026
@mt-btanner

mt-btanner commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@mt-mwalston Had to rebase to resolve some conflicts, can you reapprove?

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