Repository navigation
@effect/platform-browser@4.1.0
Minor Changes
-
#8829
8f23668Thanks @fubhy! - Replaceeffect/Cryptowith family-specificeffect/crypto/*services, opaque keys,CryptoError, a configurableWebCryptoreference and key schemas ineffect/Schema. Encoding secret or private keys through byte/format schemas requires{ allowEncode: true }.Breaking changes
- Use
SecureRandomfor randomness and UUIDs, andDigestwith algorithm values such asDigest.sha256for hashing. Replaceeffect/testing/TestCryptowithLayer.mockfor the required services. - Provide crypto explicitly; it is no longer included in the runtime
*Servicesbundles.NodeCrypto,BunCrypto,DenoCryptoandBrowserCryptooffer individual family layers and a combinedlayer, supplyingSecureRandomwhere needed. Core modules offerlayerWebCrypto. - Provide
Digest.Digestinstead ofCrypto.CryptotoSqlMessageStorageandSingleRunner, and instead ofEventLogEncryptiontoSqlEventLogServerEncrypted.makeStorageandlayerStorage. ReplaceEventLogEncryption.sha256Stringwithdigest.digestHex(Digest.sha256, bytes).
Existing workflow ID, activity idempotency key and event log table-name encodings are unchanged.
Event log encryption, identity key derivation and session authentication now run on
Aead,Digest,SignatureandSecureRandom.EventLogEncryption.makeandEventLogEncryption.layertake those services from context, so Node apps can use theNodeCryptolayers.EventLogEncryption.layerSubtleand the session auth functions use the Web Crypto layers on theWebCryptoreference instead ofglobalThis.crypto. Existing identities, derived signing keys and encrypted batches are unchanged.UUIDv7 and ULID generation is now monotonic below the maximum 48-bit timestamp, including within a millisecond and across clock rollback. Ordering is per
SecureRandominstance; the unsafe helpers and model UUIDv7 defaults share per-realm ordering. - Use
-
#8829
93895b9Thanks @tim-smart! - AddkeystoKeyValueStoreandSchemaStore. It returns a snapshot of the keys in the store, in no particular order, and is implemented by the memory, file system, SQL, Web Storage and IndexedDB stores. Custom stores built withKeyValueStore.makeorKeyValueStore.makeStringOnlymust now providekeys.KeyValueStore.prefix(...)now scopeskeys,sizeandisEmptyto keys under the prefix, with the prefix removed from the returned keys. PreviouslysizeandisEmptyreported on the whole backing store.Stores built with
KeyValueStore.makethat don't provideclearPrefixnow derive it fromkeysandremoveinstead of failing for non-empty prefixes. -
#8829
f97711fThanks @effect-bot! - IsolatePersistencestores on theKeyValueStoreand Redis backings. Clearing a store now only removes that store's entries, and different store / key pairs no longer map to the same backing key.Add
KeyValueStore.clearPrefix, implemented by the memory, file system, SQL, Web Storage and IndexedDB stores.KeyValueStore.prefix(...).clearnow only removes keys under the prefix. Stores built withKeyValueStore.makethat don't provideclearPrefixremove the matching keys one by one instead of clearing everything.Both backings now store entries under
<storeId>:<key>, with%and:in the store id percent-encoded.Key layout change. Entries written by earlier versions are not read back:
Persistence.layerKvs/layerBackingKvs: every existing entry becomes unreachable, because keys used to be<storeId><key>with no separator. Cached results are recomputed.Chat.layerPersistedon aKeyValueStorebacking loses its stored chat histories.Persistence.layerRedis/layerBackingRedis: keys are unchanged unless the store id contains%or:. Entries for those store ids become unreachable.
Old entries are not migrated or removed automatically.
Patch Changes
-
#10065
8e668feThanks @jpowersdev! - Preserve a leading UTF-8 BOM in URL-encoded body field names. -
#10067
ce9e999Thanks @jpowersdev! - Preserve a leading?in URL-encoded form field names.urlParamsBodypreviously dropped it as a query-string prefix, so?name=valuedecoded toname. -
Updated dependencies [
631d4f4,7ea1ea2,a2ccc14,ed20129,20795b9,a8e5e6c,c4d298d,fb5dbee,8309b94,ac10e55,af23904,df8dce5,0c24a8f,468c6ee,2d1fcd4,8f23668,3f8f359,fe6b748,2a03584,40e145e,7217410,cf249fe,4f0fad1,e75708c,7890077,c4a00fc,f74db37,069cf72,9a07ebc,f40dc4e,fa516c6,ffd9237,93895b9,8938b19,e5a1479,89e1e1e,eda0960,65db606,7c42335,cb21d14,89e1e1e,c32eb78,be9895b,26b4bfe,e19c611,f97711f,4f16778,d2b6bc7,8e668fe,ce9e999,3d88452,3c42058,2ae4045,e853fa1,6dc3f7c,1513bbd,c065ed7,1194a4c,2cb498e,89e5443,2a9a425,e710bbb,b0d6e75,32b3570,9f93f4f,27370c7]:- effect@4.1.0