Skip to content

fix: support Effect 4.1 crypto modules - #4

Merged
envoy1084 merged 1 commit into
mainfrom
fix/effect-4-1
Nov 15, 2026
Merged

envoy1084 merged 1 commit into
mainfrom
fix/effect-4-1

Conversation

@envoy1084

Copy link
Copy Markdown
Member

Problem

Effect 4.1 removed the root Crypto module. With effect@4.1, importing any entry point of @effect-kit/redis@0.1.1 fails with The requested module 'effect' does not provide an export named 'Crypto'. The ^4.0.6 peer range allowed 4.1, so this hits anyone who upgrades Effect.

Change

  • RedisScript.make hashes with Digest from effect/crypto and builds the lowercase hex itself.
  • cryptoLayer from /node and /bun provides native Digest and SecureRandom instead of Crypto. The RedisNode and RedisBun Layers expose the same services.
  • A digest failure is now a defect, matching the Digest service contract.
  • The effect peer is now ^4.1.0 through a peer catalog. The workspace pins effect and @effect/vitest to 4.1.0.
  • Tests, packed-consumer fixtures, README and AGENTS.md are updated. A patch changeset describes the API and peer change.

Checks

  • pnpm format, pnpm ci:check (186 files, 1607 tests) and pnpm test:extended (fixtures, fuzzing, packed consumers on Node and Bun with Effect 4.1.0) pass locally.
  • The landing site builds its Redis docs against this package with Effect 4.1.0.
  • Live Redis suites (test:live, test:bun) were not run.

Effect 4.1 removed the root Crypto module, so every entrypoint failed to
load with effect@4.1. Port script hashing to effect/crypto Digest, make
the native cryptoLayer provide Digest and SecureRandom, pin development
to effect 4.1.0 and publish the peer as ^4.1.0 through a peer catalog.
@envoy1084
envoy1084 merged commit 08808e3 into main Nov 15, 2026
3 checks passed
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