Repository navigation
fix: support Effect 4.1 crypto modules - #4
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Effect 4.1 removed the root
Cryptomodule. Witheffect@4.1, importing any entry point of@effect-kit/redis@0.1.1fails withThe requested module 'effect' does not provide an export named 'Crypto'. The^4.0.6peer range allowed 4.1, so this hits anyone who upgrades Effect.Change
RedisScript.makehashes withDigestfromeffect/cryptoand builds the lowercase hex itself.cryptoLayerfrom/nodeand/bunprovides nativeDigestandSecureRandominstead ofCrypto. TheRedisNodeandRedisBunLayers expose the same services.Digestservice contract.effectpeer is now^4.1.0through apeercatalog. The workspace pinseffectand@effect/vitestto 4.1.0.Checks
pnpm format,pnpm ci:check(186 files, 1607 tests) andpnpm test:extended(fixtures, fuzzing, packed consumers on Node and Bun with Effect 4.1.0) pass locally.test:live,test:bun) were not run.