Skip to content

feat(deps): ✨ Remove runtime dependencies - #86

Merged
haskou merged 1 commit into
masterfrom
feat/dependency-less
Oct 2, 2026
Merged

haskou merged 1 commit into
masterfrom
feat/dependency-less

Conversation

@haskou

@haskou haskou commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Makes the package dependency-less by removing buffer and uuid, and drops the unused vue dev dependency.

  • Hash owns the hex-to-base64 conversion. SHA256Hash and SHA512Hash now extend Hash instead of duplicating toBase64().
  • UUID.generate() produces an RFC 4122 v4 UUID and ShortId.generate() keeps its layout (4-byte timestamp + 8 random bytes). Both use globalThis.crypto.getRandomValues(), which works in non-secure browser contexts, unlike crypto.randomUUID().
  • Media is backed by Uint8Array. Node Buffer inputs are still accepted because Buffer is a Uint8Array.
  • README and docs state that the package is dependency-less; added a dependencies badge and keywords.

Testing

  • yarn lint, yarn test:coverage (568 tests, 100% coverage), yarn build (attw clean), yarn docs:build and the release workflow tests pass.
  • Checked the built CJS bundle: hash base64 and a 5 MB Media base64 match Buffer output, and the bundle has no buffer/uuid references.

Drop `buffer` and `uuid` and the unused `vue` dev dependency. The package
now ships with zero runtime dependencies.

- Hash base64 conversion lives in `Hash`; SHA256Hash and SHA512Hash now
  extend it instead of duplicating `toBase64()`.
- `UUID.generate()` and `ShortId.generate()` use
  `globalThis.crypto.getRandomValues()`, which also works in non-secure
  browser contexts.
- `Media` is backed by `Uint8Array`. `getBuffer()` now returns a
  `Uint8Array`; Node `Buffer` inputs are still accepted.
- Document the dependency-less package and add a dependencies badge and
  keywords.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@haskou
haskou merged commit 720cde7 into master Oct 2, 2026
3 checks passed
@haskou
haskou deleted the feat/dependency-less branch October 2, 2026 22:48
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.

1 participant